
Welcome to this course! This video outlines what will be covered by each module/section.
This video explains why Linux is everywhere and some examples of historical Linux malware.
We will demonstrate a simple self-propagating code that prints "Hello World", while replicating itself and infecting other binaries. This is a very high level over view and we will explore bits and pieces that made this possible later in the course.
Set up a containerized development environment for Linux malware research using Docker, hermetic builds, and cross-platform images.
We will go over how to setup up dev containers on Mac.
We will go over how to setup up dev containers on Windows using the Windows Subsystem for Linux (WSL).
We will go over how to setup dev containers on Linux.
A gentle summary of the motivation for this chapter.
We will look at the executable file format from a thousand feet above.
We will introduce the ELF format and take a took at how people abuse the entry point and how malware uses magic array padding to avoid infecting the same binary over and over again.
Explore stamping the elf header's magic ident in a docker container lab, inspect hex dumps, modify the last seven reserved bytes, and observe kernel checks during load, highlighting security implications.
We will take a look at the program header structure, that dictates how operating systems load parts of an executable file into memory.
We will take a look at the section header structure, and explain the relationship between section, program and elf headers.
Explore how the kernel loads an executable: validate the ELF header, parse program headers, map segments, assign permissions, and apply position-independent code with randomized heap and stack, plus dynamic linking.
Extract the virus text section from the Elf binary and prepare it for injection. Automate with objdump and objcopy in the no-stdlib Bazel workflow to produce a binary for injection.
Explores the infection workflow for Linux ELF binaries, presenting three algorithms to find suitable infection points, perform eligibility checks, and modify headers while preserving the executable.
Explore ELF code cave padding at the end of an executable segment, using page boundaries to fit the virus and update the ELF and program headers through the infection algorithm.
Explore the text padding infection algorithm in action by infecting the lz tool within a dockerized environment, compare elf headers, entry point redirection, and the codecave before and after infection.
Explore the padding infector by analyzing executable ELF headers and program sections to locate padding. Patch headers and inject a virus at end of the executable segment, with alignment considerations.
Study the reverse text segment infection, extending the executable into lower memory addresses like 0x400000 in numpy arrays and shifting ELF headers, contrasted with text padding infection.
Explains the reverse text infection code walk-through, showing how the inspector analyzes and injects into ELF executables, handles ARM and x86 alignment, and updates headers to insert a virus.
Demythifying linux virus engineering explains a pt_note infection that repurposes the rt note segment into an elf executable load, appends a virus, and updates headers with go and docker risks.
Demonstrate the RT node infection algorithm that repurposes a node segment to inject the virus, patch the program and section headers, and apply an infection signature.
Compare infection techniques for executables, including text padding, reverse text, and RT node methods, highlighting trade-offs, feasibility, and detection considerations.
Explore the necessity of redirection to hijack a host executable's control flow, enabling the injected virus to run before the original code through two redirection methods.
Learn how entry point redirection injects a virus to run before the host binary, with custom startup code on ARM and restoration to the original entry point, highlighting antivirus concerns.
Patch instructions to redirect program flow by switching from branch and link to branch, and calculate targets using opcodes and 26-bit offsets in arm and x86.
Explore how viruses propagate, from bootstrapping patient zero to network spread. Analyze example code and the role of social engineering, cracked software, and survivability in infection.
Examine propagation in linux viruses, including forked processes and random infection strategies to evade detection. Learn double fork techniques to prevent zombie processes and use directory walk iterators.
Explore a modular Linux virus propagation code, focusing on the propagate function, template arguments, parasite start and end symbols, memory mapping, and the infection and redirection concepts.
Examine how a self-propagating virus propagates using the propagate function, including forked process infection, entry point redirection, and a hello world payload, with Bazel build rules and the infected tool.
Explore how a virus can collect user data from an infected machine and exfiltrate it to a remote server via UDP sockets, enabling bidirectional control and botnet formation.
Explore the fileless virus technique that runs in memory via MFD create, downloading and executing payloads from a remote server without touching the disk, evading antivirus monitoring.
Examine the linux elf format, its sections and program headers, and the loading process. Learn virus building with static linking, position independent code, startup routines, and three infection algorithms.
Explore advice, ethics, and lessons learned from Linux virus engineering, highlighting why no software is perfect, the risks of cracked software, and the role of ethical hackers.
New course promotion: use this coupon link to get a discount! Remember to remove brackets in the link which prevents bots.
www.udemy.[com]/course/linux-virus-engineering/?referralCode=9CB1EE4E757F0A3CD1B3
Have you ever wondered how a computer virus runs and spreads? Assuming you possess some knowledge of computer systems, this course will guide you through the intricacies of virus engineering. You will learn how they exploits design trade-offs in computer operating systems and user programs to achieve effectiveness and, at times, cause significant harm.
Unlike conventional software development, virus engineering demands specialized expertise to optimize for survival, replication, and stealth. Whether you are a computer science student, software professional, or technology enthusiast, you will find the techniques employed by malware both eye-opening and informative. By the end of this course, you will have a thorough understanding of virus engineering principles and defensive strategies, supported by live demonstrations and detailed walkthroughs.
The structure of this course aims to provide virus engineering fundamentals, and explain how things work from the operating system to application layers. The last chapter provides real-life runnable examples, demonstrating how viruses could channel data back to attacker machines, hide their tracks from system administrators or forensics, and even execute without touching the file system at all!
Each lecture will be enriched with references to sources, complementary readings to deepen your knowledge, and links to help you catch up on relevant operating systems concepts. At the end, we will summarize the course with a discussion on ethics to wrap up. This course is supplemented with a Virus Software Framework (available publicly on GitHub), that provides working code for infection algorithms that you can build and run on your computers locally. While the course content covers things at great detail, curious students will have the chance to experiment and research deeper into specific topics without starting from scratch, by leveraging existing software infrastructure. Support is also provided, via the GitHub issues page and Udemy course page, in case students have trouble setting up the development environment, or any content related questions.
The content of this course is not taught anywhere to the best of my knowledge. Some technical details from this course are well known in the binary forensics community but are not easily accessible for someone new to this field. I want to lower the barrier for entry and share knowledge more widely to software developers, system administrators, and those who are simply curious. The objective of this course however is not to instigate harm to computer systems. Rather, it aims to elucidate the mechanisms behind computer viruses and the vulnerabilities they exploit, empowering individuals to avoid falling prey to its tactics repeatedly. I want to underscore that, it is ignorance, not viruses, that pose the true harm.
**By enrolling into this course, you agree that nobody but yourself would be held liable for your own actions.**