当前位置:网站首页>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

边栏推荐
- Attackg: constructing technical knowledge graph from cyber thread intelligence reports
- Genesis公链与美国一众加密投资者齐聚Consensus 2022
- vulnhub DC: 2
- 【WSL】SSH 远程连接及宿主机端口转发配置
- Certificate photo processing
- LeetCode Algorithm 剑指 Offer II 027. 回文链表
- 别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!
- 使用Aggregated APIServer扩展你的kubernetes API
- NIO、BIO、AIO
- Environment configuration | vs2017 configuring openmesh source code and environment
猜你喜欢

Programmers become gods by digging holes in one year, carrying flags in five years and becoming gods in ten years

Docker 安装 MySQL 8.0,详细步骤

Yyds dry goods inventory junit5 learning II: assumptions class

NiO zero copy

Power system | IEEE paper submission process

Online filing process

Huada 04A operating mode / low power consumption mode

Technology Review: what is the evolution route of container technology? What imagination space is there in the future?

环境配置 | VS2017配置OpenMesh源码和环境

【ROS玩转Turtlesim小海龟】
随机推荐
【软件工程】期末重点
Analyze the implementation process of oauth2 distributed authentication and authorization based on the source code
Database transaction Transanction
The difference between get and post
结合源码剖析Oauth2分布式认证与授权的实现流程
Unable to use the bean introduced into the jar package
Leetcode algorithm refers to offer II 027 Palindrome linked list
Cross border e-commerce, early entry and early benefit
Why can some programmers get good offers with average ability?
Dynamic memory management (1)
网上立案流程
find your present (2)
AQS源码分析
别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!
How to compare two or more distributions: a summary of methods from visualization to statistical testing
机器学习编译入门课程学习笔记第一讲 机器学习编译概述
Data communication and physical network
Nuscenes -- remedies for missing image files or 0-size images encountered during dataset configuration
2022年高处安装、维护、拆除考试模拟100题及模拟考试
[QT] QT event handling