Advertisement
lcr999x

SQLi Tips 1

Sep 4th, 2023
1,191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.07 KB | Cybersecurity | 0 0
  1. Bug Bounty Tip:
  2. This is how I discovered multiple SQL injection vulnerabilities
  3. While manually testing for XSS bug, I came across an SQL error by simply adding single and double quotes ( ' " ) at the end of the URL. Intrigued by this, I collected all the URLs from the Wayback Machine using the waybackurls tool and saved them into a text file. Using a one-liner, I tested a list of 10k URLs and ended up with some cool SQL vulnerabilities.
  4. SQLi Oneliner:
  5. Using curl :
  6. cat urls.txt | grep ".php" | sed 's/\.php.*/.php\//' | sort -u | sed s/$/%27%22%60/ | while read url do ; do curl --silent "$url" | grep -qs "You have an error in your SQL syntax" && echo -e "$url \e[1;32mVulnerable\e[0m" || echo -e "$url \e[1;31mNot Vulnerable\e[0m"
  7. ========================
  8. Using httpx tool :
  9. cat urls.txt | grep ".php" | sed 's/\.php.*/.php\//' | sort -u | sed s/$/%27%22%60/ | httpx -silent -ms "You have an error in your SQL syntax"
  10. Tip : Use SQLmap for further check
  11. Tools:
  12. waybackurls
  13. httpx
  14. SQLmap
  15. Source : https://www.linkedin.com/feed/update/urn:li:activity:7103089670372114435
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement