<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://turecki.net"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Michał Turecki - hacking</title>
 <link>https://turecki.net/tags/hacking</link>
 <description></description>
 <language>en</language>
<item>
 <title>RDPWrap download - remotely connecting to Windows using Remote Desktop multiple times without hacking termsrv.dll</title>
 <link>https://turecki.net/content/rdpwrap-download-remotely-connecting-windows-using-remote-desktop-multiple-times-without</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Having a home media centre PC (categorised as such because it&#039;s connected to a TV instead of a monitor) which is always on, from time to time I need to remote in to it and only Server editions of Windows allow a user to be logged in both locally and remotely at the same time.&lt;/p&gt;
&lt;p&gt;As far as I know there are 2 ways to correct this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Patching termsrv.dll library. This was made harder in Windows 10 as permissions to modify this file have been limited recently and changing of file permissions is needed which is not ideal. It&#039;s also not windows update friendly.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/stascorp/rdpwrap&quot;&gt;RDP Wrapper library by Stas&#039;M&lt;/a&gt; is a set of tools prepared to hook into windows remote desktop facilities. It is not invasive but definitely hackish in a way that as far as I know it hooks on in-memory RDP methods.
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;As it states on the repository website:&lt;/p&gt;
&lt;p&gt;RDP Wrapper works as a layer between Service Control Manager and Terminal Services, so the original termsrv.dll file remains untouched. Also this method is very strong against Windows Update&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;There is one problem though. For some reason  &lt;a href=&quot;https://github.com/binarymaster/rdpwrap/releases&quot;&gt;binary releases section&lt;/a&gt; does not contain the actual binaries (which need to be compiled using Delphi). Not many people out there have access to Delphi development environment so I prepared a build which can be downloaded below for all those who are interested in experimenting with it.&lt;/strike&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/binarymaster/rdpwrap/releases&quot;&gt;Binary releases &lt;/a&gt; are now available, download the binaries from GitHub to get most up to date version.&lt;/p&gt;
&lt;p&gt;How to use:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run install.bat as Administrator to install the patch
&lt;/li&gt;&lt;li&gt;Run update.bat as Administrator to update current list of binary patches from git (firewall must allow RDPWInst.exe to access the Internet - it grabs most recent patch offsets from github)
&lt;/li&gt;&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-upload field-type-file field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;table class=&quot;sticky-enabled&quot;&gt;
 &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Attachment&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt; &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
 &lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;&lt;span class=&quot;file&quot;&gt;&lt;img class=&quot;file-icon&quot; alt=&quot;Package icon&quot; title=&quot;application/zip&quot; src=&quot;/modules/file/icons/package-x-generic.png&quot; /&gt; &lt;a href=&quot;https://turecki.net/sites/default/files/RDPWrapper16.zip&quot; type=&quot;application/zip; length=1590221&quot;&gt;RDPWrapper16.zip&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;1.52 MB&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/tags/download&quot;&gt;download&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/tags/hacking&quot;&gt;hacking&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 10 Mar 2016 08:57:22 +0000</pubDate>
 <dc:creator>Michał Turecki</dc:creator>
 <guid isPermaLink="false">35 at https://turecki.net</guid>
 <comments>https://turecki.net/content/rdpwrap-download-remotely-connecting-windows-using-remote-desktop-multiple-times-without#comments</comments>
</item>
<item>
 <title>AnalysisLog.sr0 decrypted</title>
 <link>https://turecki.net/analysislog-sr0-decrypted</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Curiosity is one important part of the engine of progress. Recently I&#039;ve sent a bug report as Test Drive Unlimited 2 crashes on Windows Server 2012 and one of the files was named AnalysisLog.sr0.&lt;br /&gt;
It was created after a crash after I was kindly asked to voluntarily create it.&lt;br /&gt;
What&#039;s inside? As &lt;a href=&quot;http://www.moreawesomethanyou.com/smf/index.php?action=printpage;topic=9971.0&quot;&gt;some&lt;/a&gt; suggest it contains encrypted private information.&lt;/p&gt;
&lt;p&gt;What are the actual contents?&lt;/p&gt;
&lt;p&gt;Using &lt;a href=&quot;http://notepad-plus-plus.org/&quot;&gt;my favourite text editor&lt;/a&gt; it was easy to check that the sr0 file is just a hexadecimal representation of binary data starting with X letter, for example: X5C2D25333321272533....&lt;/p&gt;
&lt;p&gt;Easy enough, I removed the initial X letter from the text file and then using &lt;a href=&quot;http://texteditors.org/cgi-bin/wiki.pl?Tiny_Hexer&quot;&gt;TinyHexer&lt;/a&gt; (&lt;a href=&quot;http://www.mirkes.de/&quot;&gt;original website&lt;/a&gt; is down for some reason) import feature I loaded hexadecimal text which showed the intended contents of this file, now in binary.&lt;/p&gt;
&lt;p&gt;The binary data looks like it is encrypted, texts are nowhere to be found but I&#039;ve noticed patterns are emerging in the file, especially repetitive exact sentences of characters at random offsets. This suggests two things:&lt;/p&gt;
&lt;p&gt; 1. the file is not encrypted using a strong cipher in which repetitions can occur but only in large segments of identical data with the offset matching the multiple of cipher length.&lt;br /&gt;
 2. encryption key length is one byte because of randomly offseted identical data.&lt;/p&gt;
