Skip to content

Nagsasagawa ako ng Linux system at pag-unlad ng kernel.

License

Notifications You must be signed in to change notification settings

hark130/Peke_Ito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peke_Ito

Nagsasanay ako sa Linux system at umuunlad ng kernel.

Instructions

Hello.ko and myTestDeviceDriver.ko

1.  make
2.  sudo insmod 'driver'.ko
3.  dmesg | tail -n 10
4.  sudo mknod /dev/'driver' c <num> 0
5.  sudo rmmod <driver>.ko
6. rm /dev/'driver'

blinkDeviceDriver.ko

1.  make
2.  sudo rmmod hid_generic
3.  sudo rmmod usbhid
4.  sudo rmmod hid_led
5.  sudo rmmod hid
6.  sudo insmod blinkDeviceDriver.ko

Key Logger v1.0

BRIEF

  • Creates /dev/notakeylogger to communicate with a user
  • Registers a module with the keyboard driver's notification list
  • Translates those scan codes into a buffer backing /dev/notakeylogger
  • Key strokes may be read from /dev/notakeylogger

USAGE

  1. cd Modules/myKeyLogger; make clean; make lkm
  2. sudo insmod myKeyLoggingModule.ko
  3. Type things
  4. sudo cat /dev/notakeylogger
  5. Type more things
  6. sudo cat /dev/notakeylogger
  7. sudo rmmod myKeyLoggingModule

To Do

[X] Hello World lkm
[X] Basic Character Driver
[/] "Unk" USB Device Driver (blink(1), RGB LED)
    [ ] Get/create/allocate struct usb_interface for the device (...but how?)
    [ ] Convert between struct usb_interface and struct usb_device using interface_to_usbdev()? (see: Ch 13 Pg 332)
    [ ] Create an URB w/ usb_alloc_urb() (Init?)
    [ ] Fill in URB w/ usb_fill_int_urb() (Init?)
    [ ] Send data w/ usb_submit_urb() (Probe?  New function?)
    [ ] Handle URB Completion (see: Ch 13 - Completing Urbs: The Completion Callback Handler)
    [ ] NOTE: Continue reading Ch 13 at "Writing a USB Driver"
    [ ] Dynamically read in the three strings (Make, Model, Serial #)
[ ] "Unk" USB Device Driver (Nerf-style turret)
[ ] [LKM to Intercept Syscalls](https://dl.packetstormsecurity.net/docs/hack/LKM_HACKING.html#II.1.)
[ ] Manage concurrent execution
    * include <linux/sched.h>
    * printk(KERN_INFO "The process is \"%s\" (pid %i)\n", current->comm, current->pid);
    * See: Linux Device Drivers Chapter 2
[ ] Read [this](https://www.kernel.org/doc/html/v4.13/driver-api/usb/hotplug.html) to attempt to discover a reason why blinkDeviceDriver is failing to 'hotplug'

Resources

Ideas

  • Phantom Keystroker from ThinkGeek

About

Nagsasagawa ako ng Linux system at pag-unlad ng kernel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published