Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- NumPy Unicode Error
- Injection
- ecma
- debugging
- pytest
- Python
- error fix
- idb2pat
- TensorFlow
- ida
- idapython
- why error
- commandline
- idapro
- mock.patch
- Analysis
- h5py.File
- open office xml
- javascript
- Rat
- ida pro
- error
- malware
- MySQL
- x64
- 포인터 매핑
- data distribution
- hex-rays
- svn update
- Ransomware
Archives
- Today
- Total
13 Security Lab
System 권한여부체크 [1] 본문
System 권한여부체크
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | signed int __thiscall Check_ProcessSID(void *this) { Flag = 0; hToken = 0; if ( OpenProcessToken(this, 8, &hToken) ) { v5 = 0x44; if ( CreateWellKnownSid(22, 0, &SystemSID_INFO, &v5) )// 22 : WinLocalSystemSid { v7 = 0; GetTokenInformation(hToken, 1, 0); if ( GetLastError() == 122 ) { LocalMem_Var = HeapAlloc(dword_405048); // Get local HeapMemory if ( LocalMem_Var ) { // Get LocalMem_SID & Compare with SystemSID if ( GetTokenInformation(hToken, 1, LocalMem_Var) && EqualSid(*(_DWORD *)LocalMem_Var, &SystemSID_INFO) ) Flag = 1; HeapFree(dword_405048, 0, LocalMem_Var); } } } CloseHandle(hToken); } return Flag; } |
Comments