[Q] Running Windbg/cdb on Surface RT Window 8.1 Preview - General Questions and Answers

As was discussed here, you are no longer able to run the Arm debugging tools in Windows RT 8.1 Preview. I tried cdb version 6.2.9200.16398 and 6.3.9431.0 with no success.
According to Netham45, he was able to run cdb/Windbg but was unable to attach to csrss. I'm working on a jailbreak technique that involves modifying two DWORDs in a different, non-privileged process but without the ability to attach to another process in non-invasive mode and the ability to modify two DWORDs at a fixed location in the .data section, I won't be able to run my jailbreak in Windows RT 8.1 Preview.
As soon as I get this technique working in 8.1 Preview, I would be happy to share it.
FYI, the ARM debugging tools are now publicly available in the WDK 8.1 Preview

OK. I figured it out. You need to install the Windows 8.1 Preview WDK and do the following:
From an elevated command prompt: cd "%ProgramFiles(x86)%\Windows Kits\8.1\bin\arm\SecureBoot"
Run InstallKitsPolicy.cmd
Allow your Surface RT to reboot. When the machine reboots, follow the instructions on the screen. Use the Volume Down button to select Accept and install and then press the Windows button to accept the agreement terms.
You may now use cdb/Windbg (Windows RT 8.1 Preview versions) on your Surface RT.

Related

[Q] Hacking Windows RT to Run Desktop Apps?

