{"id":90,"date":"2006-12-23T11:32:35","date_gmt":"2006-12-23T11:32:35","guid":{"rendered":"https:\/\/driverentry.com.br\/en\/2006\/12\/23\/step-into-kernel-softice\/"},"modified":"2026-07-25T12:48:15","modified_gmt":"2026-07-25T12:48:15","slug":"step-into-kernel-softice","status":"publish","type":"post","link":"https:\/\/driverentry.com.br\/en\/2006\/12\/23\/step-into-kernel-softice\/","title":{"rendered":"Step into Kernel (SoftIce)"},"content":{"rendered":"<div style=\"text-align: right;\"><a href=\"https:\/\/driverentry.com.br\/2006\/12\/23\/step-into-kernel-softice\/\"><img loading=\"lazy\" decoding=\"async\" title=\"Em Portugu\u00eas\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/br.gif\" alt=\"\" width=\"21\" height=\"19\" \/><\/a><\/div>\n<p>Finally back from vacation. It has been nearly six years that I did not take vacations. Traveling, visiting new places and just relaxing were my main tasks during these last 20 days. Back to work, I&#8217;ve just arrived at the company and I was amazed by it. I could not believe they sent that old one away. We exchanged glances and obviously I got butterflies in my stomach. I got close enough to be able to smell it. I looked up and down. Simply perfect and it was an injustice to leave it alone. It didn&#8217;t take long and it was under my control. I had to prove everything it had to offer. After all, there were so many choices: Coffee, cappuccino, chocolate, tea with or without sugar. But it was all an illusion. &#8220;Oh my&#8230; that&#8217;s was a horrible coffee.&#8221; My friends, appearances can be deceiving. How can so beautiful machine make so bad coffee? I confess I miss the old machine. I didn&#8217;t mean that coffee was not so good, because the coffee was really horrible! Now I&#8217;m looking for alternative ways to keep my addiction. Perhaps there are caffeine patches to sell out there.<\/p>\n<p>Don&#8217;t worry, this will no longer be an &#8220;Off Topic&#8221; post about changing coffee machines and the impact caused by them. In this post, which I had started last year and have just finished it now, I&#8217;ll take the steps needed to use SoftICE system debugger.<\/p>\n<p><img decoding=\"async\" style=\"float: right; margin: 0px 10px;\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/ginalogon.jpg\" border=\"0\" alt=\"\" \/><\/p>\n<p>I still\u00a0was new in SCUA and I was developing a <a href=\"http:\/\/en.wikipedia.org\/wiki\/GINA\">GINA<\/a> for our security product. For those who do not know, Gina is one small screen that appears during the Logon in NT platform. GINA is a DLL that is loaded by <strong>winlogon.exe<\/strong> process, which has the  function of making the user&#8217;s interface to perform the login in the computer. The Msgina.dll GINA is the original one, but we can build our own GINA to provide alternative ways of authentication. A practical example of this is the product <a href=\"http:\/\/www.scua.com.br\/internet_noticia.asp?area=1339\">True Finger<\/a> sold by <a href=\"http:\/\/www.scua.com.br\/\">SCUA<\/a>. This  product changes the system&#8217;s GINA, so that, with a biometric  sensor help, it makes the system ask for the user&#8217;s fingerprint to logon the  system. Debug GINA requires a few atypical steps, since to test it is necessary to do Logon, Logoff and things like that. You  can also debug it using the Visual Studio\u00a0Remote Debug, but at that time, debugging GINA was the need I had to learn how to use SoftICE.<\/p>\n<p><img decoding=\"async\" style=\"float: right; margin: 0px 10px;\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/captura_digitais_fingertrue.jpg\" border=\"0\" alt=\"\" \/><\/p>\n<p>There were two development teams, one for Kernel\u00a0drivers and the other for applications.\u00a0I still worked on application\u00a0staff when in a meeting area, the team introduced me to SoftICE as an alternative to solve the problems about Kernel Debug I was facing.\u00a0I was using techniques such as log files and MessageBox to debug GINA.\u00a0You can imagine the MessageBox with the typical messages as &#8220;I called the X routine&#8221;, &#8220;Returning from Y routine.&#8221;\u00a0After I learned how to use SoftICE, it solved many things for me. Specially since other Ginas had to be developed and as, the time passed by, I started to develop kernel drivers.<\/p>\n<p>Most of the application\u00a0team had a panicked about using SoftICE.\u00a0A situation very similar to that described in my previous post.\u00a0They said: &#8220;Oh no, using SoftICE is too complicated. I will continue with the MessageBox. If I cannot solve this, then I will use a Kernel Debugger.&#8221;\u00a0I think it was just about getting used to it, SoftICE is not a rocket science and nor difficult to use.\u00a0I found it amusing when one part of the team was caught trying to solve a particular problem, that kind of strange bug that nobody could find.\u00a0I went around and asked: &#8220;Why don&#8217;t you just use SoftICE?&#8221;, &#8220;No, no, I guess it is not necessary.&#8221; they said.\u00a0Later I also\u00a0was called to help tracing the problem, and in most of the time I could, I&#8217;d picked up the problem\u00a0that they&#8217;d chased for days\u00a0in half an hour of Debug.\u00a0I&#8217;m not saying I&#8217;m super Debug\u00a0genius, or that they were technically incompetent.\u00a0I&#8217;m saying that it is only a matter of using the right tool.\u00a0You could dig a tunnel with a teaspoon, but with a shovel things would be much easier.<\/p>\n<p>SoftICE is part of a development package called <strong>Driver\u00a0Studio<\/strong>, which was sold by <a href=\"http:\/\/www.compuware.com\/\">Compuware<\/a>.\u00a0For those who still do not know, Compuware has discontinued SoftICE\u00a0and we cannot count on a version of this tool for Windows Vista.\u00a0With SoftICE is possible to debug the kernel using only one machine, but the product still has the resources to do remote debug via serial ports or network adapters.\u00a0Thus, they are also adopted the names <strong>Host<\/strong> for the machine that does the Debug and <strong>Target<\/strong> for the machine that will suffer the Debug (Similar to WinDbg).\u00a0Here we will adopt the <strong>Host <\/strong>name for identifying the machine where we have the compiler and the installation type Host SoftICE. We will not do any remote debug on this post.<\/p>\n<p>Very briefly, we can say that SoftICE works as it follows. At the Host machine, it is necessary to create a symbol file known as NMS.\u00a0This file is copied along with the driver to be tested to the Target machine.\u00a0In it, we load the symbols and start debugging the driver.\u00a0We will describe these steps in more details next.<\/p>\n<h3>Installing the Host Machine<\/h3>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_1.jpg\" alt=\"\" \/><\/div>\n<p>Installing SoftICE on the development machine is necessary for us to generate the NMS file.\u00a0Don&#8217;t worry; you will not test your driver on your development machine.\u00a0At least not while you&#8217;re sane. During the setup process, you will pass through the typical setup screens until you reach the screen shown above where you select installation\u00a0type you want.\u00a0Because we use only installation\u00a0Host portion, select that option and skip to the next screen. Select only the option &#8220;SoftICE Host\u00a0Components&#8221;, so that it appears on screen as below.\u00a0The remainder of this process is next, next&#8230;<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_2.jpg\" alt=\"\" \/><\/div>\n<h3>Installing the Target Machine<\/h3>\n<p>We will use the test machine in a way that it is not necessary to have two machines to do the debug, and so we will explore this feature that is usually used.\u00a0To do this, select the &#8220;Full Instalation&#8221; in the first screen,\u00a0then select only &#8220;SoftICE Host Components&#8221; items\u00a0and &#8220;SoftICE Target Components&#8221; as it is shown below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_3.jpg\" alt=\"\" \/><\/div>\n<p>In this case, at the end of the register and file copy process, we will have to set some debugger\u00a0properties.\u00a0The first group of settings refers to initialization.\u00a0We will select the Manual startup at this moment.\u00a0All these settings can be changed after the product is installed.\u00a0The setup screen should be as shown below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_4.jpg\" alt=\"\" \/><\/div>\n<p>The next group will be about general settings.\u00a0In this item, we will change the field &#8220;Initialization&#8221; to stay with the configuration shown below.\u00a0These are commands that are executed when the debugger is started.\u00a0Each command is separated by a semicolon.\u00a0These commands will make the following changes:<\/p>\n<ul>\n<li><strong>LINES 60;<\/strong> Change the total amount of lines to 60<\/li>\n<li><strong>WC 30; <\/strong>Change code window size to 30 lines<\/li>\n<li><strong>WL 10; <\/strong>Change local variable\u00a0window size to 10 lines<\/li>\n<li><strong>X; <\/strong>And finally, the command that starts the system normal execution<\/li>\n<\/ul>\n<p>The lack of &#8220;X&#8221;\u00a0command will cause the system to become paralyzed at debugger\u00a0startup time.\u00a0This gives us the opportunity to put initial\u00a0breakpoints and later we will be able to continue with the system execution by pressing F5, which is the hot-key for &#8220;X&#8221;\u00a0command.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_5.jpg\" alt=\"\" \/><\/div>\n<p>Now let&#8217;s set the video configuration.\u00a0Right now you can ask me: <em>&#8220;What do you mean by video configuration? Doesn&#8217;t Windows implement an abstraction layer called GDI?&#8221;<\/em><\/p>\n<p>SoftICE is a system\u00a0Kernel debugger.\u00a0GDI is part of the system.\u00a0How would you debug a video driver if the debugger itself utilizes this driver?\u00a0The debugger should influence the debugged\u00a0system as little as possible.\u00a0It is for this reason that WinDbg need a serial cable and another whole machine to make the Kernel\u00a0Debug possible.\u00a0Similarly, SoftICE, once loaded, cannot use any system resource.\u00a0This includes video drivers, disk, keyboard, mouse and so on.\u00a0For the SoftICE being able to have a place in the video while debugging the system, it accesses the video memory directly and draws manually its entire interface.\u00a0That&#8217;s why we have to configure the video.<\/p>\n<p>This configuration can be chosen between two main options.\u00a0The first is the &#8220;Universal Video Driver&#8221;, where the interface will appear in a window.\u00a0This &#8220;window&#8221; is actually the result of writing in video memory that gives the impression of a window.\u00a0This is not the type of window you&#8217;re used to seeing and drag with the mouse or even suffer the action of ALT + TAB.\u00a0Remember, when SoftICE displays its user interface, the whole system is frozen.\u00a0The other option is &#8220;Full screen&#8221;, where SoftICE switches the video to text mode to display its interface.<\/p>\n<p>If you are installing SoftICE on a virtual machine, some steps are required:<\/p>\n<ul>\n<li>Do not install tools such as video acceleration like VmTools.<\/li>\n<li>Use the standard VGA driver in Windows and configure it so that, it is 640&#215;480 with 16 colors.\u00a0(Disgusting\u00a0but necessary)<\/li>\n<li>Select the &#8220;Full Screen&#8221; option\u00a0in SoftICE.<\/li>\n<\/ul>\n<p>If these steps are not followed, the machine will freeze when asked, but the debugger screen will not appear.\u00a0Assuming that we are installing on a real machine, select the video option as shown below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softiceinstall_6.jpg\" alt=\"\" \/><\/div>\n<p>The remaining is next, next&#8230;<\/p>\n<h3>Generating the NMS File<\/h3>\n<p>On the Host machine, after compiling your driver (if you still don&#8217;t know how to do it, read <a href=\"https:\/\/driverentry.com.br\/en\/2006\/09\/11\/getting-started\/\">this other pos<\/a>t), you must now run the application &#8220;SoftICE Symbol Loader&#8221; that was already installed.\u00a0This application does the symbol\u00a0translation and generates the NMS file.\u00a0Select\u00a0<strong>Open&#8230;<\/strong> from the <strong>File<\/strong> menu and point out the driver you will debug.\u00a0Once opened, the program must place the driver loaded\u00a0name at the window title.\u00a0I have numbered the three buttons you need for this operation.<\/p>\n<ul>\n<li>Make sure that the second button is pressed.\u00a0This will make any driver source code be appended to the resulting NMS.<\/li>\n<li>Also make sure that the &#8220;3&#8221;\u00a0button is released.\u00a0This will prevent the program for asking for sources that it cannot find.<\/li>\n<li>Click on &#8220;1&#8221; button that will do the symbol\u00a0translation and the program will generate NMS file at the local directory.<\/li>\n<\/ul>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/symbolloader.jpg\" alt=\"\" \/><\/div>\n<h3>Starting SoftICE<\/h3>\n<p>After installing your driver as usual in the Target machine, we will be ready to start the Debug of our driver.\u00a0Remember that both our sample driver and SoftICE are configured to start manually.\u00a0To start SoftICE, you can click the <em>&#8220;Start SoftICE&#8221;<\/em> icon that was installed in your Start menu or simply run the command <em>&#8220;net start ntice&#8221;<\/em> in the &#8220;Run&#8230;&#8221;\u00a0window.\u00a0To make sure that the debugger has loaded, press CTRL + D so that the system freezes and the screen is shown as the one below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softice.png\" alt=\"\" \/><\/div>\n<p>No, this is not a CRASH DUMP of your video card that has just exploded.\u00a0Gentlemen, I am pleased to introduce you the SoftICE.\u00a0Now can you understand the application staff\u00a0panic?\u00a0Don&#8217;t worry, it&#8217;s ugly but it doesn&#8217;t bite you.\u00a0Pressing F5, the system returns to normal execution.<\/p>\n<p>Now we have to load the NMS file into the debugger.\u00a0This is easily done simply by double-clicking the NMA file.\u00a0This file can be in any directory on the machine.\u00a0The only time that this file is used is when you load it in the debugger.\u00a0To verify whether the file was successfully loaded by SoftICE, use the &#8220;table&#8221; command\u00a0that lists all loaded\u00a0symbol tables.\u00a0Several tables can be loaded simultaneously, but only one is active at a time.\u00a0The &#8220;file *&#8221;\u00a0command lists all files of a given table.\u00a0To open a specific file, enter the file name in front of the command.\u00a0See example below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softicecmds.png\" alt=\"\" \/><\/div>\n<p>With the file already opened in the code window, press ALT + C to put the cursor into the source code.\u00a0If this key sequence is not working, press ESC and then ALT + C.\u00a0Note that you can only walk with the cursor up and down.\u00a0Attempts to move the cursor sideways causes the command window to gain focus again.\u00a0Place the cursor on the line you want to insert the breakpoint and press F9.\u00a0At this time, the line was highlighted as shown in the picture below.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/softicebp.png\" alt=\"\" \/><\/div>\n<p>Now let&#8217;s press F5 to let the system return to normal operation.\u00a0At the moment the driver starts, our breakpoint will interrupt this action and the SoftICE interface will be displayed.\u00a0The highlighted line shows what the next instruction to be executed.\u00a0Pressing ALT + L, the local variables window gains focus.\u00a0You can navigate among the variables by moving the cursor up and down.\u00a0Press ENTER key on the structures that begin with &#8220;+&#8221;, so that they are expanded.\u00a0The image below shows register window and then, the local variable window.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/locals.png\" alt=\"\" \/><\/div>\n<p>I will leave a small table of commands here, but the full reference is in &#8220;SoftICE Command Reference&#8221; PDF file.<\/p>\n<ul>\n<li>F5 : Run<\/li>\n<li>F9 : Breakpoint<\/li>\n<li>F8 : Step into<\/li>\n<li>F10 : Step over<\/li>\n<li>F12 : Step out<\/li>\n<li>F7 : Run to cursor<\/li>\n<li>WL : Local variable window<\/li>\n<li>WW : Watch window<\/li>\n<li>WD : Memory window<\/li>\n<li>F3 : Swap among C source\/Assembly\/Mixed<\/li>\n<\/ul>\n<p>Obviously there are numerous details and technical use, but let&#8217;s leave that to the documentations that coming with the product.<\/p>\n<p>Wow, what a long post!\u00a0You thought it would be easy, didn&#8217;t you?\u00a0Until the next time &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Finally back from vacation. It has been nearly six years that I did not take vacations. Traveling, visiting new places and just relaxing were my main tasks during these last 20 days. Back to work, I&#8217;ve just arrived at the company and I was amazed by it. I could not believe they sent that old [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":1,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/90\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}