{"id":891,"date":"2014-10-07T02:08:16","date_gmt":"2014-10-07T02:08:16","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=891"},"modified":"2014-10-08T11:41:25","modified_gmt":"2014-10-08T11:41:25","slug":"syser-virtualbox-win","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2014\/10\/syser-virtualbox-win\/","title":{"rendered":"Syser + VirtualBox = Win"},"content":{"rendered":"<p>Greetings and salutations fellow readers.<\/p>\n<p>Recently I&#8217;ve had to step into the awful world of kernel debugging. When malware drops a rootkit and conventional userland debugging falls short, you have to step into ring 0. Unfortunately, options are rather limited when it comes to decent ring0 debugging on windows.<\/p>\n<p>What&#8217;s that one debugger everyone&#8217;s heard of but can&#8217;t ever get working? If you said <a href=\"http:\/\/en.wikipedia.org\/wiki\/SoftICE\">SoftIce<\/a>, you&#8217;re right. Getting softice to run these day&#8217;s is a pain in the butt. Especially since its largely broken in Windows 7, support ended in 2006, and the damn thing crashes even if you do get it working. There has got to be SOME alternative right?<\/p>\n<p>Enter Syser. SoftIce 2 &#8211; Electric Boogaloo.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/SyserLogo.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/SyserLogo.jpg\" alt=\"SyserLogo\" width=\"465\" height=\"279\" class=\"alignnone size-full wp-image-893\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/SyserLogo.jpg 465w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/SyserLogo-300x180.jpg 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><\/p>\n<p>There are a few things Syser does that Softice don&#8217;t &#8211; <\/p>\n<p>1) Colors<br \/>\n2) More than 1 CPU<br \/>\n3) Source debugging<br \/>\n4) Windows 7\/8<br \/>\n5) A better looking GUI<\/p>\n<p>At this time however, the website that hosts Syser is offline. This makes obtaining it harder than usual, but not impossible. I think CNET offers a download. <\/p>\n<p>Can you run Syser in a VM? Of course!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser1-300x153.png\" alt=\"syser1\" width=\"300\" height=\"153\" class=\"alignnone size-medium wp-image-894\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser1-300x153.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser1-1024x522.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser1.png 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>But that doesn&#8217;t mean there aren&#8217;t a few things you need to do to get shit working right.<\/p>\n<p>Problems I ran into on VirtualBox:<\/p>\n<ol>\nScreen refresh<br \/>\nMouse Not Working<br \/>\nRandom BSODs\n<\/ol>\n<p>-=Screen Refresh=-<br \/>\nIf you can somehow modify the source for VirtualBox, adjust the screen refresh rate to be every 5 seconds or so.<br \/>\nMy way around this in VirtualBox is to run windows in 256 color mode. It looks ugly as sin, but it works fine at any resolution.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser256.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser256-300x224.png\" alt=\"syser256\" width=\"300\" height=\"224\" class=\"alignnone size-medium wp-image-900\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser256-300x224.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser256-1024x764.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser256.png 1279w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The alternative to that is clicking outside the window every second. That said, a way to force a refresh would be some sort of app with a time that constantly calls &#8216;UpdateWindow&#8217;. I was thinking something like this:<\/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: #557799\">#include &lt;windows.h&gt;<\/span>\r\n\r\nVOID CALLBACK <span style=\"color: #0066BB; font-weight: bold\">TimerProc<\/span>(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime) \r\n{\r\n\tHWND mywind <span style=\"color: #333333\">=<\/span> FindWindow(<span style=\"color: #007020\">NULL<\/span>,<span style=\"background-color: #fff0f0\">&quot;xp crapbox&quot;<\/span>); <span style=\"color: #888888\">\/\/ name in window title<\/span>\r\n\tUpdateWindow(mywind);\r\n}\r\n\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\">int<\/span> argc, <span style=\"color: #333399; font-weight: bold\">char<\/span> <span style=\"color: #333333\">*<\/span>argv[]) \r\n{\r\n\tMSG Msg;\r\n    UINT TimerId <span style=\"color: #333333\">=<\/span> SetTimer(<span style=\"color: #007020\">NULL<\/span>, <span style=\"color: #0000DD; font-weight: bold\">0<\/span>, <span style=\"color: #0000DD; font-weight: bold\">5000<\/span>, <span style=\"color: #333333\">&amp;<\/span>TimerProc); <span style=\"color: #888888\">\/\/ 5 seconds<\/span>\r\n    <span style=\"color: #008800; font-weight: bold\">if<\/span> (<span style=\"color: #333333\">!<\/span>TimerId)\r\n    <span style=\"color: #008800; font-weight: bold\">return<\/span> <span style=\"color: #0000DD; font-weight: bold\">16<\/span>;\r\n    <span style=\"color: #008800; font-weight: bold\">while<\/span> (GetMessage(<span style=\"color: #333333\">&amp;<\/span>Msg, <span style=\"color: #007020\">NULL<\/span>, <span style=\"color: #0000DD; font-weight: bold\">0<\/span>, <span style=\"color: #0000DD; font-weight: bold\">0<\/span>)) \r\n\t{\r\n\tDispatchMessage(<span style=\"color: #333333\">&amp;<\/span>Msg);\r\n    }\r\n    KillTimer(<span style=\"color: #007020\">NULL<\/span>, TimerId); <span style=\"color: #888888\">\/\/ app exit cleanup<\/span>\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>It beats compiling VirtualBox from source just to adjust the refresh. <\/p>\n<p>-=Mouse Not Working=-<\/p>\n<p>The problem here is that Syser will not attempt to use your USB emulated mouse. It will instead load the driver for a PS\/2 mouse (remember those?).<br \/>\nThe fix is to set the pointing device to use PS\/2 instead of USB.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework.png\" alt=\"mousework\" width=\"661\" height=\"423\" class=\"alignnone size-full wp-image-896\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework.png 661w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework-300x191.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<p>Also be sure to adjust the mouse sensitivity value in Syser&#8217;s config settings.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework2.png\" alt=\"mousework2\" width=\"635\" height=\"470\" class=\"alignnone size-full wp-image-897\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework2.png 635w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/mousework2-300x222.png 300w\" sizes=\"(max-width: 635px) 100vw, 635px\" \/><\/a><\/p>\n<p>-=Random BSOD&#8217;s=-<\/p>\n<p>Easy solution &#8211; snapshots. Kinda lame, but expect BSOD&#8217;s when working with a kernel debugger. It&#8217;s just a part of life.<\/p>\n<p>Problems I ran into on VMWare:<br \/>\n&#8220;Unable to start MSI&#8221; &#8211; I cant even install the piece of shit. For all intents and purposes I&#8217;ll be focusing on getting syser working on VirtualBox. If you use vmware, add the following lines to your vmware config file:<br \/>\nvmmouse.present = &#8220;FALSE&#8221;<br \/>\nsvga.maxFullscreenRefreshTick = &#8220;5&#8221;<\/p>\n<p>This will allow you to make use of the mouse and be able to actually see the syser window without having to switch to the desktop and vm over and over. Or you could run my program from above and disregard the mouse.<\/p>\n<p>-=Running Syser=-<\/p>\n<p>Much like Softice, Syser has a keyboard shortcut to invoke the debugger and essentially &#8216;pause&#8217; execution of the OS. Control + F12.<br \/>\nWhen paused like this, you can single step just like any other debugger. &#8216;F5&#8217; will continue execution with Syser running. Pressing control + F12 will unload the Syser driver. F11 to step in, F10 to step over. <\/p>\n<p>The command console (control + 2) allows for windbg style commands to be entered:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser-300x225.png\" alt=\"syser\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-898\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser-300x225.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser-1024x769.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser.png 1025w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>.<br \/>\nQuite powerful, but one might prefer to see what they&#8217;re doing and stick with the system explorer. <\/p>\n<p>Opening processes for access is done via the command &#8216;addr&#8217; (just like SoftIce) + the process ID in hex. Have a calculator handy.<\/p>\n<p>If you have a rootkit or driver file and you want to inspect it, just type &#8216;load <pathtodsysfile>&#8216;<br \/>\nThis will allow you to run the driver on your own pace without waiting for it to be loaded externally:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser5.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser5-300x224.png\" alt=\"syser5\" width=\"300\" height=\"224\" class=\"alignnone size-medium wp-image-903\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser5-300x224.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser5-1024x767.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/syser5.png 1028w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Anywho, I thought I&#8217;d share this awesome tool with you all before my next blog post in which I will be diving deep into the FinFisher malware dropped on WikiLeaks a few weeks back. I saw a writeup done, however it was incomplete after peeking through the malware myself. Except a nice entry \/ writeup on this malware soon.<\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/1249091581443.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/1249091581443.jpg\" alt=\"1249091581443\" width=\"585\" height=\"307\" class=\"alignnone size-full wp-image-899\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/1249091581443.jpg 585w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/10\/1249091581443-300x157.jpg 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Greetings and salutations fellow readers. Recently I&#8217;ve had to step into the awful world of kernel debugging. When malware drops a rootkit and conventional userland debugging falls short, you have to step into ring 0. Unfortunately, options are rather limited when it comes to decent ring0 debugging on windows. What&#8217;s that one debugger everyone&#8217;s heard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,5,7],"tags":[94,93],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/891"}],"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=891"}],"version-history":[{"count":5,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/891\/revisions"}],"predecessor-version":[{"id":904,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/891\/revisions\/904"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}