exploitagency / ESPloitV2

WiFi Keystroke Injection Tool designed for an Atmega 32u4/ESP8266 Paired via Serial (Cactus WHID Firmware). Also features Serial, HTTP, and PASV FTP exfiltration methods and an integrated Credential Harvester Phishing tool called ESPortal.
MIT License
558 stars 136 forks source link

[WHID Injector] Infinite payloads looping if the payload finish with "\n\n" in auto run mode #57

Open Nazime opened 4 years ago

Nazime commented 4 years ago

After spending some hours debugging... I noticed if I upload a payload with two newlines at the end (adding one new line and the editor automatically add an other new line) and activate the option "Automatically Deploy Payload Upon Insetion" the payloads will run infinite times...

I tested the same payload with and without newline at the end (one payload that work with only one new line, and the one that infinite loop with two new lines) 3 times to be sure of this behavior before submitting this issue.

The quick fix was to remove the trailing new line for all my payloads, I do not know why the fact that there is a new line makes it loop endlessly (probably? the loop function in Arduino_32u4_Code, but I am not good in C programming or Arduino :p )

The problem with this is that you can't reset the configuration since the AP won't pop out until the payload will finish (and that won't happen).

In case other people have the same problem as me (https://github.com/whid-injector/WHID/issues/31)