Skip to content

Mscay/taskanhTung

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 

Repository files navigation

taskanhTung

Introductory Researching

Task 2 - Example Research Question

In the Burp Suite Program that ships with Kali Linux, what mode would you use to manually send a request (often repeating a captured request numerous times)?

cau1

What hash format are modern Windows login passwords stored in?

cau2

What are automated tasks called in Linux?

cau3

What number base could you use as a shorthand for base 2 (binary)?

cau4

If a password hash starts with $6$, what format is it (Unix variant)?

cau5

Task 3 - Vulnerability Searching

What is the CVE for the 2020 Cross-Site Scripting (XSS) vulnerability found in WPForms?

cau1

There was a Local Privilege Escalation vulnerability found in the Debian version of Apache Tomcat, back in 2016. What's the CVE for this vulnerability?

cau2

What is the very first CVE found in the VLC media player?

cau3

If you wanted to exploit a 2020 buffer overflow in the sudo program, which CVE would you use?

cau4

Task 4 - Manual Pages

SCP is a tool used to copy files from one computer to another. What switch would you use to copy an entire directory?

cau1

fdisk is a command used to view and alter the partitioning scheme used on your hard drive. What switch would you use to list the current partitions?

cau2

nano is an easy-to-use text editor for Linux. There are arguably better editors (Vim, being the obvious choice); however, nano is a great one to start with. What switch would you use to make a backup when opening a file with nano?

cau3

Netcat is a basic tool used to manually send and receive network requests. What command would you use to start netcat in listen mode, using port 12345?

cau4

linuxfundamentalspart1

Task 2 - A Bit of Background on Linux

Research: What year was the first release of a Linux operating system?

cau1

Task 4 - Running Your First few Commands

If we wanted to output the text "TryHackMe", what would our command be?

and

What is the username of who you're logged in as on your deployed Linux machine?

cau1va2

Task 5 - Interacting With the Filesystem!

On the Linux machine that you deploy, how many folders are there?

Screenshot_20230218_041236

image

Which directory contains a file?

thử lệnh "ls" cho cả 4 folders, xem folder nào chứa file. image

What is the contents of this file?

Dùng lệnh "cat folder4/note.txt" để chuyển sang folder4 và đọc file note.txt trong folder4. Screenshot_20230218_041703

image

Use the cd command to navigate to this file and find out the new current working directory. What is the path?

Nhập lệnh "cd folder4" để chuyển sang folder4 và dùng lệnh "pwd" để xem đường dẫn. image

image

Task 6 - Searching for Files

Use grep on "access.log" to find the flag that has a prefix of "THM". What is the flag?

Screenshot_20230216_041308

Task 7 - An Introduction to Shell Operators

Screenshot_20230216_041558

linuxfundamentalspart2

Task 3 - Introduction to Flags and Switches

What directional arrow key would we use to navigate down the manual page?

Nhập "man ls" trên terminal sau đó thử dùng các nút điều hướng -> câu trả lời là "down".

What flag would we use to display the output in a "human-readable" way?

Nhập "man ls" sau đó lướt xuống để tìm trong phần "DESCRIPTION". Screenshot_20230217_045234

Task 4 - Filesystem Interaction Continued

How would you create the file named "newnote"?

image

On the deployable machine, what is the file type of "unknown1" in "tryhackme's" home directory?

Nhập lệnh "file unknown1" trong attackbox để xác định kiểu file. image

How would we move the file "myfile" to the directory "myfolder"

image

What are the contents of this file?

Nhập lệnh "cat myfile" để đọc nội dung file myfile. image

Task 5 - Permissions 101

On the deployable machine, who is the owner of "important"?

Nhập lệnh "ls -al".

image

What would the command be to switch to the user "user2"?

Screenshot_20230217_071345

Output the contents of "important", what is the flag?

Nhập lệnh "cat important" để xem nội dung trong important image

Task 6 - Common Directories

What is the directory path that would we expect logs to be stored in?

image

What root directory is similar to how RAM on a computer works?

