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