&lt;p&gt;These two hints are enough to guess it must be one of a few simple tricks to hide information - XOR or ROR/ROL/ROT-x, most probably XOR, second most ROR or ROL.&lt;/p&gt;
&lt;p&gt;A wild guess by looking at the beginning of the file gave me a clue - multiple subsequent 60 hexadecimal must be either spaces or nulls so using TinyHexer Tools -&amp;gt; Scripts -&amp;gt; XOR file data feature I managed to find out that 0x60 (96 decimal) is the key.&lt;/p&gt;
&lt;p&gt;To sum things up:&lt;br /&gt;
1. With a text editor remove leading X from the AnalysisLog.sr0 file&lt;br /&gt;
2. Using TinyHexer File -&amp;gt; Import -&amp;gt; Import -&amp;gt; (select file) -&amp;gt; hex text convert hexadecimal text to binary (and save)&lt;br /&gt;
3. Using  TinyHexer Tools -&amp;gt; Scripts -&amp;gt; XOR file data -&amp;gt; leave position and count unchanged and type in 96 as XOR value&lt;/p&gt;
&lt;p&gt;The file looks like a serialized binary object with hexadecimal identifiers and unencrypted values of these identifiers. Identifiers look like a sort of random GUID type values yet looks can be deceiving in this case especially because these identifiers have different lenght, so we might have another encryption here.&lt;br /&gt;
In a spare time I&#039;ll look into it further.&lt;/p&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/tags/encryption&quot;&gt;encryption&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/tags/hacking&quot;&gt;hacking&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 31 Mar 2013 10:43:36 +0000</pubDate>
 <dc:creator>Michał Turecki</dc:creator>
 <guid isPermaLink="false">17 at https://turecki.net</guid>
 <comments>https://turecki.net/analysislog-sr0-decrypted#comments</comments>
</item>
<item>
 <title>TortoiseMerge with better shortcuts, like WinMerge</title>
 <link>https://turecki.net/content/tortoisemerge-better-shortcuts-winmerge</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;TortoiseMerge is a useful 3-way merge tool yet it lacks proper keyboard shortcuts configuration and default shortcuts seem to be designed only for basketball players, with fingers stretched from arrow keys up to function keys.&lt;br /&gt;