This is a unique root directory found on a Linux install. Short for "temporary", the /tmp directory is volatile and is used to store data that is only needed to be accessed once or twice. Similar to the memory on your computer, once the computer is restarted, the contents of this folder are cleared out.

image

Name the home directory of the root user

the /root folder is actually the home for the "root" system user

image

linuxfundamentalspart3

Task 3 - Terminal Text Editors

Edit "task3" located in "tryhackme"'s home directory using Nano. What is the flag?

Nhập lệnh "nano task3"

image

Task 4 - General/Useful Utilities

Download the file http://MACHINE_IP:8000/.flag.txt onto the TryHackMe AttackBox. What are the contents?

Nhập lệnh "wget http://MACHINE_IP:8000/.flag.txt" để tải file .flag.txt. Screenshot_20230218_023329

Sau đó dùng lệnh "cat .flag.txt" để xem nội dung trong file Screenshot_20230218_023429

Screenshot_20230218_024024

Task 5 - Processes 101

If we were to launch a process where the previous ID was "300", what would the ID of this new process be?

The PID increments for the order In which the process starts. I.e. the 60th process will have a PID of 60. Screenshot_20230218_030157

If we wanted to cleanly kill a process, what signal would we send it?

Screenshot_20230218_030417

Locate the process that is running on the deployed instance (MACHINE_IP). What flag is given?

Nhập lệnh "ps aux", enter, sau đó tìm flag. Screenshot_20230218_030625

image

What command would we use to stop the service "myservice"?

Screenshot_20230218_031049

What command would we use to start the same service on the boot-up of the system?

Screenshot_20230218_031319

What command would we use to bring a previously backgrounded process back to the foreground?

Screenshot_20230218_031439

Task 6 - Maintaining Your System: Automation

When will the crontab on the deployed instance (MACHINE_IP) run?

Nhập lệnh "crontab -e", enter Screenshot_20230218_034316

image

Task 7 - Maintaining Your System: Package Management

Task 8 - Maintaining Your System: Logs

What is the IP address of the user who visited the site?

Đầu tiên nhập lệnh "cd /var/log" để chuyến đến thư mục log.

Sau đó nhập lệnh "ls" để xem list các mục trong thư mục, tìm mục apache2. Screenshot_20230218_035634

Nhập lệnh "cd apache2" để vào thư mục này và tiếp tục nhập "ls" để xem danh sách file. Vì user ở đây là tryhackme nên cần để ý đến dòng thứ 2 trong bảng, nó thuộc file access.log.1

Dùng lệnh "cat access.log.1" để đọc nôi dung của file, sẽ thấy phần ip ở đầu tiên.

Screenshot_20230218_040102

image

What file did they access?

Phần được bôi đen chính là file đã được truy cập.

Screenshot_20230218_040736

image

googledorking

Task 2 - Let's Learn About Crawlers

Name the key term of what a "Crawler" is used to do

The diagram below is a high-level abstraction of how these web crawlers work. Once a web crawler discovers a domain such as mywebsite.com, it will index the entire contents of the domain, looking for keywords and other miscellaneous information

image

What is the name of the technique that "Search Engines" use to retrieve this information about websites?

image

image

What is an example of the type of contents that could be gathered from a website?

image

image

Task 3 - Enter: Search Engine Optimisation

Task 4 - Beepboop - Robots.txt

Where would "robots.txt" be located on the domain "ablog.com"

image

If a website was to have a sitemap, where would that be located?

Dựa theo những ảnh chụp trong phần lý thuyết image

image

How would we only allow "Bingbot" to index the website?

image

How would we prevent a "Crawler" from indexing the directory "/dont-index-me/"?

image

What is the extension of a Unix/Linux system configuration file that we might want to hide from "Crawlers"?

Dựa vào tên file cấu hình "configuration" và hint "system files are usually 3/4 characters!" image

Task 5 - Sitemaps

What is the typical file structure of a "Sitemap"?

“Sitemaps” are XML formatted

What real life example can "Sitemaps" be compared to?

Comparable to geographical maps in real life, “Sitemaps” are just that - but for websites!

Name the keyword for the path taken for content on a website

he blue rectangles represent the route to nested-content, similar to a directory I.e. “Products” for a store image

