Removing certificates - Windows Mobile Development and Hacking General

Hi folks,
Is it possible to remove the certificate from a signed file?
Thanks in advance.

Yes if it is exe / dll / mui. Haven't found a way to do it with cabs yet.
There is an API function in desktop windows that can do it: ImageRemoveCertificate. So if you can code in any language that can use Win32 APIs you can make a small app to do it.
I've been meaning to write one my self but never got the time.
Alternatively someone may have done this already try google.

http://drewthesecuritygeek.blogspot.com/2006/09/fixing-problem-that-devdiv-has-with.html
May be it is time to create usigner.exe?

UnSigner.exe
Up to you: http://forum.xda-developers.com/showthread.php?p=1503335

Related

Digital Signature PITA

I have search for about three hours now. On the forums and google. I can not find a way to make this work. Any help would be much appreciated.
I am simply trying to customize "phcanOverbmp.dll" so that it matches my phone pad skin. I use resource hacker to change the images and when I save the new DLL it looses the digital signature (expected).
I am using signtool.exe from the Visual Studio SDK and the certificates from the WM5 PPC SDK.
I tried wizard mode and I get "The Digital Signature wizard did not complete."
I also ran it via command line with the "/f SDKSamplePrivDeveloper.pfx" switch and I get "SignTool Error: ISignedCode::Sign returned error: 0x80070057"
I have tried "signcode_294" with the .bat file, that gives me "Error: Signing Failed. Result = 80070057, (-2147024809)"
I researched this issue and found that if it is XIP you cant sign it, but this .dll was taken from my device, so it should be PE.
I am really at a loss...
PLEASE help me solve this. There are soooo many things I have customized that I cant use cause of this issue.
Thanks, Lew
Ok, the problem is you are trying to edit a signed file. This is a big no no!
The thing is signature has a checksum. Once you edit a signed file it automatically becomes invalid so you can't run or resign it.
You need to find a way (sorry, can't help you there) to remove the signature before editing the file.
lewcamino said:
I have search for about three hours now. On the forums and google. I can not find a way to make this work. Any help would be much appreciated.
I am simply trying to customize "phcanOverbmp.dll" so that it matches my phone pad skin. I use resource hacker to change the images and when I save the new DLL it looses the digital signature (expected).
I am using signtool.exe from the Visual Studio SDK and the certificates from the WM5 PPC SDK.
I tried wizard mode and I get "The Digital Signature wizard did not complete."
I also ran it via command line with the "/f SDKSamplePrivDeveloper.pfx" switch and I get "SignTool Error: ISignedCode::Sign returned error: 0x80070057"
I have tried "signcode_294" with the .bat file, that gives me "Error: Signing Failed. Result = 80070057, (-2147024809)"
I researched this issue and found that if it is XIP you cant sign it, but this .dll was taken from my device, so it should be PE.
I am really at a loss...
PLEASE help me solve this. There are soooo many things I have customized that I cant use cause of this issue.
Thanks, Lew
Click to expand...
Click to collapse
If you run the sdk cab before replacing "phcanOverbmp.dll" it will work. It did for the batteryfix project that i helped jimm98y with
download one of his earlier zips that has the file you need in it. Can be combined all in one cab. edit i attached it
see here http://forum.xda-developers.com/showthread.php?t=267321&highlight=battery+fix
Thanks,
I installed that cab to my TyTN and the dll still is a no go. Any other ideas or ways to digitally sign it? I am really desperate, I have been trying for soooo long to get these to work.
Thanks, Lew
Thats strange can you send me the file to my email [email protected] and i will try to get it to work. I will include it in a cab i made before and see if that does the trick.
Microsoft has problems signing on windows 2000 SP4?
Any chance you're using Windows 2000 SP4, If so you might want to check out this link.
http://support.microsoft.com/kb/829924
Probably not the issue but, I figured I'd mention it just in case.
Sorry, but I am running Windows 95 version C. So I don't think that is the issue.
I just got a chance to check the forums, I will e-mail you the dll.
Thanks again, Lew
P.S. I am running XP sp2
I've got a similar problem. I tryed to edit some dll's from HTC Touch Phone Pad International, but since they are digitaly signed, i can't change the contents without invalidating the digital signature. The goal would be to make the phone pad look more like the dialpad. I've created all the pictures I need, and I know which dll's to change. I'm using PE Explorer to edit the resources from the dll's, but first I need a way to remove the digital signature, and after changes are made, re-sign it.
Advices anyone?
FInixNOver said:
I've got a similar problem. I tryed to edit some dll's from HTC Touch Phone Pad International, but since they are digitaly signed, i can't change the contents without invalidating the digital signature. The goal would be to make the phone pad look more like the dialpad. I've created all the pictures I need, and I know which dll's to change. I'm using PE Explorer to edit the resources from the dll's, but first I need a way to remove the digital signature, and after changes are made, re-sign it.
Advices anyone?
Click to expand...
Click to collapse
Well I got it to work. With some help I was able to rebuild the signature in the changed dll's.
FInixNOver said:
Well I got it to work. With some help I was able to rebuild the signature in the changed dll's.
Click to expand...
Click to collapse
How did you achieve this? I am having the same problem and i guess i need to somehow remove the signature too.
Yes, it'll be great to have some information about achieving this!
Thanks in advance
any more information on how to do this?
Did anyone figure out a way to do this ?
*bump* *bump**bump**bump**bump**bump**bump**bump**bump**bump*

How to group cabs in one cab?

Is possible to group several cabs in one cab?
I want it to save in the Extended Rom of my TyTn, so that when I do a HardReset, automatic it starts to install all the modifications of registry and some programs that I have in several cabs from the pocket, without need of pc.
I search on the forum, but I don´t find any solution.
Thanks
Well first off, if you use the autorun.exe that already exists in the extended ROM and modify its configuration file (the name may be different for different devices, but it is usually a plain text file) you can get it to install several cabs in sequence.
Combining cabs is not always possible unless you are the one who created them in the first place.
Get a program called CE Cab Manager. It will show you everything that a given cab includes and let you edit it. As long as it's just files and registry settings there is no problem stuffing them all in one cab.
But if a two cabs contain a setup.dll there is no way of combining them without knowing exactly what that DLL does (it could be anything) and thats almost impossible (unless you can read ARM assembler well).
tristan1412 said:
Is possible to group several cabs in one cab?
I want it to save in the Extended Rom of my TyTn, so that when I do a HardReset, automatic it starts to install all the modifications of registry and some programs that I have in several cabs from the pocket, without need of pc.
I search on the forum, but I don´t find any solution.
Thanks
Click to expand...
Click to collapse
what levenum said is correct... so the best thing for you to do is to edit the config.txt file in your extended rom to have them install... HOWEVER if the cabs you are using arent digitally signed then they wont install using that method, you would need to disable the security first... Since no one has a signed disable security cab that works with the tytn the only option would be to do this on a hard reset; soft reset before the customization, when it boots run the tweak program to disable security, then go to the windows directory and manually launch the preautoconfig.exe
software alternatives
tristan1412, you can also use a software dedicated to this task.
check spb airsetup (www.spbsoftwarehouse.com, i'm not sure if it allows more then one cab), or even better airwizard (http://www.teksoftco.com/index.php?section=airwizard)
the advantage of these programs is in my opinion the compression. then you also get several options like readme/eula (with airwizard you have spash image support and even sd card output support - that creates autorun content for the sdcard)
hope this helps
RM
shogunmark said:
....HOWEVER if the cabs you are using arent digitally signed then they wont install using that method, you would need to disable the security first...
Click to expand...
Click to collapse
First of all, thanks for the answers.
now, How can signed digitally my own cabs??

I need an empty dummy program

Hi there
I need a small, fast, dummy .exe program that does absolutely nothing on a PPC.
I know this is a strange request, but I've hexedited an executable that needs a valid return code from another app, so it's a long story... ...
Anybody able to supply me with one? I've built one in vb.net CF but I could do with a native app that doesn't need the compact framework installed.
Carlos
try this
http://www.stormpaintball.com/toshiba/DoNothing.exe
Thanks, I'll give it a whirl - any idea whether it exits with a successful return code?

VB programs in WM5 without port to .net

I'm trying to run an especific application made with VB in WM5. Although many statememts that this is not possible and that we have to migrate the code to .net, I managedto make it run. After installation however, no new programs are allowed to install. Can you help me founding the root of this issue? Is important to me to learn about the origin of this incompatibility.
I guess you mean evb programs (scripts)... i think its that after uninstalling them there is a problem with the files with .vb extension and that can be solved when creating the distributable cab changing the regkeys that are modified (its a value wich is changed from 0 to 1 but I can´t recall)... i guess the solutions is explainde in omnisoft forums, also there is the explanation to register additional components to evb... well, it has a long time since i try it... also it works with wm6...
Thank you for your answer. The problem was different.
A specific app Called Diagnosis Pro ( Very Expensive one) refused to install in my WM5 and WM6 devices. It only worked at PPC2002 and WM2003 and 2003/SE devices. Now I managed to install it in My WM4 and 6 devices after changing the dlls that was in the cab file. It's working Ok now.
It's Ok!

Self deleting executable

Hello all,
I am trying to write an application in Visual Basic.NET 2008 for the Windows Mobile 5.0 platform. One of the features of the application is that it needs to have a "panic" button. The idea is that a user can run the application and press the panic button. The application should then terminate immediately and remove itself (the physical executable). A sort of self destructing program
The problem is that an executable cannot be deleted if it is running because the file is locked. It can only be deleted after the program has terminated, but after the program has terminated it is not possible to fire a delete command anymore.
I have done some investigation on the web and I found this article: http://www.catch22.net/tuts/selfdel
The article explains the problem and it also provides a few solutions. Unfortunately I am not familiar with writing C++ or assembler (too stupid ) ) so I have not been able to use "the ultimate self deleting executable code".
Is there anybody here that can help me a bit to get this working ? Any help is appreciated
There are two ways:
1. Use something else to delete you app.
2. Figure out the ASM root.
By your own admission, 2 isn't viable, so that leaves us with 1.
I can think of 2 ways to do it, a seperate App to delete yours, all the other app does is way 2 seconds and run, and keep running and retrying until the File is Deleted. Your app then calls it and quits.
The other way is to do the above process but use MortScript to delete and wait instead of an app. There's loads of Mort examples on xda.
Dave

Categories

Resources