SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Reverse Engineering and Modifying Windows 8 apps
Angel
Justin
Hi folks,
In this article I’ll share the results of ad-hoc security vulnerabilities research I’ve done on
windows 8 apps deployment. Specifically, we’ll discuss fundamental design flaws that
allow to Reverse Engineer Win8 apps, modification of installed apps and the negative
implications on Intellectual Property rights protection, Licensing models and overall PC
security. Finally we’ll discuss some creative ideas on how to mitigate these security
issues.
Meet the mother-load: C:Program FilesApplications
All Windows 8 applications in the developer preview are installed under the clandestine
C:Program FilesApplications location. I will hazard a guess and say that once the
Windows App Store goes online it will install all apps under that folder. Currently the
folder is an invisible one and cannot be accessed from Windows Explorer user interface
on a new Win8 developer preview install.
Here’s an example of some of the 29 apps Win8 apps installed on the Win8 developer
preview:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
1 of 32 21-Dec-12 12:36 PM
And here’s the hidden folder backing it up:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
2 of 32 21-Dec-12 12:36 PM
Gaining Access to C:Program FilesApplications
In essence you’ll need to navigate to that folder, hit “Security Tab” and set yourself up as
the owner. Let me walk you through that process step-by-step.
1. Type in “C:Program FilesApplications” in the Windows Explorer address bar and hit
enter.
2. Observe in shock and dismay the system dialogue saying you don’t own a folder on
your own machine. Hit “Continue”.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
3 of 32 21-Dec-12 12:36 PM
3. After hitting “Continue”, you’ll be confronted by the following dialogue:
Do not hit “close”, instead click the “security tab” link.
4. In the following system dialogue click “advanced”.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
4 of 32 21-Dec-12 12:36 PM
5. Click the “change” link in the owner security field.
6. Add in your live ID or windows 8 user name to the “select user or group” system
dialogue.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
5 of 32 21-Dec-12 12:36 PM
7. Click “OK”, Click “OK”, Click “Ok”.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
6 of 32 21-Dec-12 12:36 PM
8. Type in “C:Program FilesApplications” in the Windows Explorer address bar and hit
enter. You now have access to the Applications folder.
What type of apps ship with Windows 8?
Looking at this folder it’s fairly easy to determine what type of apps ship with Windows 8
developer preview.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
7 of 32 21-Dec-12 12:36 PM
What’s in C:Program FilesApplications?
For HTML apps the folder contains all of their source code and it can modified.
For C# apps the folder contains the XAML source code and a compiled reverse-
engineerable and modifiable version of the C# code.
For C++ directX apps the folder contains compiled binaries. Honestly, C++ isn’t my
specialty so I’ll avoid discussing it at any great length.
Reverse Engineering HTML & Javscript & CSS Win8
apps
There’s a fundamental design flaw in the concept of HTML apps. HTML, Javascript and
CSS are all interpreted languages, and not compiled languages. Meaning you have to
ship the source code for your app instead of shipping compiled binaries. That puts the
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
8 of 32 21-Dec-12 12:36 PM
Intellectual Property of anyone choosing to write any HTML & JS & CSS only app for any
platform under risk.
For example, here’s the HTML source code for the Tweet@rama Win8 app code:
And here’s the tweet@rama Javascript code that does the actual posting to Twitter:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
9 of 32 21-Dec-12 12:36 PM
Modifying HTML & Javscript & CSS Win8 apps
Part of the problem with interpreted languages is that they don’t compile until the very
instance they are executed. Which allows evil-doers to edit the code prior to execution.
For example, here’s a print screen of the tweet@rama default app;
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
10 of 32 21-Dec-12 12:36 PM
Let’s modify the HTML, Javascript and CSS for this application: (for the sake of brevity
we’ll only walkthrough a simple HTML change)
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
11 of 32 21-Dec-12 12:36 PM
By modifying the HTML & CSS & Javascript source code we can change the visual
design to something a bit more visually pleasing:
Notice that we’ve changed both the design and behaviour of the app by modifying the
source code. The new design has a different title, and the new behaviour is using the
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
12 of 32 21-Dec-12 12:36 PM
picture of the logged in user as the background. We have the power to completely
change both the visual design and the executing source code of HTML & CSS & JS
win8 apps.
New breed of viruses?
Any unauthorized malware that gains access to C:Program FilesApplications could
potentially modify source code to execute in malicious ways. Since this is the direction
Win8 apps are taking writing this type of viruses is likely to become a growth industry.
For example we could look at the tweet@rama app once again. The most valuable asset
that app has is our twitter oauth credentials. A virus would be able to modify the
tweet@rama source code so once it executes it retrieves those credentials and sends
those to a malicious remote endpoint. The following code interjected into the Javascript
code of tweet@rama would do just that:
New breed of cracks?
Any unauthorized executable that gains access to C:Program FilesApplications could
potentially modify source code to workaround Windows Store app purchasing and
licensing logic. The whole concept of Trials and feature purchases are based on
Javascript, C# or C++ code invoking Windows 8 RuntimeTime APIs for the Windows
Store. Any change to that code could potentially change the purchasing and licensing
logic for that app.
For example, In BUILD conference Microsoft’s Arik Cohen demonstrated
(http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-123T) (35:25) the following
code that performs a Javascript check for isTrial.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
13 of 32 21-Dec-12 12:36 PM
It would be a trivial endavour to manually edit this Javascript file and remove the
“licenseInformation.isTrial” check. And by doing so removing Trial restrictions from this
sample Win8 app.
If this set of problems are not mitigated, app piracy through app modification for
Windows Store apps will likely become quite prevalent.
Reverse Engineering C# + XAML Win8 apps
C# code is shipped in compiled EXE & DLL binaries. XAML is shipped as plain text
source code. That makes both forms of code extremely susceptible to reverse
engineering.
For example, we could open up the “Memories” (C# WinRT XAML app) MainPage.xaml
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
14 of 32 21-Dec-12 12:36 PM
in KaXaml (http://kaxaml.com/) and see the XAML source code:
Using JetBrains dotPeek (http://www.jetbrains.com/decompiler/) it would be possible to
see the C# source code for the Memories app:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
15 of 32 21-Dec-12 12:36 PM
Modifying C# + XAML Win8 apps
The XAML for Win8 apps is stored in plain-text and can be edited from any text editing
tool. The .net binaries are unsigned and thus can be edit using the MSIL Weaving tool
Reflexil (http://reflexil.net/).
For example, here’s the “Memories” C# XAML app shipping with Windows 8 developer
preview:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
16 of 32 21-Dec-12 12:36 PM
Editing the XAML is fairly trivial since it’s stored as a plain text file:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
17 of 32 21-Dec-12 12:36 PM
Editing C# can be done using Reflector’s Reflxil MSIL Editor:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
18 of 32 21-Dec-12 12:36 PM
With some light modifications to the XAML and C# code we can change the display and
behaviour of the app:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
19 of 32 21-Dec-12 12:36 PM
Reverse Engineering C++ Win8 apps
I’ll confess to not being a strong C++ developer (gasp!) so I’ll keep this brief by showing
C++ apps are also susceptible to reverse engineering. It appears that Microsoft’s Store
app is written in C++. The most important asset that app would have are the endpoints
for the Microsoft store. Opening the C:WindowsSystem32WinStoreWinStoreUI.dll in
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
20 of 32 21-Dec-12 12:36 PM
notepad and searching for “https” addresses reveals the following URL:
Following the http://go.microsoft.com/fwlink/?LinkId=195322&clcid=0x409
(http://go.microsoft.com/fwlink/?LinkId=195322&clcid=0x409) URL leads to a currently
inactive URL of https://services.apps.microsoft.com/browse
(https://services.apps.microsoft.com/browse). I would hazard a guess that this is the
URL currently being used to test the Windows App Store.
What have we conclusively proven during this blog
post?
Keeping in mind that Windows 8 is only an alpha developer release, we’ve seen a
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
21 of 32 21-Dec-12 12:36 PM
couple of disturbing things:
It is possible to reverse engineer and modify HTML, JavaScript and CSS code
shipped in Win8 apps.
1.
It is possible to reverse engineer and modify C#/VB.Net source code shipping with
Win8 apps.
2.
It is possible to reverse engineer and modify XAML source code shipping with
Win8 apps.
3.
It is possible to (at some limited level?) reverse engineer C++ Win8 apps.4.
Can Microsoft completely solve this problem?
No. In my opinion, apps shipping as part of all app stores will always be vulnerable at
some limited level to reverse engineering and modification.
Can Microsoft mitigate this problem?
Yes, Microsoft can make apps significantly more temper-proof and pile a lot of hardships
on those seeking to reverse engineer and modify Win8 apps. Assuming malicious code
and people can’t access C:Program FilesApplications seems naïve at best.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
22 of 32 21-Dec-12 12:36 PM
Here are few suggestions for what some of those potential aforementioned hardships
might be:
Obfuscate C#/VB.Net projects by default: .net projects default to shipping with
unobfuscated source code. If Microsoft is serious about introducing a Windows
App store obfuscation has to be turned on by default for all .net project, not just a
nice-to-have addon like it is right now. The VS2011 team should investigate and
integrate an obfuscation solution directly into the product and turn it on for all new
.net projects. This would make it harder to reverse engineer .net apps.
1.
Minify HTML, Javascript and CSS projects by default: With the joys of desktop
deployment web developers will likely forsake Javascript, HTML and CSS
minification. Again, a good path forward here is to make sure all HTML, Jacascript
and CSS code is minified by default. This step would make it harder to reverse
engineer HTML apps.
2.
Strongly sign all .net assemblies by default: Strong-signing has been part of the
.net framework for 10 years now. Turn it on by default with a unique developer
license certificate for all Win8 .net apps. Make sure Win8 AppContainers only run
signed apps, don’t even have a hidden registry key to enable unsigned apps (like
WP7 does (http://twitpic.com/6josnn)). That would make it harder to modify .net
apps.
3.
Checksum HTML, Javascript and CSS project before startup: Even if it’s
unpreventable that modifying Win8 HTML apps would take place, run a checksum
on all files before loading the app into memory. That would make it harder to
modify Win8 HTML apps. It sounds like AppBlockMap.xml is supposed to do
something similar, but it doesn’t seem to work.
4.
Don’t store App’s executing files as plain-old files on the user’s hard-drive: It
shouldn’t be possible to even see the files shipping with an app by default using
just Windows Explorer. A lossless compressed folder with DRM protection would
be a good step forward here. This should make it harder to reverse engineer Win8
apps.
5.
tl;dr: If Microsoft doesn’t undertake the aforementioned steps or comparable ones it’s
not because it can’t, it’s because it doesn’t want to. If Microsoft chooses to ignore this
problem for the remaining one year (?) development lifecycle for Windows 8 then it’s not
because it couldn’t solve these problems.
Visual Studio 2011 App Deployment
Apps deployed by Visual Studio 2011 do not get deployed to C:Program
FilesApplications but rather get deployed to C:Users<UserName>AppxLayouts.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
23 of 32 21-Dec-12 12:36 PM
The alternate location for Visual Studio app deployment and all other app deployment
are controlled by the registry folder HKEY_CURRENT_USERSoftwareClassesLocal
SettingsSoftwareMicrosoftWindowsCurrentVersionAppModel.
Feedback
Have questions about the methodologies used in this article?
Have more interesting workarounds you’ve tried and like to share?
Have interesting suggestions for the Microsoft folks on how to help mitigate this
problem?
Sound off in the comments!
-- Justin Angel
(Disclaimer: this article represents research I undertook on my own and is unsanctioned
by any organizations or corporations I might be related with.)
Published on 9/20/2011 12:00:00 AM by Justin Angel ©2012.
This work is licensed under a Creative Commons Attribution 3.0 Unported License
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
24 of 32 21-Dec-12 12:36 PM
(http://creativecommons.org/licenses/by/3.0/).
Comments
Jeremy Says:
Very nice article Justin, thanks for sharing. I started to look at the
proportion of HTML vs XAML vs Native apps and I appreciate your
diagram. I'm looking forward seeing what Microsoft will do to mitigate
those issues.
pedro Says:
You seem to forget a little detail.. Final apps will be signed.
Justin Angel Says:
Signed apps would be one of the small obstacles I've mentioned.
However, I'm not sure what signing apps would mean for HTML
apps. How exactly does one sign HTML files?
Also, more importantly, Signing attempts to protect against
Modification. It does nothing to solve the Reverse Engineering
issue.
pedro Says:
I'm guessing that app packages will be encripted and signed.
And the reverse engineering is a non issue. How do you
protect current apps from being reverse engineered? Even
obfuscating .NET apps doesn't really protect you, it only makes
it harder.
If signing the apps is enough to prevent tempered code to be
executed, I'm OK with that.
DrPizza Says:
Can you explain to me which of these is a Windows 8 issue?
Consider that the .NET decompilers are for, uh, all .NET
programs, not just Windows 8 ones, and that Web browsers let
you look at both HTML and JavaScript directly.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
25 of 32 21-Dec-12 12:36 PM
How does one sign HTML files? You stick a signature in a file
and put it alongside the rest. You know, the same way that you
sign .inf files in driver packages.
Justin Angel Says:
Windows 8 made the choice to consume interpreted
languages as offline application development languages. I
am calling out that it there are some issues with that plan
going forward in regards to the aforementioned concerns.
How does one sign HTML files? It is possible to sign &
encrypt anything. HTTPS for example is an encrypted and
signed HTTP transport layer.
Addressing the core point of your argument: I believe that
Microsoft has people smarter than myself that could
provide more realistic solutions to the issues I've raised.
IMO This is a set of problems that have potential solutions.
Luke Says:
On the default user you enter more pc settings (from
metro) and open user.
There is an option to switch to Microsoft account.
This option is not available by default on the build-in
administrator account.
Is it possible to enable this on the build-in
administrator?
I can use most of the metro apps on the build-in
administrator account when/if I change
this regkey FilterAdministratorToken from 0 to 1
Sarkie Says:
When looking for string data in .exes.
Use Strings
http://technet.microsoft.com/en-us/sysinternals/bb897439
Aside:
Why is this whole site in Silverlight?
Alberto Says:
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
26 of 32 21-Dec-12 12:36 PM
Whats the problem the site beeing in silverlight?
-.-
Michael Crump Says:
Excellent blog post Justin! I have also heard that final apps will be
signed. But right now you have exposed several flaws that Microsoft
needs to be aware of.
Jeremy Brayton Says:
Signing happens at the project level, not individual files. I want to
speculate that the dev preview was simply rushed and the DRM
protection we're about to see in the Mango store is going to hit AppX
too. Having to what amounts to unzipping an app before every run is
going to increase at least that initial load time but you could use a
temporary secure location to cache this kind of stuff. They might've
thought this would be sufficient but you proved how easy it was to
unlock that jail cell.
Regarding checksums against HTML content, I would say just do a
checksum against the *entire project* as one motion. It's essentially the
same thing but we're really interested in the sum, not so much individual
files but doing them individually would be a way for us to tell which file
has been tampered with so I'm a little on the fence about my own
suggestion.
I think if we start to get to the beta and RC stages and no significant
changes are made in this area that all of us should worry. I'm glad they
can address it now and I'm glad you figured this out to make sure they
do. There's still plenty of time to plug these holes but we definitely need
to keep a fire up their ass to make sure our apps aren't cracked in one
fell swoop. If I'm relying on your app store and one point of failure is all
that is needed to expose EVERY app, you might want to rethink your
design a bit and I hope they at least give us the option to run extra
licensing mechanisms on top if we so choose. If they don't plug these
holes AND get heavy handed there, I could never recommend
developing for their app store.
Fallon Massey Says:
Does that mean that C++ is the best language to program in?
Because with C++, you'll need a disassembler, and that still won't net
you the correct code.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
27 of 32 21-Dec-12 12:36 PM
Philippe Da Silva Says:
With every new OS comes new security threats especially when you're
adding something new that hasn't been tested accross mainstream
audience.
While I don't care much about seeing people modifying apps I purchase
since it opens the way to application "mods" that us, consumers, will
decide to use or not, I'm way more worried about the Win8 Apps being a
real system security threat for viruses and other malware that could act
on my behalf in my machine.
This should definitivelly be the top security priority of Microsoft from my
point of view.
I personally see Win8 Apps as Rich Clients for distributed & cloud
content or processing. I can't think of any application that would make
use of the Metro UI and paradigm that don't fall into such user
requirements.
For all other user requirements, we'll stick to our old yet very familiar
Explorer environment ;)
All in all, I'm really glad to see Microsoft finally taking a step backward,
looking at the market and sharing with us what they see as the future of
our computer/software usage ;)
Ian Griffiths Says:
Session PLAT-905C went into quite a lot of detail on application
packaging. The signing mechanism covers everything in the package,
and is independent of file type. You could even put binary files with a
format of your own devising in there and it'd still be able to check their
validity. Logically speaking, it's pretty similar to how Silverlight supports
it - you sign the container rather than individual files. In Silverlight, you
can apply a digital signature to the ZIP file, and that'll cover everything
in there, no matter what the format of the individual files. The fact that
the streams happen to be extracted out into files in a folder in Win8 is
no obstacle to this - it just requires a scheme for how the whole
directory should be handled - as long as Win8 knows that (say) the appx
manifest contains a list of signatures for everything (including itself),
then it can check everything. IIRC, that's pretty much how ClickOnce
worked - it was able to check validity even when each of the resources
in the app was downloaded separately. So this is not new.
Nor is reverse engineering. C++, Xaml, and JavaScript are precisely as
easy to reverse engineer in Win8 as they were before.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
28 of 32 21-Dec-12 12:36 PM
piers7 Says:
As an aside, in the keynote Sinofsky claimed the Apps app was written
in Javascript/HTML, whereas you seem to suggest C++...
dsurendra Says:
Cool....
ZUyq5def Says:
Maliscious won't have access to the program filesapplications directory
(among other things, such as signing). The steps that Justin goes
through to access the directory require explicit user action - they can't
be done programmatically (unless the app already has privileges - in
which case it doesn't really make sense for the app to go messing w
other apps, because it can already do whatever the maliscious user
wants).
Justin Angel Says:
Yep, the Program FilesApplications folder is protected the same
way modern-day Program Files directory and Windows directory
are protected.
However many viruses, spyware and malware (if not the majority of
those) currently use those locations to hide, store and modify their
executables.
Theoretically, you're right to say there's a hurdle here. Practically,
you'll have to ignore the entire history of modern-day malware to
claim it'll matter in the long run.
rtruth Says:
HTML and javascript are plaintext on the web, I don't see that
preventing developers from writing code.
Second of all, it doesnt matter if the code is plain text, .net, or
assembled c code, you can always see the code. Even in c code, you
just disassemble the binary and its right there in front of you. You can do
the same things you are doing now with html.
Also,even if the apps are signed, its only trivial to patch the check by the
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
29 of 32 21-Dec-12 12:36 PM
OS. On an open system like a PC, its impossible to stop this.
Its just the reality of software development. If you make good software,
it will be pirated. And those that pirate will never buy your stuff in the
first place anyways.
Zach Heise Says:
Hi Justin, I was curious about this in the Customer Preview released
yesterday, so I found your blog entry by searching for "windows 8
programs file tree location" and got here. It looks as if in this version,
c:program filesapplications no longer exists. Where could all of these
newly-available "store-bought" (free) apps be living now that they're
downloaded?
I hate all this handholding Metro does. I have a feeling I'm going to be
ignoring it 90% of the time unless I want a news reader on a bus ride
home with a tablet. For actual work, it's useless.
Zach Heise Says:
Nevermind, found it! CMD, plus dir /a:h in the program files folder,
found that it's now stored under c:program fileswindowsapps. You
probably already knew that though!
Vamshi Says:
Wow thats a great find ! ,now i can at least some code of my favourite
apps ;)
niks Says:
y i m nt able to use these apps ???
i hv devloper preview...
Alex Says:
Excellent article! I'm looking forward to your next article concerning
apps.
Christian Says:
Anybody who argues that people write html+js for the web even though
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
30 of 32 21-Dec-12 12:36 PM
anyone can see it is an idiot. Almost all the code that ACTUALLY
MATTERS is server side. On Windows 8 all the important code will be
right there for people to steal. Think before you post next time.
Kapil Says:
Now folder name is WindowsApps.......
Rufus Pearce Says:
I have the RTM version of Windows 8 Pro, and the folder 'Program
Files/Applications' does not exist. It has been moved somewhere else.
Any idea where these apps can now be found?
Brandon Says:
How can one change the default install path for apps? I really don't want
all these apps eating up my small SSD drive!
Alex Says:
Seeing that you can change certain thing in the folder, is there any way
to launch desktop applications, while preserving image subway tile, only
shifting toward openness. Exe or link?
JuanK Says:
This is not a microsoft problem, is allsoftware engineering problem.
Decompile managed code is more dificult than just edit a javascript, but
still being an easy task. Decompile or extract/modify logic from native
binaries is more dificult , but not impossible.
Kept in moder times. Times when you assume that compile aan app will
secure your code is far far away in the past.
If somebody wants to get the algoritms or logic in your aasemblies ,
even native assemblies, just need to hire a young 19 years old guy with
passion for technology to reconstruct the algorithm based on
opcodes/assembly, this is not trivial but not impossible, just the kid with
free time could do it.
If you want to modify any application behavior, just need to known what
platform is and make the changes.
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
31 of 32 21-Dec-12 12:36 PM
How you think 'hackers' crack Adobe products one release after other,
just few days or hour before program availability? one or two guys with
free time knowing assembly, change the opcodes or object linkg for
another and .... pufff ... the program think you have an original copy.
Current world is not easy. You want to protect your algorithms or logic?
--> get patents for those you really need to protect.
Even thinks like connection string to db connections are in risk, you
could encript a connection string to avoid direct code/config files
attacks, but in some time, even for little bit of time, the string will be
decrypted in memory and then a young guy with lot of free time could
get the string after hours of patience and retries.
Legal terms, agreements etc are the final protections.
Sure, you need to protect your application in any way, obfusctate code,
use in memory secure strings for sensitive data, encription in any
complexity levels etc, thats necesary because for more protections you
use, less 'young ' people with lots of free time will success breaking your
secure barriers.
JuanK Says:
btw, take a llook at this important notes: http://stackoverflow.com
/questions/12754265/is-there-any-prevention-methods-for-removing-
istrial-and-trivially-cracking-wi
Scott Says:
LOL..once again you're breaking into jail with this one ;)
Oh man.. that just makes me sad to see the above and how simple it
was to hax0r it (not that I knew, but now we do know).
Thessaly Says:
How can I gain access to your article "reverse engineering for Win8
games"?
Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps
32 of 32 21-Dec-12 12:36 PM

Mais conteúdo relacionado

Mais procurados

Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Damir Dobric
 
Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Stephan Chenette
 
Bypassing the Android Permission Model
Bypassing the Android Permission ModelBypassing the Android Permission Model
Bypassing the Android Permission ModelGeorgia Weidman
 
Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedArea41
 
Permission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionPermission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionTandhy Simanjuntak
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineAditya K Sood
 
Understanding android security model
Understanding android security modelUnderstanding android security model
Understanding android security modelPragati Rai
 
Addressing New Challenges in Software Protection for .NET
Addressing New Challenges in Software Protection for .NETAddressing New Challenges in Software Protection for .NET
Addressing New Challenges in Software Protection for .NETLicensingLive! - SafeNet
 
ToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsAditya K Sood
 
Permission enforcement s in android new (1)
Permission   enforcement s  in android new (1)Permission   enforcement s  in android new (1)
Permission enforcement s in android new (1)Siddhartha Kakarla
 
RSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamRSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamAhmed Sallam
 
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYehMAKERPRO.cc
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsPositive Hack Days
 
Android secure offline storage - CC Mobile
Android secure offline storage - CC MobileAndroid secure offline storage - CC Mobile
Android secure offline storage - CC MobileSteve De Zitter
 
Windows Embedded Compact 7 White Paper
Windows Embedded Compact 7 White PaperWindows Embedded Compact 7 White Paper
Windows Embedded Compact 7 White PaperRyan Berg
 
Android Overview
Android OverviewAndroid Overview
Android OverviewRaju Kadam
 

Mais procurados (20)

Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8Runtime 8 and Windows Phone 8
Runtime 8 and Windows Phone 8
 
Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013Building Custom Android Malware BruCON 2013
Building Custom Android Malware BruCON 2013
 
Bypassing the Android Permission Model
Bypassing the Android Permission ModelBypassing the Android Permission Model
Bypassing the Android Permission Model
 
Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromised
 
Permission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionPermission in Android Security: Threats and solution
Permission in Android Security: Threats and solution
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
 
ANDROID
ANDROIDANDROID
ANDROID
 
Understanding android security model
Understanding android security modelUnderstanding android security model
Understanding android security model
 
Addressing New Challenges in Software Protection for .NET
Addressing New Challenges in Software Protection for .NETAddressing New Challenges in Software Protection for .NET
Addressing New Challenges in Software Protection for .NET
 
ToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android InfectionsToorCon 14 : Malandroid : The Crux of Android Infections
ToorCon 14 : Malandroid : The Crux of Android Infections
 
Permission enforcement s in android new (1)
Permission   enforcement s  in android new (1)Permission   enforcement s  in android new (1)
Permission enforcement s in android new (1)
 
RSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamRSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallam
 
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh
【視覺進化論】AI智慧視覺運算技術論壇_2_ChungYeh
 
lotos-framework
lotos-frameworklotos-framework
lotos-framework
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
Android secure offline storage - CC Mobile
Android secure offline storage - CC MobileAndroid secure offline storage - CC Mobile
Android secure offline storage - CC Mobile
 
Windows Embedded Compact 7 White Paper
Windows Embedded Compact 7 White PaperWindows Embedded Compact 7 White Paper
Windows Embedded Compact 7 White Paper
 
UK Gov Report Summary
UK Gov Report SummaryUK Gov Report Summary
UK Gov Report Summary
 
CLI313
CLI313CLI313
CLI313
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 

Semelhante a Reverse Engineer and Modify Windows 8 Apps in Under 40 Steps

December 2018 Patch Tuesday Analysis
December 2018 Patch Tuesday AnalysisDecember 2018 Patch Tuesday Analysis
December 2018 Patch Tuesday AnalysisIvanti
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialAbid Khan
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
August Patch Tuesday Analysis
August Patch Tuesday AnalysisAugust Patch Tuesday Analysis
August Patch Tuesday AnalysisIvanti
 
Installation of PC-Lint and its using in Visual Studio 2005
Installation of PC-Lint and its using in Visual Studio 2005Installation of PC-Lint and its using in Visual Studio 2005
Installation of PC-Lint and its using in Visual Studio 2005PVS-Studio
 
June Patch Tuesday 2018
June Patch Tuesday 2018June Patch Tuesday 2018
June Patch Tuesday 2018Ivanti
 
November Patch Tuesday Analysis
November Patch Tuesday AnalysisNovember Patch Tuesday Analysis
November Patch Tuesday AnalysisIvanti
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdfRavinderKSingla
 
July 2018 Patch Tuesday Analysis
July 2018 Patch Tuesday AnalysisJuly 2018 Patch Tuesday Analysis
July 2018 Patch Tuesday AnalysisIvanti
 
windows 11 bugs errors issues problems
windows 11 bugs errors issues problemswindows 11 bugs errors issues problems
windows 11 bugs errors issues problemsssuser1eca7d
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Vb net xp_16
Vb net xp_16Vb net xp_16
Vb net xp_16Niit Care
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net FundamentalsLiquidHub
 
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-StudioComparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-StudioPVS-Studio
 
Windows 8: Touchable, Portable and Compatible
Windows 8: Touchable, Portable and CompatibleWindows 8: Touchable, Portable and Compatible
Windows 8: Touchable, Portable and CompatibleIntergen
 

Semelhante a Reverse Engineer and Modify Windows 8 Apps in Under 40 Steps (20)

December 2018 Patch Tuesday Analysis
December 2018 Patch Tuesday AnalysisDecember 2018 Patch Tuesday Analysis
December 2018 Patch Tuesday Analysis
 
Windows 8
Windows 8Windows 8
Windows 8
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
August Patch Tuesday Analysis
August Patch Tuesday AnalysisAugust Patch Tuesday Analysis
August Patch Tuesday Analysis
 
Installation of PC-Lint and its using in Visual Studio 2005
Installation of PC-Lint and its using in Visual Studio 2005Installation of PC-Lint and its using in Visual Studio 2005
Installation of PC-Lint and its using in Visual Studio 2005
 
June Patch Tuesday 2018
June Patch Tuesday 2018June Patch Tuesday 2018
June Patch Tuesday 2018
 
November Patch Tuesday Analysis
November Patch Tuesday AnalysisNovember Patch Tuesday Analysis
November Patch Tuesday Analysis
 
C# p1
C# p1C# p1
C# p1
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
 
July 2018 Patch Tuesday Analysis
July 2018 Patch Tuesday AnalysisJuly 2018 Patch Tuesday Analysis
July 2018 Patch Tuesday Analysis
 
windows 11 bugs errors issues problems
windows 11 bugs errors issues problemswindows 11 bugs errors issues problems
windows 11 bugs errors issues problems
 
Cp e 214_appendix_c
Cp e 214_appendix_cCp e 214_appendix_c
Cp e 214_appendix_c
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Windows8 vdt
Windows8 vdtWindows8 vdt
Windows8 vdt
 
Windows 8 dev
Windows 8 devWindows 8 dev
Windows 8 dev
 
Vb net xp_16
Vb net xp_16Vb net xp_16
Vb net xp_16
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-StudioComparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
 
Windows 8: Touchable, Portable and Compatible
Windows 8: Touchable, Portable and CompatibleWindows 8: Touchable, Portable and Compatible
Windows 8: Touchable, Portable and Compatible
 

Último

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Reverse Engineer and Modify Windows 8 Apps in Under 40 Steps

  • 1. Reverse Engineering and Modifying Windows 8 apps Angel Justin Hi folks, In this article I’ll share the results of ad-hoc security vulnerabilities research I’ve done on windows 8 apps deployment. Specifically, we’ll discuss fundamental design flaws that allow to Reverse Engineer Win8 apps, modification of installed apps and the negative implications on Intellectual Property rights protection, Licensing models and overall PC security. Finally we’ll discuss some creative ideas on how to mitigate these security issues. Meet the mother-load: C:Program FilesApplications All Windows 8 applications in the developer preview are installed under the clandestine C:Program FilesApplications location. I will hazard a guess and say that once the Windows App Store goes online it will install all apps under that folder. Currently the folder is an invisible one and cannot be accessed from Windows Explorer user interface on a new Win8 developer preview install. Here’s an example of some of the 29 apps Win8 apps installed on the Win8 developer preview: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 1 of 32 21-Dec-12 12:36 PM
  • 2. And here’s the hidden folder backing it up: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 2 of 32 21-Dec-12 12:36 PM
  • 3. Gaining Access to C:Program FilesApplications In essence you’ll need to navigate to that folder, hit “Security Tab” and set yourself up as the owner. Let me walk you through that process step-by-step. 1. Type in “C:Program FilesApplications” in the Windows Explorer address bar and hit enter. 2. Observe in shock and dismay the system dialogue saying you don’t own a folder on your own machine. Hit “Continue”. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 3 of 32 21-Dec-12 12:36 PM
  • 4. 3. After hitting “Continue”, you’ll be confronted by the following dialogue: Do not hit “close”, instead click the “security tab” link. 4. In the following system dialogue click “advanced”. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 4 of 32 21-Dec-12 12:36 PM
  • 5. 5. Click the “change” link in the owner security field. 6. Add in your live ID or windows 8 user name to the “select user or group” system dialogue. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 5 of 32 21-Dec-12 12:36 PM
  • 6. 7. Click “OK”, Click “OK”, Click “Ok”. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 6 of 32 21-Dec-12 12:36 PM
  • 7. 8. Type in “C:Program FilesApplications” in the Windows Explorer address bar and hit enter. You now have access to the Applications folder. What type of apps ship with Windows 8? Looking at this folder it’s fairly easy to determine what type of apps ship with Windows 8 developer preview. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 7 of 32 21-Dec-12 12:36 PM
  • 8. What’s in C:Program FilesApplications? For HTML apps the folder contains all of their source code and it can modified. For C# apps the folder contains the XAML source code and a compiled reverse- engineerable and modifiable version of the C# code. For C++ directX apps the folder contains compiled binaries. Honestly, C++ isn’t my specialty so I’ll avoid discussing it at any great length. Reverse Engineering HTML & Javscript & CSS Win8 apps There’s a fundamental design flaw in the concept of HTML apps. HTML, Javascript and CSS are all interpreted languages, and not compiled languages. Meaning you have to ship the source code for your app instead of shipping compiled binaries. That puts the Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 8 of 32 21-Dec-12 12:36 PM
  • 9. Intellectual Property of anyone choosing to write any HTML & JS & CSS only app for any platform under risk. For example, here’s the HTML source code for the Tweet@rama Win8 app code: And here’s the tweet@rama Javascript code that does the actual posting to Twitter: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 9 of 32 21-Dec-12 12:36 PM
  • 10. Modifying HTML & Javscript & CSS Win8 apps Part of the problem with interpreted languages is that they don’t compile until the very instance they are executed. Which allows evil-doers to edit the code prior to execution. For example, here’s a print screen of the tweet@rama default app; Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 10 of 32 21-Dec-12 12:36 PM
  • 11. Let’s modify the HTML, Javascript and CSS for this application: (for the sake of brevity we’ll only walkthrough a simple HTML change) Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 11 of 32 21-Dec-12 12:36 PM
  • 12. By modifying the HTML & CSS & Javascript source code we can change the visual design to something a bit more visually pleasing: Notice that we’ve changed both the design and behaviour of the app by modifying the source code. The new design has a different title, and the new behaviour is using the Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 12 of 32 21-Dec-12 12:36 PM
  • 13. picture of the logged in user as the background. We have the power to completely change both the visual design and the executing source code of HTML & CSS & JS win8 apps. New breed of viruses? Any unauthorized malware that gains access to C:Program FilesApplications could potentially modify source code to execute in malicious ways. Since this is the direction Win8 apps are taking writing this type of viruses is likely to become a growth industry. For example we could look at the tweet@rama app once again. The most valuable asset that app has is our twitter oauth credentials. A virus would be able to modify the tweet@rama source code so once it executes it retrieves those credentials and sends those to a malicious remote endpoint. The following code interjected into the Javascript code of tweet@rama would do just that: New breed of cracks? Any unauthorized executable that gains access to C:Program FilesApplications could potentially modify source code to workaround Windows Store app purchasing and licensing logic. The whole concept of Trials and feature purchases are based on Javascript, C# or C++ code invoking Windows 8 RuntimeTime APIs for the Windows Store. Any change to that code could potentially change the purchasing and licensing logic for that app. For example, In BUILD conference Microsoft’s Arik Cohen demonstrated (http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-123T) (35:25) the following code that performs a Javascript check for isTrial. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 13 of 32 21-Dec-12 12:36 PM
  • 14. It would be a trivial endavour to manually edit this Javascript file and remove the “licenseInformation.isTrial” check. And by doing so removing Trial restrictions from this sample Win8 app. If this set of problems are not mitigated, app piracy through app modification for Windows Store apps will likely become quite prevalent. Reverse Engineering C# + XAML Win8 apps C# code is shipped in compiled EXE & DLL binaries. XAML is shipped as plain text source code. That makes both forms of code extremely susceptible to reverse engineering. For example, we could open up the “Memories” (C# WinRT XAML app) MainPage.xaml Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 14 of 32 21-Dec-12 12:36 PM
  • 15. in KaXaml (http://kaxaml.com/) and see the XAML source code: Using JetBrains dotPeek (http://www.jetbrains.com/decompiler/) it would be possible to see the C# source code for the Memories app: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 15 of 32 21-Dec-12 12:36 PM
  • 16. Modifying C# + XAML Win8 apps The XAML for Win8 apps is stored in plain-text and can be edited from any text editing tool. The .net binaries are unsigned and thus can be edit using the MSIL Weaving tool Reflexil (http://reflexil.net/). For example, here’s the “Memories” C# XAML app shipping with Windows 8 developer preview: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 16 of 32 21-Dec-12 12:36 PM
  • 17. Editing the XAML is fairly trivial since it’s stored as a plain text file: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 17 of 32 21-Dec-12 12:36 PM
  • 18. Editing C# can be done using Reflector’s Reflxil MSIL Editor: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 18 of 32 21-Dec-12 12:36 PM
  • 19. With some light modifications to the XAML and C# code we can change the display and behaviour of the app: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 19 of 32 21-Dec-12 12:36 PM
  • 20. Reverse Engineering C++ Win8 apps I’ll confess to not being a strong C++ developer (gasp!) so I’ll keep this brief by showing C++ apps are also susceptible to reverse engineering. It appears that Microsoft’s Store app is written in C++. The most important asset that app would have are the endpoints for the Microsoft store. Opening the C:WindowsSystem32WinStoreWinStoreUI.dll in Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 20 of 32 21-Dec-12 12:36 PM
  • 21. notepad and searching for “https” addresses reveals the following URL: Following the http://go.microsoft.com/fwlink/?LinkId=195322&clcid=0x409 (http://go.microsoft.com/fwlink/?LinkId=195322&clcid=0x409) URL leads to a currently inactive URL of https://services.apps.microsoft.com/browse (https://services.apps.microsoft.com/browse). I would hazard a guess that this is the URL currently being used to test the Windows App Store. What have we conclusively proven during this blog post? Keeping in mind that Windows 8 is only an alpha developer release, we’ve seen a Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 21 of 32 21-Dec-12 12:36 PM
  • 22. couple of disturbing things: It is possible to reverse engineer and modify HTML, JavaScript and CSS code shipped in Win8 apps. 1. It is possible to reverse engineer and modify C#/VB.Net source code shipping with Win8 apps. 2. It is possible to reverse engineer and modify XAML source code shipping with Win8 apps. 3. It is possible to (at some limited level?) reverse engineer C++ Win8 apps.4. Can Microsoft completely solve this problem? No. In my opinion, apps shipping as part of all app stores will always be vulnerable at some limited level to reverse engineering and modification. Can Microsoft mitigate this problem? Yes, Microsoft can make apps significantly more temper-proof and pile a lot of hardships on those seeking to reverse engineer and modify Win8 apps. Assuming malicious code and people can’t access C:Program FilesApplications seems naïve at best. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 22 of 32 21-Dec-12 12:36 PM
  • 23. Here are few suggestions for what some of those potential aforementioned hardships might be: Obfuscate C#/VB.Net projects by default: .net projects default to shipping with unobfuscated source code. If Microsoft is serious about introducing a Windows App store obfuscation has to be turned on by default for all .net project, not just a nice-to-have addon like it is right now. The VS2011 team should investigate and integrate an obfuscation solution directly into the product and turn it on for all new .net projects. This would make it harder to reverse engineer .net apps. 1. Minify HTML, Javascript and CSS projects by default: With the joys of desktop deployment web developers will likely forsake Javascript, HTML and CSS minification. Again, a good path forward here is to make sure all HTML, Jacascript and CSS code is minified by default. This step would make it harder to reverse engineer HTML apps. 2. Strongly sign all .net assemblies by default: Strong-signing has been part of the .net framework for 10 years now. Turn it on by default with a unique developer license certificate for all Win8 .net apps. Make sure Win8 AppContainers only run signed apps, don’t even have a hidden registry key to enable unsigned apps (like WP7 does (http://twitpic.com/6josnn)). That would make it harder to modify .net apps. 3. Checksum HTML, Javascript and CSS project before startup: Even if it’s unpreventable that modifying Win8 HTML apps would take place, run a checksum on all files before loading the app into memory. That would make it harder to modify Win8 HTML apps. It sounds like AppBlockMap.xml is supposed to do something similar, but it doesn’t seem to work. 4. Don’t store App’s executing files as plain-old files on the user’s hard-drive: It shouldn’t be possible to even see the files shipping with an app by default using just Windows Explorer. A lossless compressed folder with DRM protection would be a good step forward here. This should make it harder to reverse engineer Win8 apps. 5. tl;dr: If Microsoft doesn’t undertake the aforementioned steps or comparable ones it’s not because it can’t, it’s because it doesn’t want to. If Microsoft chooses to ignore this problem for the remaining one year (?) development lifecycle for Windows 8 then it’s not because it couldn’t solve these problems. Visual Studio 2011 App Deployment Apps deployed by Visual Studio 2011 do not get deployed to C:Program FilesApplications but rather get deployed to C:Users<UserName>AppxLayouts. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 23 of 32 21-Dec-12 12:36 PM
  • 24. The alternate location for Visual Studio app deployment and all other app deployment are controlled by the registry folder HKEY_CURRENT_USERSoftwareClassesLocal SettingsSoftwareMicrosoftWindowsCurrentVersionAppModel. Feedback Have questions about the methodologies used in this article? Have more interesting workarounds you’ve tried and like to share? Have interesting suggestions for the Microsoft folks on how to help mitigate this problem? Sound off in the comments! -- Justin Angel (Disclaimer: this article represents research I undertook on my own and is unsanctioned by any organizations or corporations I might be related with.) Published on 9/20/2011 12:00:00 AM by Justin Angel ©2012. This work is licensed under a Creative Commons Attribution 3.0 Unported License Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 24 of 32 21-Dec-12 12:36 PM
  • 25. (http://creativecommons.org/licenses/by/3.0/). Comments Jeremy Says: Very nice article Justin, thanks for sharing. I started to look at the proportion of HTML vs XAML vs Native apps and I appreciate your diagram. I'm looking forward seeing what Microsoft will do to mitigate those issues. pedro Says: You seem to forget a little detail.. Final apps will be signed. Justin Angel Says: Signed apps would be one of the small obstacles I've mentioned. However, I'm not sure what signing apps would mean for HTML apps. How exactly does one sign HTML files? Also, more importantly, Signing attempts to protect against Modification. It does nothing to solve the Reverse Engineering issue. pedro Says: I'm guessing that app packages will be encripted and signed. And the reverse engineering is a non issue. How do you protect current apps from being reverse engineered? Even obfuscating .NET apps doesn't really protect you, it only makes it harder. If signing the apps is enough to prevent tempered code to be executed, I'm OK with that. DrPizza Says: Can you explain to me which of these is a Windows 8 issue? Consider that the .NET decompilers are for, uh, all .NET programs, not just Windows 8 ones, and that Web browsers let you look at both HTML and JavaScript directly. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 25 of 32 21-Dec-12 12:36 PM
  • 26. How does one sign HTML files? You stick a signature in a file and put it alongside the rest. You know, the same way that you sign .inf files in driver packages. Justin Angel Says: Windows 8 made the choice to consume interpreted languages as offline application development languages. I am calling out that it there are some issues with that plan going forward in regards to the aforementioned concerns. How does one sign HTML files? It is possible to sign & encrypt anything. HTTPS for example is an encrypted and signed HTTP transport layer. Addressing the core point of your argument: I believe that Microsoft has people smarter than myself that could provide more realistic solutions to the issues I've raised. IMO This is a set of problems that have potential solutions. Luke Says: On the default user you enter more pc settings (from metro) and open user. There is an option to switch to Microsoft account. This option is not available by default on the build-in administrator account. Is it possible to enable this on the build-in administrator? I can use most of the metro apps on the build-in administrator account when/if I change this regkey FilterAdministratorToken from 0 to 1 Sarkie Says: When looking for string data in .exes. Use Strings http://technet.microsoft.com/en-us/sysinternals/bb897439 Aside: Why is this whole site in Silverlight? Alberto Says: Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 26 of 32 21-Dec-12 12:36 PM
  • 27. Whats the problem the site beeing in silverlight? -.- Michael Crump Says: Excellent blog post Justin! I have also heard that final apps will be signed. But right now you have exposed several flaws that Microsoft needs to be aware of. Jeremy Brayton Says: Signing happens at the project level, not individual files. I want to speculate that the dev preview was simply rushed and the DRM protection we're about to see in the Mango store is going to hit AppX too. Having to what amounts to unzipping an app before every run is going to increase at least that initial load time but you could use a temporary secure location to cache this kind of stuff. They might've thought this would be sufficient but you proved how easy it was to unlock that jail cell. Regarding checksums against HTML content, I would say just do a checksum against the *entire project* as one motion. It's essentially the same thing but we're really interested in the sum, not so much individual files but doing them individually would be a way for us to tell which file has been tampered with so I'm a little on the fence about my own suggestion. I think if we start to get to the beta and RC stages and no significant changes are made in this area that all of us should worry. I'm glad they can address it now and I'm glad you figured this out to make sure they do. There's still plenty of time to plug these holes but we definitely need to keep a fire up their ass to make sure our apps aren't cracked in one fell swoop. If I'm relying on your app store and one point of failure is all that is needed to expose EVERY app, you might want to rethink your design a bit and I hope they at least give us the option to run extra licensing mechanisms on top if we so choose. If they don't plug these holes AND get heavy handed there, I could never recommend developing for their app store. Fallon Massey Says: Does that mean that C++ is the best language to program in? Because with C++, you'll need a disassembler, and that still won't net you the correct code. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 27 of 32 21-Dec-12 12:36 PM
  • 28. Philippe Da Silva Says: With every new OS comes new security threats especially when you're adding something new that hasn't been tested accross mainstream audience. While I don't care much about seeing people modifying apps I purchase since it opens the way to application "mods" that us, consumers, will decide to use or not, I'm way more worried about the Win8 Apps being a real system security threat for viruses and other malware that could act on my behalf in my machine. This should definitivelly be the top security priority of Microsoft from my point of view. I personally see Win8 Apps as Rich Clients for distributed & cloud content or processing. I can't think of any application that would make use of the Metro UI and paradigm that don't fall into such user requirements. For all other user requirements, we'll stick to our old yet very familiar Explorer environment ;) All in all, I'm really glad to see Microsoft finally taking a step backward, looking at the market and sharing with us what they see as the future of our computer/software usage ;) Ian Griffiths Says: Session PLAT-905C went into quite a lot of detail on application packaging. The signing mechanism covers everything in the package, and is independent of file type. You could even put binary files with a format of your own devising in there and it'd still be able to check their validity. Logically speaking, it's pretty similar to how Silverlight supports it - you sign the container rather than individual files. In Silverlight, you can apply a digital signature to the ZIP file, and that'll cover everything in there, no matter what the format of the individual files. The fact that the streams happen to be extracted out into files in a folder in Win8 is no obstacle to this - it just requires a scheme for how the whole directory should be handled - as long as Win8 knows that (say) the appx manifest contains a list of signatures for everything (including itself), then it can check everything. IIRC, that's pretty much how ClickOnce worked - it was able to check validity even when each of the resources in the app was downloaded separately. So this is not new. Nor is reverse engineering. C++, Xaml, and JavaScript are precisely as easy to reverse engineer in Win8 as they were before. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 28 of 32 21-Dec-12 12:36 PM
  • 29. piers7 Says: As an aside, in the keynote Sinofsky claimed the Apps app was written in Javascript/HTML, whereas you seem to suggest C++... dsurendra Says: Cool.... ZUyq5def Says: Maliscious won't have access to the program filesapplications directory (among other things, such as signing). The steps that Justin goes through to access the directory require explicit user action - they can't be done programmatically (unless the app already has privileges - in which case it doesn't really make sense for the app to go messing w other apps, because it can already do whatever the maliscious user wants). Justin Angel Says: Yep, the Program FilesApplications folder is protected the same way modern-day Program Files directory and Windows directory are protected. However many viruses, spyware and malware (if not the majority of those) currently use those locations to hide, store and modify their executables. Theoretically, you're right to say there's a hurdle here. Practically, you'll have to ignore the entire history of modern-day malware to claim it'll matter in the long run. rtruth Says: HTML and javascript are plaintext on the web, I don't see that preventing developers from writing code. Second of all, it doesnt matter if the code is plain text, .net, or assembled c code, you can always see the code. Even in c code, you just disassemble the binary and its right there in front of you. You can do the same things you are doing now with html. Also,even if the apps are signed, its only trivial to patch the check by the Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 29 of 32 21-Dec-12 12:36 PM
  • 30. OS. On an open system like a PC, its impossible to stop this. Its just the reality of software development. If you make good software, it will be pirated. And those that pirate will never buy your stuff in the first place anyways. Zach Heise Says: Hi Justin, I was curious about this in the Customer Preview released yesterday, so I found your blog entry by searching for "windows 8 programs file tree location" and got here. It looks as if in this version, c:program filesapplications no longer exists. Where could all of these newly-available "store-bought" (free) apps be living now that they're downloaded? I hate all this handholding Metro does. I have a feeling I'm going to be ignoring it 90% of the time unless I want a news reader on a bus ride home with a tablet. For actual work, it's useless. Zach Heise Says: Nevermind, found it! CMD, plus dir /a:h in the program files folder, found that it's now stored under c:program fileswindowsapps. You probably already knew that though! Vamshi Says: Wow thats a great find ! ,now i can at least some code of my favourite apps ;) niks Says: y i m nt able to use these apps ??? i hv devloper preview... Alex Says: Excellent article! I'm looking forward to your next article concerning apps. Christian Says: Anybody who argues that people write html+js for the web even though Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 30 of 32 21-Dec-12 12:36 PM
  • 31. anyone can see it is an idiot. Almost all the code that ACTUALLY MATTERS is server side. On Windows 8 all the important code will be right there for people to steal. Think before you post next time. Kapil Says: Now folder name is WindowsApps....... Rufus Pearce Says: I have the RTM version of Windows 8 Pro, and the folder 'Program Files/Applications' does not exist. It has been moved somewhere else. Any idea where these apps can now be found? Brandon Says: How can one change the default install path for apps? I really don't want all these apps eating up my small SSD drive! Alex Says: Seeing that you can change certain thing in the folder, is there any way to launch desktop applications, while preserving image subway tile, only shifting toward openness. Exe or link? JuanK Says: This is not a microsoft problem, is allsoftware engineering problem. Decompile managed code is more dificult than just edit a javascript, but still being an easy task. Decompile or extract/modify logic from native binaries is more dificult , but not impossible. Kept in moder times. Times when you assume that compile aan app will secure your code is far far away in the past. If somebody wants to get the algoritms or logic in your aasemblies , even native assemblies, just need to hire a young 19 years old guy with passion for technology to reconstruct the algorithm based on opcodes/assembly, this is not trivial but not impossible, just the kid with free time could do it. If you want to modify any application behavior, just need to known what platform is and make the changes. Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 31 of 32 21-Dec-12 12:36 PM
  • 32. How you think 'hackers' crack Adobe products one release after other, just few days or hour before program availability? one or two guys with free time knowing assembly, change the opcodes or object linkg for another and .... pufff ... the program think you have an original copy. Current world is not easy. You want to protect your algorithms or logic? --> get patents for those you really need to protect. Even thinks like connection string to db connections are in risk, you could encript a connection string to avoid direct code/config files attacks, but in some time, even for little bit of time, the string will be decrypted in memory and then a young guy with lot of free time could get the string after hours of patience and retries. Legal terms, agreements etc are the final protections. Sure, you need to protect your application in any way, obfusctate code, use in memory secure strings for sensitive data, encription in any complexity levels etc, thats necesary because for more protections you use, less 'young ' people with lots of free time will success breaking your secure barriers. JuanK Says: btw, take a llook at this important notes: http://stackoverflow.com /questions/12754265/is-there-any-prevention-methods-for-removing- istrial-and-trivially-cracking-wi Scott Says: LOL..once again you're breaking into jail with this one ;) Oh man.. that just makes me sad to see the above and how simple it was to hax0r it (not that I knew, but now we do know). Thessaly Says: How can I gain access to your article "reverse engineering for Win8 games"? Reverse Engineering and Modifying Windows 8 apps http://justinangel.net/ReverseEngineerWin8Apps 32 of 32 21-Dec-12 12:36 PM