Task 6 - What is Google Dorking?

What would be the format used to query the site bbc.co.uk about flood defences

image

What term would you use to search by file type?

image

What term can we use to look for login pages?

Vì là trang login nên phải có "login" trong tiêu đề của trang -> dùng term "intitle" image

ohsint

Task 1 - OHSINT

What is this users avatar of?

Đầu tiên là tải file task, sau đó dùng exiftool để xem thông tin về file ảnh vừa tải

image

Chú ý phần copyright "OWoodflint", tra gg OWoodflint thì ra 1 trang twitter

image

Thấy avatar là 1 con mèo -> câu trả lời là cat image

What city is this person in?

Đọc bài tweet thấy có 1 bài như sau:

image

Dưới phần bình luận có 1 đoạn mã base64

image

Sau khi giải mã đoạn code trên thì nhận được "Give wigle.net a try", tra gg wigle.net. image

Paste "B4:5D:50:AA:86:41" vào phần BSSID/MAC: rồi chọn "view basic" và tìm chấm màu tím như hình -> câu trả lời là london. image

Whats the SSID of the WAP he connected to?

Phóng to điểm màu tím sẽ ra tên wifi image

image

What is his personal email address?

Lướt xem phần comment sẽ thấy có 1 comment email

image

image

What site did you find his email address on?

Tra gg email sẽ thấy có 3 trang: wordpress, twitter và github. Vào từng trang một thì sẽ thấy email trong trang github: image

image

Where has he gone on holiday?

Trong wordpress đã nói rằng ông này đang ở new york:

image

image

What is this persons password?

Vào trang wordpress thì sẽ không thấy gì đặc biệt, nhưng khi bôi đen hết các dòng chữ thì sẽ hiện ra 1 dòng kí tự được viết bằng màu trắng: "pennYDr0pper.!" Screenshot_20230218_060857

image

shodan

Task 2 - Filters

How do we find Eternal Blue exploits on Shodan?

Let’s say we want to find IP addresses vulnerable to Eternal Blue:

vuln:ms17-010

image

Task 3 - Google & Filtering

What is the top operating system for MYSQL servers in Google's ASN?

Đầu tiên, Tra gg tìm google's asn (AS15169).

TRa trên shodan "ASN:AS15169 product:MySQL", nhưng mà nó không ra nên phải dùng hint thôi chứ em hết cách rồi. Screenshot_20230219_023933

Screenshot_20230219_024037

What is the 2nd most popular country for MYSQL servers in Google's ASN?

Ở vị trí thứ hai là "netherland" Screenshot_20230219_024109

Under Google's ASN, which is more popular for nginx, Hypertext Transfer Protocol or Hypertext Transfer Protocol with SSL?

Dựa vào format answer thì ra được câu trả lời là "Hypertext Transfer Protocol". image

Under Google's ASN, what is the most popular city?

Vì US là nước đừng đầu trong top countries nên tra trên shodan thêm phần country "ASN:AS15169 product:MySQL country:"US"" image

Mặc dù "Council Bluffs" là nước đứng đầu, tuy nhiên điền vào phần đáp án lại không được. Thử dến "Los Angeles" rồi đến "Mountain view" thì mới được. image

Under Google's ASN in Los Angeles, what is the top operating system according to Shodan?

Tra "ASN:AS15169 product:MySQL country:"US" city:"Los Angeles"" trên Shodan, nhưng lại không có kết quả.

Screenshot_20230219_030444

Nên vẫn dùng kết quả của hint

image

Using the top Webcam search from the explore page, does Google's ASN have any webcams? Yay / nay.

Tra trên Shodan "ASN:AS15169 tags:webcam" và không có webcam nào image

image

Task 4 - Shodan Monitor

What URL takes you to Shodan Monitor?

image

Task 5 - Shodan Dorking

What dork lets us find PCs infected by Ransomware?

image

Intro to Digital Forensics

Task 1 - Introduction To Digital Forensics

Screenshot_20230219_034242

Task 2 - Digital Forensics Process

