KCTF{social_warfare_3.5.2}Problem: Our web application was compromised through a vulnerable plugin. The attacker exploited a known vulnerability to gain initial access. Identify the vulnerable plugin and its version that was exploited.
File: pcap2.pcapng
Flag Format: KCTF{plugin_name_version}
We started by analyzing the pcap2.pcapng file to understand the nature of the network traffic. Commands like strings and tshark (if available) or Python scripts using scapy are useful here. A preliminary scan using strings revealed lots of HTTP traffic directed at a WordPress instance (/wordpress/).
We observed a significant amount of traffic generated by a vulnerability scanner, identified by the User-Agent string:User-Agent: WPScan v3.8.28 (https://wpscan.com/wordpress-security-scanner)
The scanner was enumerating plugins and themes. We filtered the traffic to look for specific plugin files being requested, particularly readme.txt files which often contain version information.
We identified requests for two specific plugins:
failed-warfare / social-warfare)thim-blocks)We extracted the HTTP responses for the GET requests to these plugins' readme.txt files to determine their installed versions.
Using a Python script with scapy and zlib, we parsed the HTTP response bodies (which were GZIP compressed).
For Social Warfare:
Request: GET /wordpress/wp-content/plugins/social-warfare/readme.txt
Response Body contained:
=== WordPress Social Sharing Plugin - Social Warfare ===
...
Stable tag: 3.5.2
For Thim Blocks:
Request: GET /wordpress/wp-content/plugins/thim-blocks/readme.txt
Response Body contained:
=== Thim Blocks ===
...
Stable tag: 1.0.2
We cross-referenced these versions with known vulnerabilities:
The challenge required the flag in the format KCTF{plugin_name_version}.
social_warfare (underscore as per user confirmation)3.5.2Flag: KCTF{social_warfare_3.5.2}