This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 extern int _kern_is_computer_on(void); | |
1 extern status_t _kern_generic_syscall(const char *subsystem, uint32 function, void *buffer, size_t bufferSize); | |
2 extern int _kern_getrlimit(int resource, struct rlimit * rlp); | |
3 extern int _kern_setrlimit(int resource, const struct rlimit * rlp); | |
4 extern status_t _kern_shutdown(bool reboot); | |
5 extern status_t _kern_get_safemode_option(const char *parameter, char *buffer, size_t *_bufferSize); | |
6 extern ssize_t _kern_wait_for_objects(object_wait_info* infos, int numInfos, uint32 flags, bigtime_t timeout); | |
7 extern status_t _kern_mutex_lock(int32* mutex, const char* name, uint32 flags, bigtime_t timeout); | |
8 extern status_t _kern_mutex_unlock(int32* mutex, uint32 flags); | |
9 extern status_t _kern_mutex_switch_lock(int32* fromMutex, int32* toMutex, const char* name, uint32 flags, bigtime_t timeout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <linux/mm.h> | |
#include <linux/slab.h> | |
#include <linux/vmalloc.h> | |
#include <linux/uaccess.h> | |
unsigned long *amem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <linux/mm.h> | |
#include <linux/slab.h> | |
#include <linux/vmalloc.h> | |
#include <linux/uaccess.h> | |
int init_module(void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <linux/mm.h> | |
#include <linux/uio.h> | |
#include <linux/slab.h> | |
#include <linux/vmalloc.h> | |
#include <linux/kallsyms.h> | |
#include <linux/uaccess.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/kprobes.h> | |
char *mota = "__NO__"; | |
static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs) | |
{ | |
// kprobe pre 'hook' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/kprobes.h> | |
int init_module(void) | |
{ | |
struct module *mahjool; | |
struct kobject kobj; | |
unsigned long addy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/kprobes.h> | |
static struct kprobe kp = { | |
.symbol_name = "kallsyms_lookup_name" | |
}; | |
int init_module(void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The 'mizers dream | |
================= | |
The GCC randstruct plugin (randomize_layout_plugin.c) by Open Source Security, Inc., Brad Spengler and PaX Team | |
allows some sensitive structures in the Linux Kernel to have their layout shuffled. The aim is to obfuscate the | |
location of sensitive data (e.g some function pointers) and make certain types of exploitation more difficult. | |
It's explained in detail here: https://lwn.net/Articles/722293/ | |
The randstruct plugin is built with a randomisation seed included (randomize_layout_seed.h) which is generated | |
at compile time by the gen-random-seed.sh script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; linuxthor | |
; | |
; ELF destruct | |
; | |
; this file, when executed, will overwrite it's own image in memory | |
; | |
; nasm -f bin -o elfdestruct elfdestruct.asm | |
BITS 64 | |
org 0x010000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A couple of thoughts about SFTP & SCP | |
===================================== | |
SCP looks long in the tooth now and people have come to talk about deprecating it entirely. This | |
is due to SCP being the spiritual successor of RCP and inheriting a bunch of cruft that makes it | |
vulnerable to stuff like CVE-2019-6111 (the one where the server could overwrite arbitrary files | |
on the client) and CVE-2020-15778 (the one where shell commands could be put in backticks in | |
filenames) so SFTP seems to be the replacement.. It's a more flexible protocol for sure but there | |
can be a gotcha not present with SCP.. | |
OlderNewer