these days i spent some hours to play around with windbg to see how it works, and getting bored because i’m missing Ollydbg’s style. So I made a new look for windbg to make it become more friendly to me. You can take a look in the picture below:
Pretty nice, eh? Yeah, just a little bit modification. And everything is now okay. But before sharing this theme, let me talk a bit about the way to create a theme in windbg.
Windbg has a great and modern, highly configurable interface with docking, tabbed and floating-windows, so you can work in very comportable and flexible enviroment, as you wish to. For me, it’s very interesting, and i liked it a lot.
By default, the default workspace of windbg is really “empty” -> this means that the first time you ran the windbg, you will see a blank windows with no child-windows inside (for e,g disassembler, register, memory dump, stack, etc…). So, you should bring them out by clicking on the “View” menu. Then you can change display color and font style by going to menu “View” -> “Option”.
After get the thing done, you MUST save the setting by going to “File” menu and choose “Save workspace”. But, the point is, how to export the theme and share to others?
Here’s how i did it. Just follow these steps:
1. Fire up Windbg, then make changes to its interface as i said before
2. After step 1, click the “File” Menu and then choose the “Save Workspace to file”. A SaveFileDialog comes out, set the name for you file and click “Save” button. Remember the location where you saved the file
3. Locate the file which you just created in step 2, this is your saved settings (includes windows positions, color schemes and font style…) with extension “.wew”.
Everytime windbg executed, it will reads the information about workspace setting in a registry key value. The value is stored at HKCU\Software\Microsoft\Windbg\Workspace with name “Default” (means default workspace), so we should modify the value stored in this registry key, to load our theme. But why we need the *.wew file? I opened that file (.wew) in a hex editor to see the content inside, then i compared it with the value stored in “Default” registry key, and found that they all have the same format. So, to apply the theme, simply copy all the data in .wew file then paste in to “Default” registry key. I wrote a small python snippet to convert .wew file to a .reg file. Then we just apply the .reg file to overwrite data in “Default” registry key automatically. And if we want to share the theme to other, just send them the reg file and they will apply it.
4. Copy these code, save and run it with argument:
for example, my saved workspace file has the name “Cool_theme.wew”, and i saved the code above to a file named wtl.py (windbg_theme_loader), so the command is :
a new file named Cool_theme.wew.reg will be created. Now the time for you to start applying and sharing your creations.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windbg]
[HKEY_CURRENT_USER\Software\Microsoft\Windbg\Workspaces]
"Default"=hex:57,44,57,53,01,00,00,00,30,00,00,00,38,00,2e,00,43,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,4c,00,65,00,76,00,69,00,73,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,00,67,00,33,00,00,00,68,00,5c,00,f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,03,02,01,31,43,00,6f,00,6e,00,73,00,6f,00,6c,00,61,00,73,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,6e,00,65,00,00,00,02,00,10,00,04,00,00,00,00,00,50,00,52,00,01,00,02,00,10,00,04,00,ff,ff,ff,00,00,00,00,6a,0a,00,00,00,10,00,04,00,20,00,00,00,00,6a,00,00,3d,00,00,00,10,00,04,00,00,00,00,00,00,03,00,00,0c,00,00,00,10,00,04,00,01,00,00,00,00,04,00,2e,3c,00,00,00,10,00,04,00,01,00,00,00,01,08,00,00,3f,00,00,00,10,00,04,00,01,00,00,00,00,03,00,00,12,00,00,00,10,00,04,00,01,00,00,00,00,08,00,30,24,00,00,00,50,00,42,00,44,00,3a,00,5c,00,43,00,72,00,61,00,63,00,6b,00,65,00,72,00,20,00,50,00,61,00,63,00,6b,00,61,00,67,00,65,00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,5c,00,73,00,6f,00,75,00,72,00,63,00,65,00,00,00,00,03,00,01,04,2a,23,00,00,00,50,00,42,00,44,00,3a,00,5c,00,43,00,72,00,61,00,63,00,6b,00,65,00,72,00,20,00,50,00,61,00,63,00,6b,00,61,00,67,00,65,00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,5c,00,69,00,6d,00,61,00,67,00,65,00,73,00,00,00,00,1e,0b,41,00,03,22,00,00,00,b0,00,a6,00,53,00,52,00,56,00,2a,00,44,00,3a,00,5c,00,43,00,72,00,61,00,63,00,6b,00,65,00,72,00,20,00,50,00,61,00,63,00,6b,00,61,00,67,00,65,00,5c,00,77,00,69,00,6e,00,64,00,62,00,67,00,5c,00,73,00,79,00,6d,00,62,00,6f,00,6c,00,73,00,72,00,2a,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,00,6d,00,73,00,64,00,6c,00,2e,00,6d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,63,00,6f,00,6d,00,2f,00,64,00,6f,00,77,00,6e,00,6c,00,6f,00,61,00,64,00,2f,00,73,00,79,00,6d,00,62,00,6f,00,6c,00,73,00,20,00,00,00,00,00,41,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,40,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,00,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,01,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,02,ff,02,00,10,00,04,00,ff,80,00,00,20,00,20,00,03,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,04,ff,02,00,10,00,04,00,ff,ff,00,00,20,00,20,00,05,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,06,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,07,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,08,ff,02,00,10,00,04,00,80,ff,00,00,20,00,20,00,09,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,0a,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,0b,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,0c,ff,02,00,10,00,04,00,ff,ff,80,00,20,00,20,00,0d,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,0e,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,0f,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,10,ff,02,00,10,00,04,00,00,ff,00,00,20,00,20,00,11,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,12,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,13,ff,02,00,10,00,04,00,00,00,00,00,20,00,20,00,38,ff,02,00,10,00,04,00,ff,ff,ff,00,20,00,20,00,39,ff,02,00,10,00,04,00,00,00,00,00,4e,00,4f,00,3a,ff,02,00,10,00,04,00,ff,ff,ff,00,43,00,48,00,3b,ff,02,00,10,00,04,00,00,00,00,00,00,00,48,00,3c,ff,02,00,10,00,04,00,ff,ff,ff,00,56,00,45,00,3d,ff,02,00,10,00,04,00,00,00,00,00,4d,00,45,00,3e,ff,02,00,10,00,04,00,ff,ff,ff,00,55,00,73,00,3f,ff,02,00,10,00,04,00,00,00,00,00,76,00,69,00,04,00,03,00,10,00,04,00,00,00,00,00,76,00,69,00,04,00,01,00,70,02,68,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,00,00,00,ff,ff,ff,0f,01,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,04,00,00,00,01,00,00,00,01,00,00,00,20,00,00,00,4b,00,00,00,dc,02,00,00,db,01,00,00,03,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,05,00,00,00,01,00,00,00,01,00,00,00,fb,ff,ff,ff,eb,00,00,00,b7,02,00,00,7b,02,00,00,01,00,00,00,00,00,00,80,00,00,00,00,00,00,00,00,06,00,00,00,01,00,00,00,01,00,00,00,cb,01,00,00,44,00,00,00,9a,03,00,00,e1,01,00,00,05,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,08,00,00,00,01,00,00,00,01,00,00,00,30,00,00,00,5b,00,00,00,ec,02,00,00,eb,01,00,00,01,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,09,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,0a,00,00,00,01,00,00,00,01,00,00,00,10,00,00,00,3b,00,00,00,cc,02,00,00,cb,01,00,00,04,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,0b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,0c,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,0d,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,0f,00,00,00,00,00,00,00,00,00,00,03,00,10,00,08,00,05,00,00,00,70,04,00,00,01,00,01,00,38,00,2c,00,2c,00,00,00,02,00,00,00,03,00,00,00,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,88,00,00,00,7a,00,00,00,cc,04,00,00,c8,02,00,00,56,00,45,00,03,00,03,00,78,00,6c,00,04,00,00,00,02,00,00,00,64,00,00,00,14,00,00,00,00,00,00,80,02,00,00,40,07,00,00,00,95,03,00,00,00,00,00,00,4e,05,00,00,93,01,00,00,04,00,00,00,01,00,00,00,01,00,00,00,20,00,00,00,4b,00,00,00,dc,02,00,00,db,01,00,00,03,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,00,00,00,80,01,00,00,40,04,00,00,40,02,00,00,00,01,00,00,00,44,00,00,00,03,00,03,00,80,00,74,00,0a,00,00,00,01,00,00,00,64,00,00,00,14,00,00,00,00,00,00,80,03,00,00,40,07,00,00,00,c7,02,00,00,93,01,00,00,4e,05,00,00,7c,02,00,00,0a,00,00,00,01,00,00,00,01,00,00,00,10,00,00,00,3b,00,00,00,cc,02,00,00,cb,01,00,00,04,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,00,00,00,80,ff,ff,ff,0f,02,00,00,40,03,00,00,40,02,00,00,00,00,00,00,00,14,00,00,00,10,00,04,00,03,00,03,00,98,00,90,00,08,00,00,00,03,00,00,00,64,00,00,00,14,00,00,00,00,00,00,80,03,00,00,40,07,00,00,00,00,00,00,00,93,01,00,00,c7,02,00,00,7c,02,00,00,08,00,00,00,01,00,00,00,01,00,00,00,30,00,00,00,5b,00,00,00,ec,02,00,00,eb,01,00,00,01,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,00,00,00,80,01,00,00,40,03,00,00,00,01,00,00,00,01,00,00,00,00,00,00,00,03,00,00,00,01,00,00,00,10,00,00,00,40,00,24,00,73,00,63,00,6f,00,70,00,65,00,69,00,70,00,00,00,03,00,03,00,80,00,78,00,05,00,00,00,00,00,00,00,64,00,00,00,14,00,00,00,00,00,00,80,04,00,00,40,07,00,00,00,00,00,00,00,00,00,00,00,95,03,00,00,93,01,00,00,05,00,00,00,01,00,00,00,01,00,00,00,fb,ff,ff,ff,eb,00,00,00,b7,02,00,00,7b,02,00,00,01,00,00,00,00,00,00,80,00,00,00,00,00,00,00,00,ff,ff,ff,0f,ff,ff,ff,0f,ff,ff,ff,0f,ff,ff,ff,0f,00,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,03,00,03,00,80,00,74,00,06,00,00,00,04,00,00,00,64,00,00,00,14,00,00,00,00,00,00,80,04,00,00,40,06,00,00,00,00,00,00,00,00,00,00,00,95,03,00,00,93,01,00,00,06,00,00,00,01,00,00,00,01,00,00,00,cb,01,00,00,44,00,00,00,9a,03,00,00,e1,01,00,00,05,00,00,00,00,00,00,00,05,00,00,00,00,00,00,00,00,00,00,80,02,00,00,40,04,00,00,00,00,00,00,00,05,00,00,00,e2,ff,ff,ff,00,00,00,00,55,00,73,00,01,00,03,00,10,00,04,00,05,00,00,00,76,00,69,00