id: nodejs-framework-exceptions

info:
  name: Node.js Framework Exceptions
  author: Aayush Dhakal
  severity: info
  description: Detects suspicious Node.js framework exceptions that could indicate exploitation attempts
  reference:
    - https://expressjs.com/en/guide/error-handling.html
    - https://nodejs.org/en/docs/guides
  tags: file,logs,nodejs

file:
  - extensions:
      - all

    extractors:
      - type: regex
        name: exception
        part: body
        regex:
          - 'TypeError'
          - 'ReferenceError'
          - 'SyntaxError'
          - 'ValidationError'
          - 'UnauthorizedError'
          - 'ForbiddenError'
          - 'NotFoundError'
          - 'InternalServerError'
          - 'BadRequestError'
          - 'MongoError'
          - 'SequelizeDatabaseError'
# digest: 4b0a00483046022100a39b0c0694c44c81bebadc4292e60d9385d9ca1c7f7ac49adf4be1f9402e2cbc0221009a85fa4209a0705bc5dc80f6e7c210da6c818b36ab21fcc44994ff45cc701814:922c64590222798bb761d5b6d8e72950