0

From what I gathered, the gist of XerXes is doing this (snippet in Python):

with socket(AF_INET, SOCK_STREAM) as s:
    s.connect((host, port))
    s.send(b"0")
    

simultaneously, i.e. the opening and closing a large number of connections (and therefore files). Is sending any data, s.send(b"0"), at all needed for the attack? Would therefore XerXes be as effective without any data sent to the target?

2
  • This is not a code review site. Please reduce your question to the main point - which seems to be if it is sufficient to opening and closing many connections in parallel or if actually sending data is needed too. The actual code is irrelevant to ask this. Commented Jan 20, 2023 at 14:50
  • @SteffenUllrich I reduced my question to the main point in response to your worthy comment.
    – John Smith
    Commented Jan 20, 2023 at 15:34

1 Answer 1

1

A single TCP connect and close can be handled by the OS kernel and might not even reach the application. The point of continuously sending data in Xerxes (i.e. not only a single byte but more) is to keep the connection open and to allocate resources at the actual server process.

2
  • Would sending more bytes, but not so much as an HTTP request, be unnecessary or less efficient when compared to sending b'\0'? The implementation of XerXes in C that I've cited sends just a sing byte.
    – John Smith
    Commented Jan 20, 2023 at 17:28
  • 1
    @JohnSmith: "The implementation of XerXes in C that I've cited" - you don't cite any in your question but link to another question at this site. The implementation linked there was initially described by sending only a single byte in the answer (written by me) but I had another look and realized that it actually sends bytes as long as the server did not close the connection. I've fixed the answer accordingly. And keep on sending more bytes is useful since servers might have different timeouts for idle and for end of request. Commented Jan 20, 2023 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .