ltrace for Windows x86 by Talomir Mirotal 2022, Botting Technologies 12 Lab.
We are in target process, the modules list: buggy.exe ntdll.dll KERNEL32.DLL KERNELBASE.dll MSVCP140D.dll VCRUNTIME140D.dll ucrtbased.dll EasyHook32.dll PSAPI.DLL ADVAPI32.dll msvcrt.dll sechost.dll RPCRT4.dll ole32.dll ucrtbase.dll combase.dll GDI32.dll win32u.dll gdi32full.dll msvcp_win.dll USER32.dll SHLWAPI.dll IMM32.DLL EasyLoad32.dll mscoree.dll mscoreei.dll kernel.appcore.dll VERSION.dll clr.dll VCRUNTIME140_CLR0400.dll ucrtbase_clr0400.dll mscorlib.ni.dll CRYPTSP.dll rsaenh.dll bcrypt.dll CRYPTBASE.dll bcryptPrimitives.dll clrjit.dll OLEAUT32.dll System.ni.dll shell32.dll windows.storage.dll Wldp.dll SHCORE.dll profapi.dll System.Runtime.Remoting.ni.dll ws2_32.dll mswsock.dll System.Core.ni.dll System.Configuration.ni.dll System.Xml.ni.dll
Trace of program execution...:
UNSAFE CALL: strcpy()
strcpy(0x11530024, "strcpy_source") from ucrtbased.dll
UNSAFE CALL: lstrcpyA()
lstrcpyA(0x11530024, "lstrcpyA_source") from kernel32.dll
UNSAFE CALL: lstrcpyW()
lstrcpyW(0x11527968, "lstrcpyW_source") from kernel32.dll
UNSAFE CALL: wcscpy()
wcscpy(0x11527968, "wcscpy_source") from ucrtbased.dll
UNSAFE CALL: lstrcpynA()
lstrcpynA(0x11530024, "lstrcpynA_source", 1024) from kernel32.dll
UNSAFE CALL: lstrcpynW()
lstrcpynW(0x11527968, "lstrcpynW_source", 1024) from kernel32.dll
UNSAFE CALL: strncpy()
strncpy(0x11530024, "strncpy_source", 1024) from ucrtbased.dll
UNSAFE CALL: wcsncpy()
wcsncpy(0x11527968, "wcsncpy_source", 1024) from ucrtbased.dll
UNSAFE CALL: strcat()
strcat(0x11530024, "strcat_source") from ucrtbased.dll
UNSAFE CALL: wcscat()
wcscat(0x11527968, "wcscat_source") from ucrtbased.dll
UNSAFE CALL: strncat()
strncat(0x11530024, "strncat_source", 1024) from ucrtbased.dll
UNSAFE CALL: wcsncat()
wcsncat(0x11527968, "wcsncat_source", 1024) from ucrtbased.dll
UNSAFE CALL: lstrcatA()
lstrcatA(0x11530024, "lstrcatA_source") from kernel32.dll
UNSAFE CALL: lstrcatW()
lstrcatW(0x11527968, "lstrcatW_source") from kernel32.dll
POTENTIAL UNSAFE CALL: CreateFileA()
CreateFileA("fileA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0) from kernel32.dll
CreateThread(0x0, 0x2000, 0x1981269904, 0x14659048, 0x0000, 0x11518412) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileW()
CreateFileW("C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll", 0x80000000, 0x0005, 0x0, 0x0003, 0x0080, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileW()
CreateFileW("C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll", 0x80000000, 0x0001, 0x0, 0x0003, 0x0080, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingW()
The target process has reported an error:
System.Exception: Выдано исключение типа "System.Exception".
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileW()
CreateFileW("fileW.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateFile2()
CreateFile2("file2.txt", 0x0000, 0x0000, 0x0000, 0x0) from kernel32.dll
POTENTIAL UNSAFE CALL: CreateFileTransactedA()
CreateFileTransactedA("fileTransactedA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x11527956, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileTransactedW()
CreateFileTransactedW("fileTransactedA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x11527956, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileTransactedW()
CreateFileTransactedW("fileTransactedW.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x11527956, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingA()
CreateFileMappingA(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileA") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingW()
CreateFileMappingW(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileW") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingNumaA()
CreateFileMappingNumaA(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileA", 0x1234) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingNumaW()
CreateFileMappingNumaW(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileW", 0x1234) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingFromApp()
CreateFileMappingW(0x0, 0x0, 0x0000, 0x8x8, "fileApp") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkA()
CreateHardLinkA("delete1.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkW()
CreateHardLinkW("delete2.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateSymbolicLinkA()
CreateSymbolicLinkA("delete3.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateSymbolicLinkW()
CreateSymbolicLinkW("delete4.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateSymbolicLinkTransactedA()
CreateSymbolicLinkTransactedA("delete5.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x11527944) from kernel32.dll
UNSAFE CALL: CreateSymbolicLinkTransactedW()
CreateSymbolicLinkTransactedW("delete5.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x11527944) from kernel32.dll
UNSAFE CALL: CreateSymbolicLinkTransactedW()
CreateSymbolicLinkTransactedW("delete6.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x11527944) from kernel32.dll
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedA()
CreateHardLinkTransactedA("delete7.exe", "C:\Windows\System32\calc.exe", 0x0, 0x11527944) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedW()
CreateHardLinkTransactedW("delete7.exe", "C:\Windows\System32\calc.exe", 0x0, 0x11527944) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedW()
CreateHardLinkTransactedW("delete8.exe", "C:\Windows\System32\calc.exe", 0x0, 0x11527944) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateNamedPipeA()
CreateNamedPipeA("\\.\pipe\pipeA", 0x0000, 0x0000, 0x0001, 0x0400, 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateNamedPipeW()
CreateNamedPipeW("\\.\pipe\pipeW", 0x0000, 0x0000, 0x0001, 0x0400, 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
CreatePipe(0x11527932, 0x11527920, 0x0, 0x0400) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotA()
CreateMailslotA("\\.\mailslot\mailslotA", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotW()
CreateMailslotW("\\.\mailslot\mailslotA", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotW()
CreateMailslotW("\\.\mailslot\mailslotW", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
CreateThread(0x11531040, 0x2000, 0x13701240, 0x11531016, 0x0000, 0x11531028) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x11531040 readable
nLength = 12lpSecurityDescriptor Address = 0x8x8 is not redable UNSAFE
Buggy running...
buf=strcpy_source
buf=lstrcpyA_source
lbuf=00AFE720
lbuf=00AFE720
buf=lstrcpynA_source
lbuf=00AFE720
buf=strncpy_source
lbuf=00AFE720
buf=strcat_source
lbuf=00AFE720
buf=strcat_sourcestrncat_source
lbuf=00AFE720
buf=strcat_sourcestrncat_sourcelstrcatA_source
lbuf=00AFE720
thread id = 7144
Press q enter...UNSAFE CALL: strcpy()
strcpy(0x97057108, "strcpy_source") from ucrtbased.dll
UNSAFE CALL: lstrcpyA()
lstrcpyA(0x97057108, "lstrcpyA_source") from kernel32.dll
UNSAFE CALL: lstrcpyW()
lstrcpyW(0x97055052, "lstrcpyW_source") from kernel32.dll
UNSAFE CALL: wcscpy()
wcscpy(0x97055052, "wcscpy_source") from ucrtbased.dll
UNSAFE CALL: lstrcpynA()
lstrcpynA(0x97057108, "lstrcpynA_source", 1024) from kernel32.dll
UNSAFE CALL: lstrcpynW()
lstrcpynW(0x97055052, "lstrcpynW_source", 1024) from kernel32.dll
UNSAFE CALL: strncpy()
strncpy(0x97057108, "strncpy_source", 1024) from ucrtbased.dll
UNSAFE CALL: wcsncpy()
wcsncpy(0x97055052, "wcsncpy_source", 1024) from ucrtbased.dll
UNSAFE CALL: strcat()
strcat(0x97057108, "strcat_source") from ucrtbased.dll
UNSAFE CALL: wcscat()
wcscat(0x97055052, "wcscat_source") from ucrtbased.dll
UNSAFE CALL: strncat()
strncat(0x97057108, "strncat_source", 1024) from ucrtbased.dll
UNSAFE CALL: wcsncat()
wcsncat(0x97055052, "wcsncat_source", 1024) from ucrtbased.dll
UNSAFE CALL: lstrcatA()
lstrcatA(0x97057108, "lstrcatA_source") from kernel32.dll
UNSAFE CALL: lstrcatW()
lstrcatW(0x97055052, "lstrcatW_source") from kernel32.dll
POTENTIAL UNSAFE CALL: CreateFileA()
CreateFileA("fileA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileW()
CreateFileW("fileW.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateFile2()
CreateFile2("file2.txt", 0x0000, 0x0000, 0x0000, 0x0) from kernel32.dll
POTENTIAL UNSAFE CALL: CreateFileTransactedA()
CreateFileTransactedA("fileTransactedA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x97055040, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileTransactedW()
CreateFileTransactedW("fileTransactedA.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x97055040, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileTransactedW()
CreateFileTransactedW("fileTransactedW.txt", 0x0000, 0x0000, 0x0, 0x0000, 0x0000, 0x0, 0x0, 0x97055040, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingA()
CreateFileMappingA(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileA") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingW()
CreateFileMappingW(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileW") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingNumaA()
CreateFileMappingNumaA(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileA", 0x1234) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingNumaW()
CreateFileMappingNumaW(0x0, 0x0, 0x0000, 0x0001, 0x0001, "fileW", 0x1234) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateFileMappingFromApp()
CreateFileMappingW(0x0, 0x0, 0x0000, 0x8x8, "fileApp") from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkA()
CreateHardLinkA("delete1.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkW()
CreateHardLinkW("delete2.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateSymbolicLinkA()
CreateSymbolicLinkA("delete3.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateSymbolicLinkW()
CreateSymbolicLinkW("delete4.exe", "C:\Windows\System32\calc.exe", 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateSymbolicLinkTransactedA()
CreateSymbolicLinkTransactedA("delete5.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x97055028) from kernel32.dll
UNSAFE CALL: CreateSymbolicLinkTransactedW()
CreateSymbolicLinkTransactedW("delete5.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x97055028) from kernel32.dll
UNSAFE CALL: CreateSymbolicLinkTransactedW()
CreateSymbolicLinkTransactedW("delete6.exe", "C:\Windows\System32\calc.exe", 0x0000, 0x97055028) from kernel32.dll
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedA()
CreateHardLinkTransactedA("delete7.exe", "C:\Windows\System32\calc.exe", 0x0, 0x97055028) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedW()
CreateHardLinkTransactedW("delete7.exe", "C:\Windows\System32\calc.exe", 0x0, 0x97055028) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateHardLinkTransactedW()
CreateHardLinkTransactedW("delete8.exe", "C:\Windows\System32\calc.exe", 0x0, 0x97055028) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateNamedPipeA()
CreateNamedPipeA("\\.\pipe\pipeA", 0x0000, 0x0000, 0x0001, 0x0400, 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
UNSAFE CALL: CreateNamedPipeW()
CreateNamedPipeW("\\.\pipe\pipeW", 0x0000, 0x0000, 0x0001, 0x0400, 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
CreatePipe(0x97055016, 0x97055004, 0x0, 0x0400) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotA()
CreateMailslotA("\\.\mailslot\mailslotA", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotW()
CreateMailslotW("\\.\mailslot\mailslotA", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
POTENTIAL UNSAFE CALL: CreateMailslotW()
CreateMailslotW("\\.\mailslot\mailslotW", 0x0400, 0x01f4, 0x0) from kernel32.dll
LPSECURITY_ATTRIBUTES analyses:
Address 0x0 is not readable: UNSAFE
buf=strcpy_source
buf=lstrcpyA_source
lbuf=05C8F14C
lbuf=05C8F14C
buf=lstrcpynA_source
lbuf=05C8F14C
buf=strncpy_source
lbuf=05C8F14C
buf=strcat_source
lbuf=05C8F14C
buf=strcat_sourcestrncat_source
lbuf=05C8F14C
buf=strcat_sourcestrncat_sourcelstrcatA_source
lbuf=05C8F14C
Buggy finished...