Skip to Content
Penetration Testing: A Survival Guide
book

Penetration Testing: A Survival Guide

by Wolf Halton, Bo Weaver, Juned Ahmed Ansari, Srinivasa Rao Kotipalli, Mohammed A. Imran
January 2017
Beginner to intermediate
1045 pages
22h 24m
English
Packt Publishing
Content preview from Penetration Testing: A Survival Guide

Internal storage

Internal storage is yet another way of storing data in Android Apps, usually in the file directory under /data/data/<app name>.

The following code shows how the internal storage is used to store the private key of an application, which it is used to store and send credit card and SSN numbers of a user:

            String publicKeyFilename = "public.key";
            String privateKeyFilename = "private.key";

        try{
            GenerateRSAKeys generateRSAKeys = new GenerateRSAKeys();
            Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

            // Generate public & private keys
            KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA", "BC"); //create base64 handler BASE64Encoder b64 = new BASE64Encoder(); //Create random number SecureRandom ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Penetration Testing

Penetration Testing

Georgia Weidman
Penetration Testing

Penetration Testing

James Hayes, Nick Furneaux, Jims Marchang, Rob Ellis, Jason Charalambous, Moinuddin Zaki, Peter Taylor, Roderick Douglas, Felix Ryan, Ceri Charlton, Gemma Moore, Tylor Robinson, Sharif Gardner

Publisher Resources

ISBN: 9781787287839Purchase Link