It is essential to keep track of who is handling it at any point in time to ensure that evidence is admissible in the court of law. What is the name of the documentation that would help establish that?

Chain of custody: This is necessary to keep track of who was holding the evidence at any time.

Screenshot_20230219_035204

Task 3 - Practical Example of Digital Forensics

Using pdfinfo, find out the author of the attached PDF file.

image

Thấy phần "author" là "Ann Gree Shepherd"

image

Using exiftool or any similar tool, try to find where the kidnappers took the image they attached to their document. What is the name of the street?

Dùng lệnh "exiftool letter-image.jpg" trong ubuntu

image

Chú ý phần GPS lattitude, longitude và position. chuyển đổi sang dạng decimal để tra gg map.

image

image

Đây là thông tin thu được khi tra gg map

image

Phần vị trí ở khung bên trái, thấy tên con phố là "milk street".

image

What is the model name of the camera used to take this photo?

chú ý dòng "Camera model name". Screenshot_20230220_112507

image

Windows Fundamentals 1

Task 2 - Windows Editions

What encryption can you enable on Pro that you can't enable in Home?

image

So sánh giữa 2 bản thì thấy phần Bitlocker device encryption có bên bản pro còn home thì không.

image

Task 3 - The Desktop (GUI)

image

Task 4 - The file system

image

Task 5 - The Windows\System32 Folders

image

Task 6 - User Accounts, Profiles, and Permissions

Đã được anh Tùng hướng dẫn và không giải thích gì thêm

image

Task 7 - User Account Control

image

Task 8 - Settings and the Control Panel

Không phải cái cuối thì thử cái gần cuối.

Screenshot_20230221_113926

image

Task 9 - Task Manager

Tra gg "keyboard shortcut task manager"

image

Volatility

Task 2 - Obtaining Memory Samples

image

Những thông tin để làm những câu này đều có ở phần lý thuyết

What memory format is the most common?

The .raw format is one of the most common memory file types you will see in the wild.

The Window's system we're looking to perform memory forensics on was turned off by mistake. What file contains a compressed memory image?

hiberfil.sys, better known as the Windows hibernation file contains a compressed memory image from the previous boot.

How about if we wanted to perform memory forensics on a VMware-based virtual machine?

VMware - .vmem file

Task 3 - Examining Our Patient

Running the imageinfo command in Volatility will provide us with a number of profiles we can test with, however, only one will be correct. We can test these profiles using the pslist command, validating our profile selection by the sheer number of returned results. Do this now with the command volatility -f MEMORY_FILE.raw --profile=PROFILE pslist. What profile is correct for this memory image?

Chạy dòng lệnh "vol.py -f cridex.vmem imageinfo" để xem thông tin những profile cần sử dụng.

Screenshot_20230221_013450

Ở phần suggested profile có 2 cái là WinXPSP2x86 và WinXPSP3x86, thử đáp án thì câu trả lời là: WinXPSP2x86

image

Take a look through the processes within our image. What is the process ID for the smss.exe process? If results are scrolling off-screen, try piping your output into less

Chạy dòng lệnh "vol.py -f cridex.vmem --profile=WinXPSP2x86 pslist" để xem processes.

image

Nhìn ở dòng cuối trong hình thì thấy được process ID (PID) của smss.exe process là 368

image

It's fairly common for malware to attempt to hide itself and the process associated with it. That being said, we can view intentionally hidden processes via the command psxview. What process has only one 'False' listed?

Chạy dòng lệnh "vol.py -f cridex.vmem --profile=WinXPSP2x86 psxview" để xem những processes bị cố ý giấu đi.

image

Và thấy rằng chỉ có phần csrss.exe là có duy nhất 1 cái false.

image

In addition to viewing hidden processes via psxview, we can also check this with a greater focus via the command 'ldrmodules'. Three columns will appear here in the middle, InLoad, InInit, InMem. If any of these are false, that module has likely been injected which is a really bad thing. On a normal system the grep statement above should return no output. Which process has all three columns listed as 'False' (other than System)?

Chạy dòng lệnh "vol.py -f cridex.vmem --profile=WinXPSP2x86 ldrmodules". Ngoài system thì chỉ có csrss.exe là có cả 3 cột đều false.