Update: &lt;a href=&quot;https://code.google.com/p/tortoisegit/&quot;&gt;Current Version&lt;/a&gt; of TortoiseMerge included in TortoiseGit has the keyboard shortcuts fixed and easy to use&lt;/p&gt;
&lt;p&gt;Fortunately it is open source. Moreover, it uses standard accelerators embedded as resources in the executable so it can be easily modified to fit our needs using only a resource editor. I used &lt;a href=&quot;http://www.angusj.com/resourcehacker/&quot;&gt;ResourceHacker&lt;/a&gt; ( ResHack.exe ) and modified these while preserving existing shortcuts.&lt;/p&gt;
&lt;p&gt;Shortcuts are located in Accelerators -&amp;gt; 100 -&amp;gt; 1033 path.&lt;/p&gt;
&lt;pre&gt;100 ACCELERATORS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
	VK_Q, 57665, NOINVERT, CONTROL, VIRTKEY
	VK_ESCAPE, 57665, NOINVERT, VIRTKEY
	VK_DOWN, 32831, NOINVERT, VIRTKEY
	VK_DOWN, 32831, NOINVERT, SHIFT, VIRTKEY
	VK_LEFT, 32829, NOINVERT, VIRTKEY
	VK_LEFT, 32829, NOINVERT, SHIFT, VIRTKEY
	VK_RIGHT, 32830, NOINVERT, VIRTKEY
	VK_RIGHT, 32830, NOINVERT, SHIFT, VIRTKEY
	VK_UP, 32832, NOINVERT, VIRTKEY
	VK_UP, 32832, NOINVERT, SHIFT, VIRTKEY
	VK_LEFT, 32833, NOINVERT, CONTROL, VIRTKEY
	VK_LEFT, 32833, NOINVERT, CONTROL, SHIFT, VIRTKEY
	VK_RIGHT, 32834, NOINVERT, CONTROL, VIRTKEY
	VK_RIGHT, 32834, NOINVERT, CONTROL, SHIFT, VIRTKEY
	VK_F1, 57669, NOINVERT, SHIFT, VIRTKEY
	VK_C, 57634, NOINVERT, CONTROL, VIRTKEY
	VK_X, 57635, NOINVERT, CONTROL, VIRTKEY
	VK_F, 57636, NOINVERT, CONTROL, VIRTKEY
	VK_F3, 32790, NOINVERT, VIRTKEY
	VK_F3, 32818, NOINVERT, SHIFT, VIRTKEY
	VK_G, 32884, CONTROL, VIRTKEY
	VK_V, 57637, NOINVERT, CONTROL, VIRTKEY
	VK_INSERT, 57637, NOINVERT, SHIFT, VIRTKEY
	VK_BACK, 57643, NOINVERT, ALT, VIRTKEY
	VK_Z, 57643, NOINVERT, CONTROL, VIRTKEY
	VK_RIGHT, 32855, NOINVERT, ALT, CONTROL, VIRTKEY
	VK_RIGHT, 32857, NOINVERT, ALT, CONTROL, SHIFT, VIRTKEY
	VK_LEFT, 32859, NOINVERT, ALT, CONTROL, SHIFT, VIRTKEY
	VK_RIGHT, 32822, NOINVERT, ALT, SHIFT, VIRTKEY
	VK_RIGHT, 32820, NOINVERT, ALT, VIRTKEY
	VK_LEFT, 32819, NOINVERT, ALT, VIRTKEY
	VK_LEFT, 32821, NOINVERT, ALT, SHIFT, VIRTKEY
	VK_UP, 32780, NOINVERT, ALT, VIRTKEY
	VK_DOWN, 32779, NOINVERT, ALT, VIRTKEY
	VK_UP, 32802, NOINVERT, ALT, SHIFT, VIRTKEY
	VK_DOWN, 32804, NOINVERT, ALT, SHIFT, VIRTKEY
	VK_S, 32808, NOINVERT, ALT, VIRTKEY
	VK_F10, 32822, NOINVERT, CONTROL, SHIFT, VIRTKEY
	VK_F10, 32820, NOINVERT, CONTROL, VIRTKEY
	VK_F9, 32819, NOINVERT, CONTROL, VIRTKEY
	VK_F9, 32821, NOINVERT, CONTROL, SHIFT, VIRTKEY
	VK_O, 57601, NOINVERT, CONTROL, VIRTKEY
	VK_R, 32794, NOINVERT, CONTROL, VIRTKEY
	VK_F5, 32794, NOINVERT, VIRTKEY
	VK_S, 57603, NOINVERT, CONTROL, VIRTKEY
	VK_S, 57604, NOINVERT, CONTROL, SHIFT, VIRTKEY
	VK_F1, 57670, NOINVERT, VIRTKEY
	VK_F8, 32804, NOINVERT, VIRTKEY
	VK_F11, 32779, NOINVERT, VIRTKEY
	VK_F7, 32779, NOINVERT, VIRTKEY
	VK_F8, 32802, NOINVERT, SHIFT, VIRTKEY
	VK_F11, 32780, NOINVERT, CONTROL, VIRTKEY
	VK_UP, 32780, NOINVERT, CONTROL, VIRTKEY
	VK_DOWN, 32779, NOINVERT, CONTROL, VIRTKEY
	VK_F11, 32780, NOINVERT, SHIFT, VIRTKEY
	VK_F7, 32780, NOINVERT, SHIFT, VIRTKEY
	VK_F6, 57680, NOINVERT, VIRTKEY
	VK_F6, 57681, NOINVERT, SHIFT, VIRTKEY
	VK_D, 32775, NOINVERT, CONTROL, VIRTKEY
	VK_T, 32774, NOINVERT, CONTROL, VIRTKEY
	VK_INSERT, 57634, NOINVERT, CONTROL, VIRTKEY
	VK_DELETE, 57635, NOINVERT, SHIFT, VIRTKEY
	VK_INSERT, 57637, NOINVERT, SHIFT, VIRTKEY
	VK_A, 32883, NOINVERT, CONTROL, VIRTKEY
}&lt;/pre&gt;&lt;p&gt;
If you are too lazy to change the resources, you can download attached TortoiseMerge.exe v1.7.15.0 and use it with recent versions of TortoiseGIT/SVN.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-upload field-type-file field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;table class=&quot;sticky-enabled&quot;&gt;
 &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Attachment&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt; &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
 &lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;&lt;span class=&quot;file&quot;&gt;&lt;img class=&quot;file-icon&quot; alt=&quot;File&quot; title=&quot;application/x-msdos-program&quot; src=&quot;/modules/file/icons/application-octet-stream.png&quot; /&gt; &lt;a href=&quot;https://turecki.net/sites/default/files/TortoiseMerge.exe&quot; type=&quot;application/x-msdos-program; length=1729760&quot; title=&quot;TortoiseMerge.exe&quot;&gt;TortoiseMerge.exe&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;1.65 MB&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/tags/programming&quot;&gt;programming&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/tags/source-control&quot;&gt;source-control&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/tags/hacking&quot;&gt;hacking&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/tags/download&quot;&gt;download&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Fri, 18 Jan 2013 12:58:52 +0000</pubDate>
 <dc:creator>Michał Turecki</dc:creator>
 <guid isPermaLink="false">15 at https://turecki.net</guid>
 <comments>https://turecki.net/content/tortoisemerge-better-shortcuts-winmerge#comments</comments>
</item>
</channel>
</rss>
