易截截图软件、单文件、免安装、纯绿色、仅160KB

获取Linux 2.6.x sys_call_table


在linux中所有的syscall都是调用int 0x80, int 0x80的中断服务程序为system_call(arch/x86/kernel/traps_32.c:set_system_gate(SYSCALL_VECTOR,&system_call).  system_call (arch/x86/entry_32.S)最终call *sys_call_table(,%eax,4)来完成一个syscall调用. 
即 int 0x80 -> system_call -> sys_call_table, 这样我们只要首先获取int 0x80的中断服务地址system_call地址, 然后在system_call代码中直接搜索call指令即可找到sys_call_table地址了!
另一种方法就是直接修改
通过cat /boot/System.map-`uname -r` |grep sys_call_table  查看当前sys_call_table地址,并与通过以上方法取得的地址做比较!
内核版本: ubuntu 2.6.24-19-server
/*
 * Standard in kernel modules
 */
#include <linux/kernel.h>   /* We're doing kernel work */
#include <linux/module.h>   /* Specifically, a module, */
#include <linux/moduleparam.h>  /* which will have params */
#include <linux/unistd.h>   /* The list of system calls */
/*
 * For the current (process) structure, we need
 * this to know who the current user is.
 */
#include <linux/sched.h>
#include <asm/uaccess.h>
unsigned long *sys_call_table = 0;
//EXPORT_SYMBOL ( sys_call_table );
struct {
    unsigned short  limit;
    unsigned int    base;
} __attribute__ ( ( packed ) ) idtr;
struct {
    unsigned short  offset_low;
    unsigned short  segment_select;
    unsigned char   reserved,   flags;
    unsigned short  offset_high;
} __attribute__ ( ( packed ) ) * idt;
unsigned long* find_sys_call_table(void)
{
    unsigned long system_call = 0;          // x80中断处理程序system_call 地址
    char *call_hex = "\xff\x14\x85";    // call 指令
    char *code_ptr = NULL;
   


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

linux 中新增加硬盘及扩展SWAP交换分区

       在linux中,当我们因为需要新添加一块硬盘,或者是我们swap交换分区空间不够,需要增加,我们怎么来处理呢?首先,找一块新硬盘,在断电的情况下接入,启动计算机,接就进行如下操作:
一、新增磁盘分区、格式化
首先用fdisk -l 查看新增硬盘的盘符,例如/dev/sdb;
将其分成三个区:
#fdis ......

Java 在Windows&Linux 环境下基本配置

一、Windows环境下的Java环境配置
 
1、安装JDK
2、配置环境变量
Win2000以及WinXP中可以在“我的电脑”属性的“高级”选项中找到“环境变量”,然后可以根据如下提示进行新建或者修改——
<1>JAVA_HOME
   设置为 JDK的安装目录
 <2>PATH ......

LINUX下为ff添加flash 插件

首先, 我的FF版本是3.0.16的,从官网(http://get.adobe.com/flashplayer/)上下载.tar.gz包后。。解压出里面的一个*.so文件
件之后,把该文件复制到/usr/lib/mozillia/plugins下,重启ff就OK了。
(以上方法仅供参考,至少我是这样做的,并且成功了,) ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号