id: traggo-server-detect

info:
  name: Traggo Time Tracking Server - Detect
  author: 0x_Akoko
  severity: info
  description: |
    Detected Traggo time tracking server.
  reference:
    - https://github.com/traggo/server
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.title:"Traggo"
  tags: tech,traggo,detect,graphql,discovery

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

      - |
        POST /graphql HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"query":"{ version { name commit buildDate } }"}

    matchers:
      - type: dsl
        dsl:
          - 'contains(body_1, "<title>Traggo</title>") && contains(body_1, "webpackJsonpui") && contains(body_2, "\"data\"") && contains(body_2, "\"version\"")'

    extractors:
      - type: json
        name: version
        part: body_2
        json:
          - '.data.version.name'
# digest: 4a0a004730450220691cd0e1df99ca2d14e412cdd4a1427962300a7a7a73bb6ccfe5299faa632211022100bb15f0796577c30abb42e3161fe620f80eb1f83bffb250f79b5cff292af12a37:922c64590222798bb761d5b6d8e72950