byob icon indicating copy to clipboard operation
byob copied to clipboard

SECURITY! Byob is unsafe at the dropper and stager stage.

Open lecatos opened this issue 5 years ago • 2 comments

Byob is unsafe at the dropper and stager stage.

During the dropper stage, Byob will connect to the server to download "stager.py" but this connection is insecure because it uses http instead of https to download this file. It is vulnerable to man in the middle attack. The attacker can inject a malicious "stager.py" to the client and the client will naively execute the script. The same goes to the stager stage, it reaches the server to download "payload.py" insecurely. So, all of the clients are at risk of being hijack by the attacker. The best way to solve is to use a custom certificate and use ssl pinning.

We know that during the payload stage, the connection between the payload and the C2 is secure because it uses Diffie Hellman to perform key exchanges but this secure connection is pointless if the first two stage is insecure in the first place.

Additionally, the obfuscated exe payload for window doesn't really slow down for a reverse engineerer to reverse it because if they are smart enough, they can just use tools like Wireshark to sniff the http traffic made when the payload tries to download "stager.py", the reverse engineerer can follow the HTTP traffic and they can download this sourced "stager.py" and see what's going on. The best way to solve is to use a custom certificate and use ssl pinning. However, this doesn't mean that this obfuscated exe payload is completely useless, It can help to bypass AV.

lecatos avatar Jun 06 '21 04:06 lecatos

@lecatos thanks for the information, this definitely needs to be resolved in future Byob updates. The Byob framework was never meant to be deployed in an environment where it needed to be secure, as it was only for pen testers and white hat hackers. But knowing the way people use this, it needs to be resolved nonetheless. I am currently working on an update to Byob in which I will try to include security fixes.

garsh1 avatar Jun 06 '21 14:06 garsh1

Stale issue message

github-actions[bot] avatar Aug 06 '21 01:08 github-actions[bot]