Code Monkey home page Code Monkey logo

php-screw-brute's Introduction

PHP Screw Brute

This script recovers/brute forces the key for PHP files protected with PHP Screw (https://github.com/Luavis/php-screw).

PHP Screw uses the length of the compressed file to determine the starting index into the (hardcoded) key. The 'encryption' works by first compressing the PHP file with ZLIB (level 1) and XORing it with the inverse of the bytes and the key. Because ZLIB has a fixed header and the start index is different for different files, it is possible to recover parts of the key. The remaining bytes can be brute forced. In generally, the more files you have the faster the recovering of the key will be. Naturally all the files must be protected with the same PHP Screw key. Given enough files, no brute forcing is required.

Example usage:

$ ./php-screw-brute.py test/*.php
[+] Trying key:     ca fe ba be 0 0 be ef
[!] Recovered key:  ca fe ba be de ad be ef
[+] Deciphering files
[-] test/array.php
[-] test/example.php
[-] test/hello.php

php-screw-brute's People

Contributors

ykoster avatar

Watchers

James Cloos 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.