Code Monkey home page Code Monkey logo

vexation's Introduction

VeXation

Code accompanying the VeXation development blog.

All code is written in x86 ASM targetting Borland Turbo Assembler 5.0 and Windows 95 and is licensed under the GPLv3.

minijector

Accompanying post: PE File Infector Basics

Working towards a basic Win95 PE file infector. Minijector will add its own code to other PE executables in the same directory by appending a new section (named .ireloc).

As described in the accompanying blog post this is not a complete working PE file infector. The entry point of the infected program is not updated so the injected copy is fully inert. The virus code is not position independent and does not find kernel32.dll API addresses at runtime.

pijector

Accompanying post: A VXers Best Friend: The Delta Offset

"pijector" (position independent (self-in)jector) is a continuation of Minijector. pijector.exe doesn't use a separate data section for its variable data and instead modifies offsets within the code section. The offsets are adjusted by the overall delta offset to make the variable references position independent.

As described in the accompanying blog post this is still not a complete working PE file infector. The entry point of the infected program is not updated so the injected copy is fully inert. The virus code also does not find kernel32.dll API addresses at runtime.

apifind & apifind2

Accompanying post: Using Win95 Kernel32.dll exports Like a virus

"apifind" and "apifind2" are stand-alone examples of finding required win32 API functions at runtime without hardcoding anything. Both find the kernel32.dll base address, locate the GetProcAddress export in the DLL, and then resolve required Windows API function addresses with GetProcAddress.

"apifind2" reduces some duplication by providing assembly macros for defining required API variables, describing the API functions/arguments, finding the API function addresses, and finally invoking the API functions. Start by reading "apifind" and then compare with "apifind2".

apisafejector

Accompanying post: Using Win95 Kernel32.dll exports Like a virus

"apisafejector" integrates the techniques/code from "apifind2" with "pijector". By using dynamically resolved kernel32.dll function addresses the generation 1+ virus code now works without crashing! The primary challenge that remains is fixing the virus code to call the original host program's entrypoint to avoid detection.

This program represents a fun milestone because it's the first version of the virus that is truly viral. Running apisafejector.exe in the same directory as calc.exe will infect it. Running calc.exe next to a new executable (e.g. cdplayer.exe) will infect that executable. Of course since the original executable code is never run this is a very obvious virus, both calc and cdplayer will appear broken :-)

epjector

Accompanying post: Calling the original entry-point

"epjector" extends "apisafejector" to handle restoring control flow to the infected program's original entrypoint. Now when an infected program is run it will try to propagate the infection as before but when it's done it will run the original program. Now calc.exe and cdplayer.exe will not appear broken while also spreading the infection >:)

vexation's People

Contributors

cpu avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zha0 cyberflamego

vexation's Issues

Link Checker Report

Summary

Status Count
๐Ÿ” Total 349
โœ… Successful 306
โณ Timeouts 0
๐Ÿ”€ Redirected 0
๐Ÿ‘ป Excluded 40
โ“ Unknown 0
๐Ÿšซ Errors 3

Errors per input

Errors in site/result/2019/01/getting-set-up/index.html

Errors in site/result/2021/04/switching-to-qemu/index.html

Full Github Actions output

Link Checker Report

Summary

Status Count
๐Ÿ” Total 349
โœ… Successful 305
โณ Timeouts 0
๐Ÿ”€ Redirected 0
๐Ÿ‘ป Excluded 40
โ“ Unknown 0
๐Ÿšซ Errors 4

Errors per input

Errors in site/result/2021/04/switching-to-qemu/index.html

Errors in site/result/2019/01/getting-set-up/index.html

Full Github Actions output

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.