<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EHalilovic</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EHalilovic"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/EHalilovic"/>
	<updated>2026-09-10T19:41:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Dns2tcp&amp;diff=8265</id>
		<title>Dns2tcp</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Dns2tcp&amp;diff=8265"/>
		<updated>2021-12-17T18:23:00Z</updated>

		<summary type="html">&lt;p&gt;EHalilovic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since this is a tool used in Post Exploitation phase, this document will assume that access on the victim machine has already been gained. Configuration on both endpoints are necessary to use this tool.&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Dns2tcp is a tool used in order to send TCP packets over DNS traffic and consists of two components - a server tool and a client tool. The server contains a list of ressources, which are defined inside a configuration file. Each of these resources is either a local or remote service, which is waiting for a TCP connection. The client listens to the predetermined TCP port and redirects every incoming connection over DNS to the endservice. In this way, a restrictive firewall, which allows dns traffic, can be evaded.&lt;br /&gt;
&lt;br /&gt;
In order to make full use of this tool, a NS record for a subdomain is needed, which has to point to the address of the server.&lt;br /&gt;
&lt;br /&gt;
Example of a NS entry:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;subdomain IN NS domain.mydomain.at&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server side configuration ==&lt;br /&gt;
&lt;br /&gt;
In this example, a file called &#039;&#039;dns2tcpdrc&#039;&#039; is created via cat. The server will listen to all IP-addresses, by setting the listen variable as &amp;quot;0.0.0.0&amp;quot;. The port &#039;&#039;&#039;must&#039;&#039;&#039; be 53 as this is the default port for DNS. The domain &#039;&#039;subdomain.mydomain.at&#039;&#039; is the subdomain configured beforehand. The resource &#039;&#039;ssh&#039;&#039; is used, but other services can also be used.&lt;br /&gt;
&lt;br /&gt;
The end file should look similar to the example below:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat &amp;gt;.dns2tcpdrc &amp;lt;&amp;lt;END&lt;br /&gt;
listen = 0.0.0.0&lt;br /&gt;
port = 53&lt;br /&gt;
user=nobody&lt;br /&gt;
domain = subdomain.mydomain.at&lt;br /&gt;
resources = ssh:127.0.0.1:22&lt;br /&gt;
END&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server can now be started by using the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpd -F [-d 1/2/3] -f .dns2tcpdrc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flag -F causes the tool to work in the foreground while -f is used in order to set the configuration file. The flag -d can be optionally used in order to set the debug level with 3 being the highest debug level, thus showing the most information.&lt;br /&gt;
&lt;br /&gt;
== Client side configuration ==&lt;br /&gt;
Another configuration file needs to be created on the client machine. It is important to set the same domain and resource as it has been declared in the configuration file on the server side. The &#039;&#039;local_port&#039;&#039; declared is necessary for the last step.&amp;lt;ref name=&amp;quot;kalitools&amp;quot;&amp;gt;https://www.kali.org/tools/dns2tcp/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Client configuration file example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat &amp;gt;.dns2tcprc &amp;lt;&amp;lt;END&lt;br /&gt;
domain = subdomain.mydomain.at&lt;br /&gt;
resource = ssh&lt;br /&gt;
local_port = 2222&lt;br /&gt;
END&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
Check for available resources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpc -z subdomain.mydomain.at [server-IP]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dns2tcptest.png|alt check for available resources]]&lt;br /&gt;
&lt;br /&gt;
If no available resources are shown, a mistake has been made in the previous configuration. In this case, retrying with the debug level set to a higher level and adding &amp;lt;code&amp;gt;debug_level = 3&amp;lt;/code&amp;gt; to the configuration file might help in order to find the cause of the error.&amp;lt;ref&amp;gt;https://salsa.debian.org/debian/dns2tcp&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Browser Setup ===&lt;br /&gt;
With dns2tcp access to the internet can be gained despite the firewall blocking traffic. In order to make use of this, the browser&#039;s Network Proxy needs to be edited in the settings. The Proxy Access needs to configured as &amp;quot;Manual proxy configuration&amp;quot; and the SOCKS Host needs to have the IP-adress 127.0.0.1. The port has to be set to an open, unused port.&lt;br /&gt;
&lt;br /&gt;
Example settings in firefox using port 8080:&lt;br /&gt;
&lt;br /&gt;
[[File:Proxysettings.png|600px|alt Proxy settings]]&lt;br /&gt;
&lt;br /&gt;
== Execution ==&lt;br /&gt;
&lt;br /&gt;
Start the client:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpc -f .dns2tcprc [server-IP] [-d 1/2/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and connect to the remote host via ssh using the &#039;&#039;local_port&#039;&#039; from the client&#039;s configuration file and the &#039;&#039;SOCKS-port&#039;&#039; set in the browser configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[server-user]@127.0.0.1 -p [local_port] -D [SOCKS-port]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opening the web browser now, one is free to access the internet, while many DNS packets are sent between the server and client at a fast rate.&amp;lt;ref name=&amp;quot;kalitools&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>EHalilovic</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Dns2tcp&amp;diff=8264</id>
		<title>Dns2tcp</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Dns2tcp&amp;diff=8264"/>
		<updated>2021-12-17T17:56:05Z</updated>

		<summary type="html">&lt;p&gt;EHalilovic: Created page with &amp;quot;== Summary ==  &amp;#039;&amp;#039;&amp;#039;Since this is a tool used in Post Exploitation phase, this document will assume that access on the victim machine has already been gained. Configuration on b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since this is a tool used in Post Exploitation phase, this document will assume that access on the victim machine has already been gained. Configuration on both endpoints are necessary to use this tool.&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Dns2tcp is a tool used in order to send TCP packets over DNS traffic and consists of two components - a server tool and a client tool. The server contains a list of ressources, which are defined inside a configuration file. Each of these resources is either a local or remote service, which is waiting for a TCP connection. The client listens to the predetermined TCP port and redirects every incoming connection over DNS to the endservice. In this way, a restrictive firewall, which allows dns traffic, can be evaded.&lt;br /&gt;
&lt;br /&gt;
In order to make full use of this tool, a NS record for a subdomain is needed, which has to point to the address of the server.&lt;br /&gt;
&lt;br /&gt;
Example of a NS entry:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;subdomain IN NS domain.mydomain.at&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server side configuration ==&lt;br /&gt;
&lt;br /&gt;
In this example, a file called &#039;&#039;dns2tcpdrc&#039;&#039; is created via cat. The server will listen to all IP-addresses, by setting the listen variable as &amp;quot;0.0.0.0&amp;quot;. The port &#039;&#039;&#039;must&#039;&#039;&#039; be 53 as this is the default port for DNS. The domain &#039;&#039;subdomain.mydomain.at&#039;&#039; is the subdomain configured beforehand. The resource &#039;&#039;ssh&#039;&#039; is used, but other services can also be used.&lt;br /&gt;
&lt;br /&gt;
The end file should look similar to the example below:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat &amp;gt;.dns2tcpdrc &amp;lt;&amp;lt;END&lt;br /&gt;
listen = 0.0.0.0&lt;br /&gt;
port = 53&lt;br /&gt;
user=nobody&lt;br /&gt;
domain = subdomain.mydomain.at&lt;br /&gt;
resources = ssh:127.0.0.1:22&lt;br /&gt;
END&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server can now be started by using the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpd -F [-d 1/2/3] -f .dns2tcpdrc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flag -F causes the tool to work in the foreground while -f is used in order to set the configuration file. The flag -d can be optionally used in order to set the debug level with 3 being the highest debug level, thus showing the most information.&lt;br /&gt;
&lt;br /&gt;
== Client side configuration ==&lt;br /&gt;
Another configuration file needs to be created on the client machine. It is important to set the same domain and resource as it has been declared in the configuration file on the server side. The &#039;&#039;local_port&#039;&#039; declared is necessary for the last step.&lt;br /&gt;
&lt;br /&gt;
Client configuration file example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat &amp;gt;.dns2tcprc &amp;lt;&amp;lt;END&lt;br /&gt;
domain = subdomain.mydomain.at&lt;br /&gt;
resource = ssh&lt;br /&gt;
local_port = 2222&lt;br /&gt;
END&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
Check for available resources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpc -z subdomain.mydomain.at [server-IP]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Dns2tcptest.png|alt check for available resources]]&lt;br /&gt;
&lt;br /&gt;
If no available resources are shown, a mistake has been made in the previous configuration. In this case, retrying with the debug level set to a higher level and adding &amp;lt;code&amp;gt;debug_level = 3&amp;lt;/code&amp;gt; to the configuration file might help in order to find the cause of the error.&lt;br /&gt;
&lt;br /&gt;
=== Browser Setup ===&lt;br /&gt;
With dns2tcp access to the internet can be gained despite the firewall blocking traffic. In order to make use of this, the browser&#039;s Network Proxy needs to be edited in the settings. The Proxy Access needs to configured as &amp;quot;Manual proxy configuration&amp;quot; and the SOCKS Host needs to have the IP-adress 127.0.0.1. The port has to be set to an open, unused port.&lt;br /&gt;
&lt;br /&gt;
Example settings in firefox using port 8080:&lt;br /&gt;
&lt;br /&gt;
[[File:Proxysettings.png|600px|alt Proxy settings]]&lt;br /&gt;
&lt;br /&gt;
== Execution ==&lt;br /&gt;
&lt;br /&gt;
Start the client:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dns2tcpc -f .dns2tcprc [server-IP] [-d 1/2/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and connect to the remote host via ssh using the &#039;&#039;local_port&#039;&#039; from the client&#039;s configuration file and the &#039;&#039;SOCKS-port&#039;&#039; set in the browser configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[server-user]@127.0.0.1 -p [local_port] -D [SOCKS-port]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opening the web browser now, one is free to access the internet, while many DNS packets are sent between the server and client at a fast rate.&lt;/div&gt;</summary>
		<author><name>EHalilovic</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Dns2tcptest.png&amp;diff=8263</id>
		<title>File:Dns2tcptest.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Dns2tcptest.png&amp;diff=8263"/>
		<updated>2021-12-17T17:38:48Z</updated>

		<summary type="html">&lt;p&gt;EHalilovic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EHalilovic</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Proxysettings.png&amp;diff=8262</id>
		<title>File:Proxysettings.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Proxysettings.png&amp;diff=8262"/>
		<updated>2021-12-17T17:13:21Z</updated>

		<summary type="html">&lt;p&gt;EHalilovic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>EHalilovic</name></author>
	</entry>
</feed>