<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marius &#187; RDP</title>
	<atom:link href="http://www.devilx.net/tag/rdp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devilx.net</link>
	<description>... a place full of dorkness</description>
	<lastBuildDate>Thu, 26 Aug 2010 09:14:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>St. Nicholas bringing presents?</title>
		<link>http://www.devilx.net/2008/12/06/st-nicholas-bringing-presents/</link>
		<comments>http://www.devilx.net/2008/12/06/st-nicholas-bringing-presents/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 01:04:36 +0000</pubDate>
		<dc:creator>Marius M.</dc:creator>
				<category><![CDATA[Automobiles]]></category>
		<category><![CDATA[Hot Gear]]></category>
		<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[AutoLogon]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[CANCOM]]></category>
		<category><![CDATA[Car]]></category>
		<category><![CDATA[Crap]]></category>
		<category><![CDATA[CRX]]></category>
		<category><![CDATA[Dangerous]]></category>
		<category><![CDATA[Distributor]]></category>
		<category><![CDATA[Dizzy]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Fuel]]></category>
		<category><![CDATA[Garage]]></category>
		<category><![CDATA[GLS]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Honda]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Monday]]></category>
		<category><![CDATA[Present]]></category>
		<category><![CDATA[Problem]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[RunOnce]]></category>
		<category><![CDATA[SID]]></category>
		<category><![CDATA[Smell]]></category>
		<category><![CDATA[Solved]]></category>
		<category><![CDATA[St. Nicholas]]></category>
		<category><![CDATA[Sysprep]]></category>
		<category><![CDATA[Thursday]]></category>
		<category><![CDATA[Tired]]></category>
		<category><![CDATA[Touch]]></category>
		<category><![CDATA[Wednesday]]></category>
		<category><![CDATA[Weekend]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=652</guid>
		<description><![CDATA[So, after over one month of waiting, today at around 10 AM I received the notification about my iPod leaving the stock and being delivered to me. The distributor I&#8217;ve ordered it at, CANCOM, is using GLS for delivery and also gave me the packet&#8217;s tracking number within the notification e-mail. Now I&#8217;m really excited [...]]]></description>
			<content:encoded><![CDATA[<p>So, after over one month of waiting, today at around 10 AM I received the notification about my iPod leaving the stock and being delivered to me. The distributor I&#8217;ve ordered it at, CANCOM, is using GLS for delivery and also gave me the packet&#8217;s tracking number within the notification e-mail. Now I&#8217;m really excited and can&#8217;t wait for it to be delivered. I&#8217;m really wondering, whether GLS might deliver it by tomorrow as kind of a &#8220;St. Nicholas present&#8221;, or if I&#8217;d need to wait until monday.</p>
<p>What else happened. Well, I solved <a title="Windows XP and Sysprep.exe" href="http://www.devilx.net/2008/11/29/windows-xp-and-sysprepexe/" target="_self">the problem I described some days ago</a>, regarding the Windows XP Sysprep stuff. Unfortunately, it didn&#8217;t work out the way I actually planned it:</p>
<p>The scheduled task seemed not to be ran, because (at least this is what I guess) Sysprep changes the system&#8217;s/system-user&#8217;s SIDs within the Mini-Setup. So when a scheduled task is being added to the scheduler while running the Sysprep procedure, it adds the task using the Administrator&#8217;s current SID &#8211; which won&#8217;t be the same after the reboot. Because of that, the scheduler then reports the miss of the actual user, under which this task should be ran.</p>
<p>However, I&#8217;ve solved it by adding the <strong>AutoLogon=Yes</strong> and the <strong>AutoLogonCount=1</strong> parameters to the <em>sysprep.inf</em>. The first one generally activates the AutoLogon feature, so that the Administrator will be automatically logged on after system boot and the second option defines, how many times the Administrator should be automatically logged in after boot. By setting it to 1 the Administrator will be automatically logged on only after the machine&#8217;s first boot &#8211; on the following boots no more AutoLogon will be used.</p>
<p>Then, I added a RunOnce key into the system&#8217;s registry (within the mini-setup, using the &#8220;reg&#8221; command), which executes a batch-script. Within this batch script then I was able to do everything I want &#8211; unlock the firewall&#8217;s port, enable RDP and add the Domain-Group to the RDP-Users. Yay.</p>
<p>It&#8217;s quite an ugly hack, but at least it does the job. And it&#8217;s the only method I found out to work.</p>
<p>What other things occurred this week&#8230; hm&#8230; ah yeah. My car. It smells. No, not a joke. Let me go into greater detail: Last Thursday, I went to the gas station and filled up my car with gasoline. The day after, I drove to work and left it there on the parking space, since I had a company car for the weekend. When I returned on monday and sat into my CRX, intending to drive home, the whole car smelled extremely of gasoline. I thought, that it might be, because I left it fully refueled there over the weekend, so I just drove off. The smell didn&#8217;t disappear when I reached my home, so I left the sunroof open. When I entered the car again later that evening, it still smelled. The next day I brought it to the garage and had it checked. On Wednesday morning I went there to pick it up, and they told me that nothing could be found: No leaking tube, no holes, nothing. They couldn&#8217;t even tell me if this is actually dangerous.</p>
<p>Now I kept the car driving until today, because I wanted to see whether the strength of smell decreases proportional to the fuel-amount in my tank &#8211; and of course it does. Unfortunately it only decreases, but does not completely disappear. So now I&#8217;m thinking of brining my car in to the official Honda garage hear here and let it checked up again there. Maybe they could tell me more, since they use to have more experience with these kind of cars.</p>
<p>It&#8217;s not only that I don&#8217;t know how dangerous this situation actually is, but besides it&#8217;s really annoying since the smell uses to makes me pretty dizzy after a while &#8211; what&#8217;s kinda disadvantageous while driving. So I definitely need to get this fixed until my car burns out &#8211; either because of some leakage or because I drove it into a tree, due to the dizziness. Hmpf. :-/</p>
<p>And now I guess I should finally go to bed. I&#8217;m still a bit sick and I didn&#8217;t sleep that much the past few days. Good night everybody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devilx.net/2008/12/06/st-nicholas-bringing-presents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows (XP) and Sysprep.exe</title>
		<link>http://www.devilx.net/2008/11/29/windows-xp-and-sysprepexe/</link>
		<comments>http://www.devilx.net/2008/11/29/windows-xp-and-sysprepexe/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 17:07:34 +0000</pubDate>
		<dc:creator>Marius M.</dc:creator>
				<category><![CDATA[Life itself]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[netsh]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[reg]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[schtasks]]></category>
		<category><![CDATA[strace]]></category>
		<category><![CDATA[Sysprep]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=640</guid>
		<description><![CDATA[Last week, I was helping-out on Thomas&#8217; project at work, where I had to implement some stuff regarding Windows XP Mini-Setup with Sysprep.exe. He built an image which automatically started the mini-setup on the machine&#8217;s first boot and configured every parameter of the operating system the way he needed it. My job has been to [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, I was helping-out on Thomas&#8217; project at work, where I had to implement some stuff regarding Windows XP Mini-Setup with Sysprep.exe. He built an image which automatically started the mini-setup on the machine&#8217;s first boot and configured every parameter of the operating system the way he needed it. My job has been to check whether it&#8217;s possible to make the mini-setup run a custom script at its end and if possible activate RDP, open the firewall&#8217;s RDP port and add a domain group to the RDP-users.</p>
<p>The first two things weren&#8217;t that hard to realize. Sysprep actually runs every command contained in the <em>Cmdlines.txt</em> in <em>\%sysprep%\i386\$oem$\</em> directory. Enabling RDP is possible using a simple <strong>reg</strong>-commandline which changes the value of the <em>fDenyTSConnection</em> key. Also opening the firewall&#8217;s port is trivial by using the <strong>netsh</strong> command. There seems to be some way by using a <em>winnt.sif</em>-file containing some parameters that should modify the firewall setup, unfortunately I didn&#8217;t manage to get that working in an reasonable amount of time. So I&#8217;ve just used the mentioned command to open the port in the firewall, for all profiles. The profile-argument is important, for me it did not work out without setting it to <em>ALL</em>.</p>
<p>Anyhow, the third ToDo was (and still is) tricky. The problem when using the <strong>net</strong> <em>localgroup</em> command to add the group to the local <em>Remotedesktopusers</em>-group is the following: While the mini-setup is running, the computer hasn&#8217;t got its future hostname and because of that it&#8217;s not yet joined to the domain. When trying to execute the net command for adding the domain-group to the local group it will of course fail. I searched for many different ways to do that, but each method I&#8217;ve found didn&#8217;t really work out for me:</p>
<p>autoexec.bat: Hacking the command to the autoexec.bat, so that it gets executed on the next reboot would be a way, unfortunately this file is ignore by every not-DOS-based Windows, like Windows XP is, for example.</p>
<p>win.ini: I&#8217;m not sure exactly why this didn&#8217;t work out, because the documentation says, that the Run-parameters configured in that INI will be run on Windows&#8217; startup. In my case, the net command hasn&#8217;t seemed to be run. I think that the win.ini commands get executed before the connection to the domain has been established, so that the actual net command would have been run, but unsuccessful.</p>
<p>Run/RunOnce/RunService/RunServiceOnce-Keys: Would work out pretty good, if some user would log in. In my case, no user will log in until RDP is available to the specific domain-group.</p>
<p>And so on. I got pretty desperate, until I got an idea: A scheduled task! Windows supports adding scheduled tasks even from the commandline by using the <strong>schtasks</strong> command. I tried out the <em>/sc onboot</em> parameter, but unfortunately it seems to be working just like the win.ini, what cause the group not to be added. Then, I wrote myself a batch-script, which executes the net command for adding the domain-group, checks the command&#8217;s error code and if successful removes the scheduled task. The task itself I created using <em>/sc minute /mo 1</em>. By that, the task will be run every minute after the task-scheduler gets started on Windows&#8217; boot and try to add the group. The whole <strong>schtasks</strong> <em>/create</em> thing works and even my script runs when I doubleclick it, but somehow the scheduler can&#8217;t run the script I passed to him while the mini-setup was running. I tried to same <em>/create</em> command within Windows XP and it worked out &#8211; my batch file got executed after one minute, added the group, saw that there was no error adding the group and removed the schtasks job.</p>
<p>Now I&#8217;m trying to understand, why the job does not work when I create it within the mini-setup. It&#8217;s really annoying, because Windows really does not provide any information below the basic output. There is no way (or at least none I would know of) to see what the <strong>schtasks</strong> daemon actually does when trying to run the script and fails. There is no <strong>strace</strong>. Nothing. Argh.</p>
<p>It really rankles me that the last piece doesn&#8217;t work the way it actually should, because the other implementations run pretty smooth <strong>and lasting</strong>. *beckon to Thomas*</p>
<p>Hmpf&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devilx.net/2008/11/29/windows-xp-and-sysprepexe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RDP over SSH over HTTPS</title>
		<link>http://www.devilx.net/2007/01/12/rdp-over-ssh-over-https/</link>
		<comments>http://www.devilx.net/2007/01/12/rdp-over-ssh-over-https/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 21:17:29 +0000</pubDate>
		<dc:creator>Marius M.</dc:creator>
				<category><![CDATA[Linux and stuff ...]]></category>
		<category><![CDATA[Mac and stuff ...]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DarwinPorts]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Jabber]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[prtunnel]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tunnel]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.devilx.net/?p=271</guid>
		<description><![CDATA[Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful on Google or Yahoo!. After some more searching, asking and trying I finally figured out [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, tunneling unter Linux/Unix system definitely is a bit complicated &#8211; until you really understand the basics. Some day I was searching for a possibility to tunnel a RDP Session over a WWW-Proxy and I really couldn&#8217;t find anything useful on Google or Yahoo!. After some more searching, asking and trying I finally figured out how this can be done.</p>
<p>First of all: You cannot tunnel RDP directly through a proxy. RDP doesn&#8217;t speak any HTTP(S) to make the proxy connect to the RDP-Server or anything else. So you&#8217;ll need an application, that surrounds this RDP datachannel with HTTP, prefferable HTTPS. I found <em>prtunnel</em> for my Mac on DarwinPorts. This software allows you to tunnel anything you want through an http/socks proxy by connecting to the proxy, making it connect (by sending HTTP commands) to the preffered host and open a local port for the application (e.g. rdesktop) to connect. Good, so let&#8217;s connect using prtunnel to myrdpmachine.com:3389 and be happy! &#8211; NAH. As soon as you&#8217;ll try that you&#8217;ll see that it&#8217;s not that simple. Most http-proxies do not allow CONNECTs to other ports than 80/443. So you can either set up your RDP daemon to use that port &#8211; never found that option in Windoze &#8211; or you can use an SSH jumphost, since it&#8217;s pretty simple to change the SSH port to 443. So, you connect with prtunnel to your SSH machine on port 443, where the SSH daemon runs, open an SSH tunnel through that machine to the myrdpmachine.com port 3389 and connect with your RDP client on localhost:. Okay, let&#8217;s stop the theory and begin with the practice:</p>
<p>Open three terminals and execute the following command on the first one:</p>
<pre>prtunnel -V -t http -H 'proxy address' -P 'proxy port' \
'port on local machine' 'remote host to connect to over proxy' \
'remote port, put SSHd on 443'</pre>
<p>Then, terminal #2 gets the following command: ssh -L&#8217;local tunneling port&#8217;:'destination host&#8217;:'destination port&#8217; -p &#8216;local port to connect to, the same given at prtunnel&#8217; &#8216;user&#8217;@localhost<br />
After that you can hapily run your <em>rdesktop localhost:&#8217;local tunneling port&#8217;</em> and start RDPing. To make the stuff even more clear, here a concrete example:</p>
<pre>prtunnel -V -t http -H 192.168.111.2 -P 3128 13337 192.168.111.3 443
ssh -L13338:192.168.111.24:3389 -p 13337 root@localhost
rdesktop localhost:13338</pre>
<p>That&#8217;s all the magic. Though, you need to pay attention when selecting your ports, because of course only free ports will work and you really should try to keep them higher than 1024 unless you want to become root. Also you need to remember that running an RDP session over HTTP(S) might get the attention of a firewall or whatever monitoring application is available in that network. &#8220;Abnormal behaviour&#8221; &#8211; you&#8217;d never get such an 50:50 up- and downtraffic unless you run some peer-2-peer application or remote desktops.</p>
<p>But of course you can modify the commands and use it to be able to connect to let&#8217;s say Jabber from a network where only 80/443-outgoing is available &#8211; all you need is a jumphost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devilx.net/2007/01/12/rdp-over-ssh-over-https/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