image

Note: em lỡ nhập thêm "ds" ngay sau khi submit nên không sửa lại được nữa, chứ câu trả lời là : "csrss.exe".

image

Injected code can be a huge issue and is highly indicative of very very bad things. We can check for this with the command malfind. Using the full command volatility -f MEMORY_FILE.raw --profile=PROFILE malfind -D <Destination Directory> we can not only find this code, but also dump it to our specified directory. Let's do this now! We'll use this dump later for more analysis. How many files does this generate?

Tạo 1 thư mục tên là "tmp" sau đó chạy lệnh " vol.py -f cridexmemdump/cridex.vmem --profile=WinXPSP2x86 malfind -D ./tmp".

Mở thư mục tmp ra thì thấy có 12 items

image

Now that we've seen all of the DLLs running in memory, let's go a step further and pull them out! Do this now with the command volatility -f MEMORY_FILE.raw --profile=PROFILE --pid=PID dlldump -D <Destination Directory> where the PID is the process ID of the infected process we identified earlier (questions five and six). How many DLLs does this end up pulling?

Tạo thư mục "tmp2" sau đó chạy lệnh "vol.py -f cridexmemdump/cridex.vmem --profile=WinXPSP2x86 --pid=584 dlldump -D ./tmp2".

Mở thư mục tmp 2 ra thì có 12 items

image

Task 4 - Post Actions

image

Tra gg thì biết được cridex là malware.

image

Redline

Task 1 - Introduction

image

Task 2 - Data Collection

What data collection method takes the least amount of time?

Standard Collector - this method configures the script to gather a minimum amount of data for the analysis. This is going to be our preferred method to collect data in this room. It is also usually the fastest method to collect the data you need. It takes only a few minutes to complete.

image

You are reading a research paper on a new strain of ransomware. You want to run the data collection on your computer based on the patterns provided, such as domains, hashes, IP addresses, filenames, etc. What method would you choose to run a granular data collection against the known indicators?

IOC Search Collector (Windows only) - this method collects data that matches with the Indicators of Compromise (IOCs) that you created with the help of IOC Editor. You will choose this method if you want to run the data collection against known IOCs that you have gathered either through threat intelligence (data feed or narrative report), incident response, or malware analysis. You imported them into IOC Editor. We'll look at the IOC Editor a bit further in the next task.

image

What script would you run to initiate the data collection process? Please include the file extension.

image

Cả extention sẽ là "RunRedlineAudit.bat"

image

If you want to collect the data on Disks and Volumes, under which option can you find it?

image

image

What cache does Windows use to maintain a preference for recently executed code?

Cái này tra gg là ra.

image

Task 3 - The Redline Interface

image

System Information: this is where you will see the information about the machine, BIOS (Windows only), operating system, and user information.

Task 4 - Standard Collector Analysis

Provide the Operating System detected for the workstation.

image

Vào phần system information tab và cuộn xuống thì sẽ thấy

Provide the BIOS Version for the workstation.

image

Vẫn ở trong phần system information đó

image

What is the suspicious scheduled task that got created on the victim's computer?

Vào phần task và tìm cái tên khả nghi image

image

Find the message that the intruder left for you in the task.

Đọc phần comment của ảnh phía trên (trong phần task), comment đó chính là message cần tìm.

image

There is a new System Event ID created by an intruder with the source name "THM-Redline-User" and the Type "ERROR". Find the Event ID #.

Vào phần Event Logs và tra "THM-Redline-User" sẽ thấy được file cần tìm có type "error".

image

Để ý thấy EID là 546.

image

Provide the message for the Event ID.

Vẫn ảnh câu phía trên, để ý phần message

image

It looks like the intruder downloaded a file containing the flag for Question 8. Provide the full URL of the website.

Vào phần File download history và tìm file nào đó có vẻ ám muội thì tìm được file có tên là flag.txt

Dòng ở cột source URL là câu trả lời

image

Provide the full path to where the file was downloaded to including the filename.

Vẫn ở phần File download history copy phần Target directory và thêm \flag.txt.

