Tryhackme-hackerNote

hackerNote

Task1 Reconnaissance

image-20210902102428380

1.Which ports are open? (in numerical order)

22,80,8080

2.What programming language is the backend written in?

Go

Task2 Investigate

1.Create your own user account

2.Log in to your account

3.Try and log in to an invalid user account

4.Try and log in to your account, with an incorrect password

5.Notice the timing difference. This allows user enumeration

当账户存在时服务器响应时间延迟,当账户不存在时服务器响应快速,可以根据服务器响应时间的不同枚举账户是否存在。–漏洞产生原因:服务器仅在收到正确的用户名时尝试验证用户密码

image-20210902111736042

Task3 Exploit

1.Try to write a script to perform a timing attack

https://github.com/NinjaJc01/hackerNoteExploits

2.How many usernames from the list are valid?

1

3.What are/is the valid username(s)?

james

Time delta: 0.8617863655090332 seconds
james is likely to be valid

Task4 Attack Passwords

image-20210902131925735

1.Form the hydra command to attack the login API route

hydra -l james -P wordlist.txt 10.10.163.35 http-post-form "/api/user/login:username:USER,password=PASS:Invalid Username Or Password

2.How many passwords were in your wordlist?

180

combinator.exe colors.txt numbers.txt > wordlist.txt

3.What was the user’s password?

blue7

hydra -l james -P wordlist.txt 10.10.163.35 http-post-form "/api/user/login:username:^USER^,password=^PASS^:Invalid Username Or Password"

image-20210902134136993

4.Login as the user to the platform

5.What’s the user’s SSH password?

dak4ddb37b

image-20210902134421328

6.Log in as the user to SSH with the credentials you have

7.What’s the user flag?

thm{56911bd7ba1371a3221478aa5c094d68}

image-20210902134631343

Task5 Escalate

运行sudo -l查看当前用户可以root权限运行哪些程序,当前用户无法以root权限运行任何程序

image-20210902134748192

1.What is the CVE number for the exploit?

CVE-2019-18634

sudo提权漏洞–CVE-2019-18634

利用要求:1.sudo版本在1.8.26之前 2.启用pwfeedback选项

如果pwfeedback配置选项在/etc/sudoers被启用,攻击者可以利用一个bss段溢出漏洞来获取root权限。 pwfeedback配置选项在多数的Linux系统中都不是默认选项,但是在Linux Mint操作系统和Elementary OS上是默认开启的,因此漏洞的危害比较大,攻击者需要向getln传递一个超长字符串来触发攻击。

NVD - CVE-2019-18634 (nist.gov)

2.Find the exploit from https://github.com/saleemrashid/ and download the files.

3.Compile the exploit from Kali linux.

image-20210902142040888

4.SCP the exploit binary to the box

5.Run the exploit, get root

image-20210902142306891

6.What is the root flag?

thm{af55ada6c2445446eb0606b5a2d3a4d2}

image-20210902142334300

Task6 Comments on realism and Further Reading

Read, explore, learn.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值