id: beanstalk-service

info:
  name: Beanstalk Service - Detect
  author: pussycat0x
  severity: info
  description: |
    Beanstalk is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously.
  reference:
    - https://jhadiary.wordpress.com/2016/05/18/beanstalk-helping-commands/
  metadata:
    verified: true
    max-request: 1
    shodan-query: port:11300 "cmd-peek"
  tags: network,beanstalk,detect,enum,tcp,discovery
tcp:
  - inputs:
      - data: "stats\r\n"
        read: 8

    host:
      - "{{Hostname}}"
    port: 11300

    matchers:
      - type: word
        part: raw
        words:
          - "cmd-release"
          - "cmd-peek"
        condition: and

    extractors:
      - type: regex
        name: stats
        regex:
          - '([a-z-A-Z: 0-9]+)'
# digest: 4a0a0047304502206b8a95ada280ecc9900ffe49bfbf1c574a79350cd821ee056d52455fd91d9dd00221009e8a525f60aa005a9ffa5c5c25a5ad2bf1c0334ff3ddd00e43db82077353b21a:922c64590222798bb761d5b6d8e72950