Skip to content
Lauren edited this page Sep 15, 2024 · 1 revision

Usage

Examples

Here are some examples of how to use the Malware Education repository:

Example 1: Assembling and Running an Assembly Malware Example

  1. Assemble the code: Use nasm to assemble the code into an object file.

    nasm -f elf32 assembly_malware_example.asm -o assembly_malware_example.o
  2. Link the object file: Use ld to link the object file into an executable.

    ld -m elf_i386 assembly_malware_example.o -o assembly_malware_example
  3. Run the executable: Run the resulting executable.

    ./assembly_malware_example
  4. Check the output: Verify that the output.txt file has been created and contains the message.

    cat output.txt

Example 2: Analyzing a Malware Sample

  1. Download a Sample: Obtain a malware sample from the samples directory.

    cp samples/sample_malware.exe .
  2. Run Analysis Tool: Use one of the provided analysis tools to examine the sample.

    python tools/analyze_sample.py sample_malware.exe
  3. Review the Results: Check the output for analysis results.

    cat analysis_results.txt

Command-line Options

Explanation of available command-line options for the provided tools:

analyze_sample.py

  • --input or -i: Specify the input file to analyze.

    python tools/analyze_sample.py --input sample_malware.exe
  • --output or -o: Specify the output file for the analysis results.

    python tools/analyze_sample.py --input sample_malware.exe --output analysis_results.txt
  • --verbose or -v: Enable verbose mode for more detailed output.

    python tools/analyze_sample.py --input sample_malware.exe --verbose

Other Tools

Refer to the specific tool's documentation in the tools directory for additional command-line options and usage examples.