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
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: 4a0a0047304502204ab084ca4adc8edbd923072f50bf96190daf2b446beaee296e060f62ab2a7fbc022100f3939fcbbad2dfeb99ca2e21ed571273c18b27ecaf09d1433b8b5ba968d8ca92:922c64590222798bb761d5b6d8e72950