Giter VIP home page Giter VIP logo

workshop-reverse-engineering's Introduction

How to Reverse Engineer Web Applications

Welcome

This workshop walks participants through two major concepts critical for reverse engineering web applications. There are different ways to reverse engineer any software -- these techniques are a result of 15 years of experience both defeating applications and building software to protect against applications from being defeated. The most effective way of analyzing and controlling web applications is to:

  1. Reuse as much application code as possible.
  2. Intercept, modify, and simulate system or browser APIs.
  3. Drive a browser programmatically.

Other methods may involve compiling a custom browser, managing a reverse proxy, or working with a snapshot of an application. Each of those techniques are effective but are dependent on both the application and browser staying the same for an extended duration which you can't rely on with modern web sites.

These labs leverage the production version of Chrome, the world's most popular browser, and the Shift suite of JavaScript tools.

Lab Series 1 - Programmatic transformation of JavaScript

JavaScript is the primary language that drives web pages. You can observe it raw but often mangled by build processes, compilers, and optimizers. Having executable source code available allows us to use existing source code parsers and transformation tools for our analysis. By programmtically extracting application level functions and modifying JavaScript to publicly expose private data structures we can create a software that closely manipulates an application's behavior.

Lab Series 2 - Programmatic control of a web browser

Major browser vendors update their browsers on about a six week schedule. This rapid update schedule means that maintaining our own browser would be an unsustaintable burden. Learning how to drive and hook into production browsers gives us the ability to ride the wave of the latest version and still perform the majority of what we'd want to do with our analysis.

Puppeteer is Google's nodejs library that drives Chrome via the Chrome Devtools Protocol. The protocol is open and does not require nodejs to interface with it. There are libraries and bindings for popular languages to interface with the Chrome Devtools Protocol and you can port all the concepts in these labs outside node.

Labs

This lab content is located at https://github.com/jsoverson/workshop-reverse-engineering

Directory structure

Lab directories all contain a similar structure.

lab-#.#/
├── answer
│   └── answer-#.#.js
├── test
│   └── test.js
├── work
│   └── lab-#.#.js
└── package.json

Setup

Each lab contains its own package.json. Use npm install within each lab to install the lab's dependencies.

$ npm install

Work

Complete work in the work/ directory. A stub file is included with boilerplate and comments. Feel free to remove or change any line.

Tests

If a lab benefits from tests then there is a test set up designed to consume from the work/ directory. Run tests with the command:

$ node test/test.js

Answers

Answer directories include a version of the answer that solves the problem defined. You can run the answers with node:

$ node answer/answer*.js

Prerequisites

  • node.js
  • npm
  • Visual Studio code
  • Chrome
  • git

Helpful Links

Alternate dev environment

Gitpod

Link your Github account to Gitpod and go here:

workshop-reverse-engineering's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.