Rename test -> tests (#66)

* rename test -> tests

* re-add ignored tests
This commit is contained in:
JP Smith
2017-03-13 14:06:36 -05:00
committed by GitHub
parent dd24878724
commit ca0bee2377
81 changed files with 7 additions and 7 deletions
@@ -0,0 +1,4 @@
Buffer: 0x00403018
Length: 0x2E
python SymbolicExecutor/main.py --procs 1 --offset 0 --workspace apiint --buffer "0x00403018" --size "0x2E" tests/api_interception/api_interception.dmp --names tests/api_interception/api_names.txt --log apiint/manticore.log
+56
View File
@@ -0,0 +1,56 @@
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
//TCHAR buffer[] = _T("PC:\\windows\\notepad.exe");
TCHAR buffer[] = _T("ZC:\\winodws\\notepad.exe");
int _tmain(int argc, _TCHAR* argv[])
{
__debugbreak();
TCHAR *buf = buffer;
TCHAR op = buf[0];
HKEY testkey = NULL;
LSTATUS st = RegCreateKeyEx(HKEY_CURRENT_USER, L"Test", 0, NULL, 0, KEY_WRITE, NULL, &testkey, 0);
if(st != ERROR_SUCCESS || testkey == NULL ) {
return -1;
}
switch(op) {
case L'P':
{
PROCESS_INFORMATION psi;
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
BOOL worked = CreateProcess(NULL, buf+1, NULL, NULL, FALSE, 0, NULL, NULL, &si, &psi);
if(worked) {
CloseHandle(psi.hThread);
CloseHandle(psi.hProcess);
}
}
case L'R':
{
HKEY key = NULL;
LSTATUS s = RegOpenKeyEx(HKEY_CURRENT_USER, buf+1, 0, KEY_READ, &key);
if(s == ERROR_SUCCESS && key != NULL) {
RegCloseKey(key);
}
}
case L'K':
{
HKEY key = NULL;
LSTATUS s = RegCreateKeyEx(testkey, buf+1, 0, NULL, 0, KEY_WRITE, NULL, &key, 0);
if(s == ERROR_SUCCESS && key != NULL) {
RegCloseKey(key);
}
}
default:
printf("Unknown argument: %C\n", op);
}
return 0;
}
Binary file not shown.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
0x754d204d stdcall windows.kernel32.CreateProcessW
0x7551c189 stdcall windows.kernel32.RegOpenKeyExW
0x75510d25 stdcall windows.kernel32.RegCreateKeyExW
+10
View File
@@ -0,0 +1,10 @@
{
"--offset": "0",
"--buffer": "0x00403018",
"--size": "0x2E",
"--procs": "1",
"--names": "{dumpdir}/api_names.txt",
"dump": "api_interception.dmp",
"actual": "visited.txt",
"expected": "api_interception_test_visited.txt"
}