image

Provide the message the intruder left for you in the file.

Mở file flag.txt đó ra thì nhận được "THM{600D-C@7cH-My-FR1EnD}" và đây là câu trả lời

image

Task 5 - IOC Search Collector

What is the actual filename of the Keylogger?

image

image

What filename is the file masquerading as?

image

Thấy phần owner đều giống nhau nên thử từng file một

image

Who is the owner of the file?

Như ảnh phía trên, chú ý phần owner

image

What is the file size in bytes?

Nhìn cột size in bytes

image

Provide the full path of where the .ioc file was placed after the Redline analysis, include the .ioc filename as well

image

Task 6 - IOC Search Collector Analysis

Provide the path of the file that matched all the artifacts along with the filename.

image

answer: C:\Users\Administrator\AppData\Local\Temp\8eJv8w2id6lqN85dfC.exe

Provide the path where the file is located without including the filename.

Như câu trên, chỉ cần bỏ tên file ở cuối

image

Who is the owner of the file?

Ở hình phía trên có cột owner

image

Provide the subsystem for the file.

nhấn chuột vào detail và sẽ thấy subsystem

image

image

Provide the Device Path where the file is located

Ở ảnh phía trên cũng có thể thấy device path

image

Provide the hash (SHA-256) for the file.

image

Vào windows powershell và nhập lệnh "Get-FileHash"

image

The attacker managed to masquerade the real filename. Can you find it having the hash in your arsenal?

Search hash trong VirusTotal:

image

image

Task 7 - Endpoint Investigation

Can you identify the product name of the machine?

Vào phần system information và chú ý phần product name

image

Can you find the name of the note left on the Desktop for the "Charles"?

image

Find the Windows Defender service; what is the name of its service DLL?

image

The user manually downloaded a zip file from the web. Can you find the filename?

image

Provide the filename of the malicious executable that got dropped on the user's Desktop.

image

Provide the MD5 hash for the dropped malicious executable.

image

What is the name of the ransomware?

image

Disk Analysis & Autopsy

Tasl 1 - Windows 10 Disk Image

What is the MD5 hash of the E01 image?

image

Vào phần data source, sau đó chọn file HASAN2.E01 và chọn file metadata sẽ thấy dòng MD5

image

What is the computer account name?

image

Đẩu tiền chọn operating system information, rồi chọn SYSTEM là sẽ thấy tên

image

List all the user accounts. (alphabetical order)

image

Đầu tiên chọn operating system user account, kéo sang bên phải sẽ thấy cột user name, nhập tên theo thứ tự chữ cái là ra đáp án.

image

Who was the last user to log into the computer?

image

Chú ý cột date accessed, người cuối cùng là sivapriya

image

What was the IP address of the computer?

Data Sources > HASAN2.E01 > Vol3 > Program Files (x86) > Look@LAN > irunin.ini

image

image

What was the MAC address of the computer? (XX-XX-XX-XX-XX-XX)

Vẫn có thể tìm được trong irunin.ini

image

What is the name of the network card on this computer?

Chọn Operating System Information, chọn software rồi browse path này "ROOT/Microsoft/Windows NT/CurrentVersion/NetworkCards/2"

image

What is the name of the network monitoring tool?

Vào phần nstalled Programs sau đó chú ý phần Program name

image

A user bookmarked a Google Maps location. What are the coordinates of the location?

Vào phần web bookmarks, chú ý phần title

image

A user has his full name printed on his desktop wallpaper. What is the user's full name?

Vào phần Images/Video, chọn downloads, chọn bức ảnh, chuột phải -> export

image

A user had a file on her desktop. It had a flag but she changed the flag using PowerShell. What was the first flag?

image

The same user found an exploit to escalate privileges on the computer. What was the message to the device owner?

image

2 hack tools focused on passwords were found in the system. What are the names of these tools? (alphabetical order)

image

There is a YARA file on the computer. Inspect the file. What is the name of the author?

image

One of the users wanted to exploit a domain controller with an MS-NRPC based exploit. What is the filename of the archive that you found? (include the spaces in your answer)

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors