Giter Club home page Giter Club logo

famine's Introduction

famine

disclaimer

the code in this repository is provided for educational purposes only

intro

famine is the first of four vx projects at 42 school - the objective of the project is to create a program ("infection") which is able to replicate by copying itself into other 64 bit executables ("hosts"). once a host file has been infected, it becomes a "carrier" of infection - when launched, it will also infect other files. original host file behavior and functionality remains unchanged.

logic

famine is very straightforward; pseudo code:

folders = ['/tmp/test', '/tmp/test2']

for folder in folders:
    for file in folder:
        if not is_executable(file):
            continue
        if is_infected(file):
            continue
        infect(file)

features

  • three versions available:

    • linux only version, which only infects elf64 files (ET_DYN, ET_EXEC)
    • darwin only version, which only infects macho64 files (with LC_MAIN)
    • hybrid ("cross-platform") version which infects both elf64 and macho64 files
  • famine is a "space filler" type infection - it does not increase host file size;

  • does not set the writable bit to host binary TEXT segments

  • relatively small: linux/darwin version < 800 bytes; hybrid version < 1200 bytes

drawbacks

  • does not infect all elf64/macho64 binaries - victim binary must have enough "padding" space.

    • based on our experiments (infecting all files in /bin and /usr/bin folders) it successfully infects ~75% of all binaries
  • changes the permissions of all regular files in target directories to 0777

  • after infecting a file it does not restore last modification time

video

screenshots

intra/famine-screenshot1.png

famine's People

Contributors

asarandi avatar stephen-gardner avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.