随笔分类 - Linux
摘要:On Android phone set follow fork mode [parent|child] On PC `~/utils/android ndk r12b/prebuilt/linux x86_64/bin/gdb q ex "target remote :8888" ex "sour
阅读全文
摘要:To resolve this issue you can add Defaults env_keep += "http_proxy https_proxy" to your /etc/sudoers file in order to keep those variables when switch
阅读全文
摘要:在编译中要加 -lpthread或-pthread参数(不同版本的gcc可能不一样,man gcc可以查阅对应参数)。 例如:在加了头文件#include <pthread.h>之后执行 pthread.c文件,需要使用如下命令: gcc -lpthread -o thread thread.c 或
阅读全文
摘要:Re-execute itself from elf file.
阅读全文
摘要:CVE-2016-0822-MTK-drivers/misc/mediatek/connectivity/common/combo/linux/wmt_dev.c#1158 CVE-2016-0822 PoC : https://github.com/ScottyBauer/Android_Kern
阅读全文
摘要:If you want random data in a Linux/Unix type OS, the standard way to do so is to use /dev/random or /dev/urandom. These devices are special files. The...
阅读全文
摘要:/*** CVE-2014-4014 Linux Kernel Local Privilege Escalation PoC** Vitaly Nikolenko* http://hashcrack.org** Usage: ./poc [file_path]* * where file_path ...
阅读全文
摘要:#include #include #include #include #include #include MODULE_LICENSE("GPL");struct desc_ptr idt;int init_module(void){ asm volatile ("sidt %0" ...
阅读全文
摘要:在Linux Kernel中有些constant需要被C code 跟 assembler共同使用在用constant的時候,不能單方面給0x1000UL因為assembler無法看這東西。但是C compiler卻可以。所以使用這個gcc feature.讓C compiler看到的constan...
阅读全文
摘要:Kernel Page Global Directory(PGD)of User process created在早期版本:在fork一个进程的时候,必须建立进程自己的内核页目录项(内核页目录项要与用户空间的页目录放在同一个物理地址连续的页面上,所以不能共享,但所有进程的内核页表与进程0共享)3G用...
阅读全文
摘要:Linux中thread (light-weighted process) 跟process在實作上幾乎一樣。最大的差異來自於,thread 會分享 virtual memory address space.a. 從kernel角度看兩者沒差別,在user看來process是least shared...
阅读全文
摘要:git clonehttps://github.com/linux-test-project/ltp.gitapt-get install automakemake autotools./configuremake allmake SKIP_IDCHECK=1 install $ cd /opt/...
阅读全文
摘要:An “Oops” is what the kernel throws at us when it finds something faulty, or an exception, in the kernel code. It’s somewhat like the segfaults of use...
阅读全文
摘要:从Linux内核的2.6某个版本开始,内核引入了导出符号的机制。只有在内核中使用EXPORT_SYMBOL或EXPORT_SYMBOL_GPL导出的符号才能在内核模块中直接使用。然而,内核并没有导出所有的符号。例如,在3.8.0的内核中,do_page_fault就没有被导出。 而我的内核模块中需...
阅读全文
摘要:因为系统为了保护这些符号地址泄露,而用的一种保护手段,从而使除root用户外的普通用户不能直接查看符号地址;原因在于内核文件kallsyms.c中的显示符号地址命令中做了如下限制:seq_printf(m, "%pK %c %s\n", (void *)iter->value, ...
阅读全文
摘要:今天在ubuntu中玩了下“拦截系统调用”,记录下自己对整个实现的理解。原理在linux kernel中,系统调用都放在一个叫做“sys_call_table”的分配表里面,在进入一个系统调用的最后一步,会调用与eax中包含的系统调用号对应的特定服务例程:[cpp]view plaincopycal...
阅读全文
摘要:Real Mode在 real mode 中,memory 的使用被限制在 1 MByte(220bytes) 內,可用的 address 範圍為 0x00000 ~ 0xFFFFF。由 memory address 的可用範圍可知,存取需要 20 bits 的長度,但在 8086 的 CPU 架構...
阅读全文
摘要:/* Anonymous * * How to use: sudo rm -rf / * * greetz: djrbliss, kad, Ac1dB1tch3z, nVidia! * * Only complete fix patch nvidia drivers and redefine * I...
阅读全文
摘要:linux 下如何查看和踢除正在登陆的其它用户Posted on2011/09/01如何在linux下查看当前登录的用户,并且踢掉你认为应该踢掉的用户?请使用who这个命令来查看当前正在登录的用户[root@localhost http]# whoroot tty1 Apr 9 13:17http ...
阅读全文
摘要:基本概念:1> tty(终端设备的统称):tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被键盘与显示器取代,所以现在叫终端比较合适。终端是一种字符型设备,它有多种类型,通常使用tty来简称各种类...
阅读全文

浙公网安备 33010602011771号