Skip to content

Change vermagic and CRCs of a Linux Kernel Module

Notifications You must be signed in to change notification settings

yaxinsn/vermagic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vermagic

A tool dump .modinfo section and set vermagic variable of Linux Kernel Modules.

It also supports (not tested) CRC dump and changes.

The original work is from here: https://github.com/fanfuqiang/vc

Build

make

Use

./vermagic -help

Examples

  • Set vermagic value to "hello world" ./vermagic -v "hello world" some-name.ko

  • Set single_open crc value to 0x123
    ./vermagic -c "+{single_open, 0x123}" some-name.ko (not tested after code upgrade)

Anather more magic example:

That was implemented on the release I cloned. But the code is very dirty and I removed a lot of code. The way of setting multiple CRCs at time is undeveloped. Re-execute the binary instead or give support in a clean way, please.

./vermagic -c "+{single_open, 0x123}" "+{ some-name , 0x1234 }" some-name.ko

About

Change vermagic and CRCs of a Linux Kernel Module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published