Kernel System Hijacking
request_irq
?
IRQF_SHARED.
dev_id
(based on what it was registered with at request_irq
)IRQ_HANDLED
.
IRQ_NONE
dev_id
(based on what it was registered with at request_irq
)IRQ_HANDLED
.
IRQ_NONE
include/linux/notifier.h
struct notifier_block
{
notifier_fn_t notifier_call;
struct notifier_block __rcu *next; /* What does RCU mean? */
int priority;
};
typedef int (*notifier_fn_t)(struct notifier_block *nb,
unsigned long action, void *data);
notifier_call_chain
notifier_call
function to a list of notifier_call
sstruct kprobe
with the kprobe system
register_kprobe
functionstruct kprobe
with the kprobe system
register_kprobe
function/include/linux/kprobes.h
https://www.youtube.com/shorts/P8-gYWaMUqs
1. Download and install bpftrace
2. Have bpftrace hook on write.
3. Have it print "Hello Write" when a write is triggered
4. Test it out!
5. Repeat this, but create a C program instead of bpftrace