티스토리 뷰
해당 문제는 CyberDefenders의 Web Investigation 문제에 대한 풀이입니다.
1. Challenge description
You are a cybersecurity analyst working in the Security Operations Center (SOC) of BookWorld, an expansive online bookstore renowned for its vast selection of literature. BookWorld prides itself on providing a seamless and secure shopping experience for book enthusiasts around the globe. Recently, you've been tasked with reinforcing the company's cybersecurity posture, monitoring network traffic, and ensuring that the digital environment remains safe from threats.
Late one evening, an automated alert is triggered by an unusual spike in database queries and server resource usage, indicating potential malicious activity. This anomaly raises concerns about the integrity of BookWorld's customer data and internal systems, prompting an immediate and thorough investigation.
As the lead analyst on this case, you are required to analyze the network traffic to uncover the nature of the suspicious activity. Your objectives include identifying the attack vector, assessing the scope of any potential data breach, and determining if the attacker gained further access to BookWorld's internal systems.
Q1.
By knowing the attacker's IP, we can analyze all logs and actions related to that IP and determine the extent of the attack, the duration of the attack, and the techniques used. Can you provide the attacker's IP?
해당 문제에서 주어진 패킷을 열어서 살펴보다가 아래와 같이 이상한 패킷을 주고 받는 것이 보였다.
그래서 statistics의 conversatinons에서 통계를 확인해보니 위 사진에서의 ip와 통신량이 월등히 많았다.
그래서 1번의 답은 111.224.250.131이다.
Q2.
If the geographical origin of an IP address is known to be from a region that has no business or expected traffic with our network, this can be an indicator of a targeted attack. Can you determine the origin city of the attacker?
해당 질문은 아주 쉽게 답할 수 있을 것 같다. ip를 추적하는 사이트에 해당 공격자 ip를 검색하면 위치정보가 나온다.
Q3.
Identifying the exploited script allows security teams to understand exactly which vulnerability was used in the attack. This knowledge is critical for finding the appropriate patch or workaround to close the security gap and prevent future exploitation. Can you provide the vulnerable script name?
해당질문에서는 어떤 취약한 페이지가 있는지 확인해야하는데 wireshark에서 statistics -> http -> requests
한 parameter에 계속 sql query를 보내는 것을 확인 할 수 있다.
이런 것을 봤을 때 sql injection 공격을 당하고 있다고를 예상할 수 있고 취약한 페이지는 search.php인 것을 확인할 수 있었다.
Q4
Establishing the timeline of an attack, starting from the initial exploitation attempt, What's the complete request URI of the first SQLi attempt by the attacker?
해당질문은 가장 처음 시도한 sql query를 찾는 문제이다. 그렇기에 공격자와 피해자의 주소만 나오게 검색을 하고 string으로는 취약한 페이지가 .php이기 때문에 php를 검색해준다. 그러고 내려가다 가장 처음으로 sql query를 사용하여 검색을 시도 한 것을 찾으면 된다.
Q5.
Can you provide the complete request URI that was used to read the web server available databases?
음 이건 좀 고생을 했다.
wireshark로는 도저히 찾을 수가 없어서 networkminer를 이용했다.
취약한 페이지인 search.php를 검색하고 일일히 사이트를 확인해보니 아래와 같이 데이터베이스 정보를 보여주는 페이지가 나왔다.
그럼 해당 port 46614를 wireshark에 검색을 하여 sql query를 찾아보자.
안에 sql query를 보기 힘드니 해당 packet을 우클릭 follow -> http stream에서 아래와 같이 편히 복사를 해준다.
Q7.
Assessing the impact of the breach and data access is crucial, including the potential harm to the organization's reputation. What's the table name containing the website users data?
6번과 비슷하게 network miner에서 search.php를 검색 후 크기가 큰 순으로 찾아보니 아래와 같이 안에 이메일 주소와 같이 개인 정보가 들어가 있는 페이지와 포트를 찾을 수 있었다.
해당 포트를 wireshark에서 검색 후 follow - http stream을 클릭해준다.
Q8.
The website directories hidden from the public could serve as an unauthorized access point or contain sensitive functionalities not intended for public access. Can you provide name of the directory discovered by the attacker?
아까 network miner를 더 조사를 해보니 admin이라는 테이블도 존재하는것을 확인할 수 있었다.
Q9.
Knowing which credentials were used allows us to determine the extent of account compromise. What's the credentials used by the attacker for logging in?
network miner를 보면 credentials 창이 있다. 해당 창을 보면 credentials를 확인 할 수 있다.
음 그램 username은 admin이고 password는 admin123!인 것 같다.
일단 답은 *****:********!이니 admin:admin123!일 것 같다 한 번 넣어보자.
오? 나중에 다른 write up을 보면 이렇게만 풀고 끝나는건 아니였던걸로
Q9.
We need to determine if the attacker gained further access or control on our web server. What's the name of the malicious script uploaded by the attacker?
음 악성코드가 업로드가 되려면 method를 POST 방식으로 업로드 시켜야 하기에 wireshark에 POST방식으로 전송한 것만 나오게 검색하고 가장 크기가 큰 것을 확인해봤더니 악성코드가 전송된 것을 볼 수 있었다.
'CTF > CyberDefenders' 카테고리의 다른 글
WebStrike Blue Team Lab (0) | 2024.07.28 |
---|---|
3CX Supply Chain Blue Team Lab (0) | 2024.07.26 |
PoisonedCredentials Blue Team Lab (0) | 2024.07.25 |
Insider Blue Team Lab (0) | 2024.07.25 |
Tomcat Takeover Blue Team Lab (0) | 2024.07.08 |