Obviously no one has a had a chance to try this yet, but will there be an effort to hack Windows RT to enable more desktop applications? I really don't care about the desktop, but there's one tiny utility that would be extremely useful. I use a program from Microsoft called "Mouse Without Borders" to control two computers with one keyboard and mouse. I'd love to do this on the Surface RT I'll be buying, but of course because it's a desktop application, I probably won't be able to.
revxx14 said:
Obviously no one has a had a chance to try this yet, but will there be an effort to hack Windows RT to enable more desktop applications? I really don't care about the desktop, but there's one tiny utility that would be extremely useful. I use a program from Microsoft called "Mouse Without Borders" to control two computers with one keyboard and mouse. I'd love to do this on the Surface RT I'll be buying, but of course because it's a desktop application, I probably won't be able to.
Click to expand...
Click to collapse
Compiling desktop apps for ARM using VS 2012 gives an error message, but it can be bypassed. Not sure if the results will run in Windows RT though.
Of course there's no way to find out until Windows RT devices are released to the public, because everyone who has access to one is under NDA. Have some patience.
for what you are suggesting, i believe it is technically either impossible or reliant on an emulator. since windows RT is for ARM processors and normal windows is for x86 processors, instructions would need to be converted from x86 to ARM in order to be used. this would be the job of an emulator, which would most likely not be able to be integrated deeply enough in the OS to do what you are talking about. even if it was, it would run slower than optimal.
now if microsoft releases the source code for their application (very unlikely), its an entirely different story. then the code can be recompiled for an ARM processor, making anything possible.
someone correct me if im wrong, but i believe im correct.
Pseudonym117 said:
for what you are suggesting, i believe it is technically either impossible or reliant on an emulator. since windows RT is for ARM processors and normal windows is for x86 processors, instructions would need to be converted from x86 to ARM in order to be used. this would be the job of an emulator, which would most likely not be able to be integrated deeply enough in the OS to do what you are talking about. even if it was, it would run slower than optimal.
now if microsoft releases the source code for their application (very unlikely), its an entirely different story. then the code can be recompiled for an ARM processor, making anything possible.
someone correct me if im wrong, but i believe im correct.
Click to expand...
Click to collapse
As someone who has one of these devices, I can't say much more other than it will not happen, I am sorry. You'll need to start barking at the developer to make a ARM Compatible App... Not likely it will happen as the API's are very different.
lseidman said:
As someone who has one of these devices, I can't say much more other than it will not happen, I am sorry. You'll need to start barking at the developer to make a ARM Compatible App... Not likely it will happen as the API's are very different.
Click to expand...
Click to collapse
You have an ARM device? If so, can you say 100% that there is no way to target win32/desktop using new code? It would be great to know for sure. I know it's possible to compile desktop code that targets ARM, producing a certain mystery executable. The only question is, will it actually run?
I have an arm device running WindowsRT. I compiled a HelloWorld for arm no problem in VS2012.
Unfortunately it will not run. Get 'Windows cannot verify the digital signature for this file'
If anyone knows a workaround to this we might be able to get it working
xanderkaiber said:
I have an arm device running WindowsRT. I compiled a HelloWorld for arm no problem in VS2012.
Unfortunately it will not run. Get 'Windows cannot verify the digital signature for this file'
If anyone knows a workaround to this we might be able to get it working
Click to expand...
Click to collapse
well the simple way would be to sign it. HOW to sign it is a completely different problem... there may be a group policy change or registry edit to turn off signature verification, but i am not familiar with windowsRT at all.
phailyoor said:
You have an ARM device? If so, can you say 100% that there is no way to target win32/desktop using new code? It would be great to know for sure. I know it's possible to compile desktop code that targets ARM, producing a certain mystery executable. The only question is, will it actually run?
Click to expand...
Click to collapse
How did you bypass the error message in VS2012? Can you share the exact steps you took to bypass the error as well as your mystery executable here so that folks who are under NDA and have early access to the ARM devices can try it out?
Since Office RT is a desktop app, one can only assume all of this is possible.
Windows RT is basically just Win8 recompiled for ARM, with one major exception: EXE files need to be signed by Microsoft before they will run. This means that MS can release desktop apps just fine - they have the signing keys, after all - but third-party software can't run by itself (as a desktop app) and will need to be bundled as an .APPX file (Metro-style app bundle).
If you want to try bypassing the signature check, there are a few things you could attempt. One would be to create your own signing certificate, install the public key in the OSes root code signing cert store (not the per-user store, though it qprobably wouldn't hurt to install it there too), and then sign your test apps with that cert. MS *probably* used certificate pinning - where a specific cert is used, rather than just any cert present in the OS of sufficient trust level - but they may not have, too. Alternatively, you could try looking for some legacy or debug functionality to disable the code-signing. Finally, you coul try using a built-in program, rundll, to invoke your applications.
I can't test any of this right now, because I don't have an RT device. There's a lot of research on them that I want to do, though.
Quote from one very old MS Windows 8 document, from those times when windows RT was called "woa" (2011). Everything could have changed from those days.
Description of the change:
WOA platforms will require that all desktop binary images be signed with a trusted Microsoft certificate. Any unsigned code will fail to load. This document describes the technical steps required to enable unsigned test, development, or manufacturing applications to run. This document does not cover Metro Style applications for which there is a separately documented signing requirement and developer licensing.
Action required
In order for any test binary or tool to run on WOA platforms you must do one of the following:
· Register the install location of your test binaries as an exclusion path, OR
· Attach a Kernel Debugger and disable checking by setting the appropriate registry value
...cut...
2. Scripts - Scripts will be allowed to run if the script host (e.g. cscript.exe, cmd.exe, etc.) is Microsoft signed or is run under an exclusion path.
...cut...
How to register your test binaries in an exclusion path
...cut...
Exclusion paths are listed in the following registry key in REG_MULTI_SZ format:
Key: HKLM\SYSTEM\CurrentControlSet\Control\CI\TRSData
Value: TestPath
Paths added to this key should be in one of two formats:
1. Path (recursive): \Program Files\TestAutomationPath
2. Binary (specific): \Program Files\TestAutomationPath\mybinary.exe
Note: Do not include the drive letter of the volume. Each path will be excluded across all volumes.
...cut...
The following paths are restricted and cannot be added as an exclusion:
1. \
2. \Windows
3. \Windows\System32
4. \Program Files
...cut...
How to disable signature verification with an attached Kernel Debugger
To disable signing verification when a Kernel Debugger is attached the “DebugFlags” value must be deleted from the “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CI” registry key and the system must be rebooted. After this Signing Verification will not take place.
This can be scripted by putting the following in a .cmd script and executing with admin privilege:
cmd /c reg delete "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CI" /v DebugFlags /f
shutdown -r -t 0
...cut...
Note: Enabling Kernel Debug will not be allowed by default on machines with Secure Boot enabled. Either Secure Boot will need to be disabled, or during boot the F8 menu selection to EnableDebugging must be chosen.
...cut...
At a later point, changes will be made to Windows 8 builds which will enforce that only machines configured as “Debug System” will support exclusion paths.
A “Debug System” is will initially be identified by the presence of the Microsoft Test Signing CA in the UEFI signature database (“db”).
...cut...
Note: If there is a need to run unsigned tools, the system can be configured as a “Debug System” during manufacturing but there must be a step in the production process that removes the Microsoft Test CA.
Production machines must not ship with the Microsoft Test CA in the db.
Click to expand...
Click to collapse
First we need to get hands on ARM device. I'd recommend Qualcomm-based, as chinese friends regularly leak their docs/sources. MS Surface is Tegra-based, so don't buy it
And one more thing:
This document “Enabling Debug Mode for Development, Manufacturing, and Support of Windows RT Devices” discusses placing a production device into ‘Debug Mode’ is accomplished by creating a per device Windows Debug Policy using tools provided by Microsoft.
Click to expand...
Click to collapse
Unfortunately I don't have “Enabling Debug Mode...” document, as I don't have access to connect.microsoft.com. Anyway it would not be helpful for us, end-users.
So to turn on a device to debug mode - you'll need a special "something" that is signed for your particular device. Sign is based on 2048-bit key, so you can't bruteforce it. But you can try to hack UEFI. UEFI is partially opensourced, so you can start to study its code now from edk2.sf.net
And one more way. Remember the test signing mode in Win7+. It is still present in Win8. Turn it on via bcdedit on your RT-device, use your own certificate to sign your driver or your program, ..., profit.
But be careful when hacking. There are known problems with BitLocker when test signing mode is on. The OS simply would not boot. Lets hope that we could disable BitLocker on our devices...
Just tried editing the registry to add a testing path. Didnt work
Still asks for certificate
xanderkaiber said:
Just tried editing the registry to add a testing path. Didnt work
Click to expand...
Click to collapse
According to MS document - this would work only on "debug mode"/"debug system" devices.
Can you turn on the test-signing mode:
Code:
In elevated CMD type:
bcdedit.exe /set {globalsettings} testsigning Yes
bcdedit.exe /set {bootmgr} testsigning Yes
bcdedit.exe /set {current} testsigning Yes
and try to sign your app with your own certificate I hope that test signing is still present on WinRT.
But first check that you are not using BitLocker (the "get-bitlockerVolume" command in admin's powershell). According to MS docs the retail device would not boot in this case (this info is taken from windows phone 8 "portico" docs, so may be unrelated to WinRT devices).
danchar4 said:
How did you bypass the error message in VS2012? Can you share the exact steps you took to bypass the error as well as your mystery executable here so that folks who are under NDA and have early access to the ARM devices can try it out?
Since Office RT is a desktop app, one can only assume all of this is possible.
Click to expand...
Click to collapse
Theres some info on the web somewhere for a config change to VS2012 that lets it build ARM desktop apps
Not that you can run them due to the signing issues
http://stackoverflow.com/questions/...op-programs-be-built-using-visual-studio-2012
I did it!
I managed to build and run a windows application for arm! Just turned on test signing and signed it with my own cert, then compiled for ARM in vs2012 and it ran
Definitely a good sign
xanderkaiber said:
I did it!
I managed to build and run a windows application for arm! Just turned on test signing and signed it with my own cert, then compiled for ARM in vs2012 and it ran
Definitely a good sign
Click to expand...
Click to collapse
Working on the surface?
Sent from my SCH-I535 using Tapatalk 2
eorsini said:
Working on the surface?
Sent from my SCH-I535 using Tapatalk 2
Click to expand...
Click to collapse
Not a surface, a Qualcomm engineering sample device. But I imagine it would definitely work on the surface also.
xanderkaiber said:
I managed to build and run a windows application for arm! Just turned on test signing and signed it with my own cert, then compiled for ARM in vs2012 and it ran
Click to expand...
Click to collapse
Great news
Seems that turning on the test-sign mode would soon be a must on ARM devices, at least for those of us who need programs like VLC player, DosBox, FAR manager and so on.
As far as I can see, you could port pretty much anything (as long as it's c++) if you can get the source code.
Might give VLC a try now
Doesn't seem like a very good solution to me though.
While it's nice that progress is made, I think that running unsigned apps should be the primary focus - Microsoft could revoke the keys at any time.

[Q] Windows RT Preinstallation Environment Unsigned Apps

Hi Everyone,
This post is clearly in the wrong thread, however, being a new member I am unable to post here:
Windows 8 Development and Hacking> Microsoft Surface
Any chance this could be moved by a mod?
Anyway, I was wondering if it would be possible to execute unsigned apps, ideally the desktop variant, within the pre-installation environment of Windows RT.
I've compliled a command line driven 'hello world' executable for test purposes using Visual Studio 2012 (compiled as ARM).
I can get the Surface RT to boot into the pre-installation environemnt from a USB device (volume down when powering the device on allows this), however, the application fails to execute, which would indicate that enforced signed apps are even required within the pre-installation environment.
Does anyone have any suggestions how unsigned apps can be executed within this environemnt?
Basically, I work in the field of digital forensics and I am looking to develop a free tool to create a disk imaging tool for this platform, I could use dism to capture an image of the drive, but this would not pick up unallocated space and it would also not be a true representation of where the files were on the original disk. I should be able to use some existing registry settings to enforce write protection on the disk.
Thanks in advance for your assistance.
Colin.

start menu

Is there a way i can add the start menu on my rt, I installed pokki my desktop running windows 8,but cant seem to install on my rt.
ha, nope sorry buddy! windows RT is completely different to windows 8, RT is using a ARM processor 'tegra 3' this means the software will have to be made for an arm CPU, that's why it won't work on your rt device. this is also why there is a marketplace for downloading all of your apps....
sorry.
ssfirme said:
Is there a way i can add the start menu on my rt, I installed pokki my desktop running windows 8,but cant seem to install on my rt.
Click to expand...
Click to collapse
you can jailbreak your device using this and then run classic start menu from here. works perfectly on my surface rt
Dane, you're actually incorrect... there's a hack available (on this very site, even), commonly referred to as a "jailbreak", that allows running apps which aren't from the store, sideloaded, or from Microsoft on Windows RT. They still need to be compatible with ARM, as you say, but recent .NET apps work fine with no changes, and many C/C++ open-source apps have been recompiled.
Classic Start has been available on RT for a couple weeks now, using this method. Download the jailbreak hack, unzip it and run it, then follow the instructions. Download and install Classic Start following the instructions in the post linked from my thread, List of desktop apps for hacked RT devices, then restart Windows Explorer (or just log off and log on again) and you'll have a Start menu if you want it so badly (I don't get the fuss; on a tablet, the Start screen really is a better option IMO, but it's available).
Also, there is actually a work-in-progress hack to allow running unmodified x86 programs on RT as well, using dynamic recompilation from x86 to ARM code.
Why would you need a start menu on Rt?
You actually can... I've got 7-Zip, PuTTY, Gvim, MirandaIM, IKVM (and through it, Burp Suite and some other Java programs), Fiddler 4, Python 2.7, and some other "legacy" programs installed on my RT. I'm working on porting Chrome (it's a chrome-plated ***** of a project, if you'll excuse the terrible joke). I also temporarily install additional apps to test them out as people port them to RT. Finally, I've installed the Win86emu beta, which isn't a legacy program but is a desktop program; it's written especially for Windows RT and allows running (some) x86 legacy apps on RT directly and unmodified.
deeman said:
Why would you need a start menu on Rt?
Click to expand...
Click to collapse
more of a want than need but it's a familarity thing, i'm sure.
Can I get GOM player or any good player working on RT which can support most extensions ??
mohitgalaxy3 said:
Can I get GOM player or any good player working on RT which can support most extensions ??
Click to expand...
Click to collapse
Unrelated to this thread

[Q] Re Jail Beak Win RT

I would like to start a Mission to re-jail break Windows RT. It has everything needed to run full programs, couldn't we just find and delete the files that are blocking the installation of full desktop programs.........
No. Windows RT, like Windows Phone, is compiled for the ARM architecture. "Desktop Windows Applications" are all compiled to use the x86 instruction set.

[app port] RemoveDriveByLetter

I don't like using touchscreen, trackpad or mouse often. So I ported this: https://www.codeproject.com/Articles/13839/How-to-Prepare-a-USB-Drive-for-Safe-Removal
Usage (from cmd.exe):
RemoveDriveByLetter.exe D:
Will attempt to safely remove the D: drive and report the result. Tested on Windows Surface RT running Windows 8.0. This binary is therefore not signed nor required to be under that circumstance.
Zero views, but anyway, here it is for Windows RT 8.1

Categories

Resources