[sh2log]Linux键盘记录 keylogger notes

网友投稿 938 2023-02-12

本站部分文章、图片属于网络上可搜索到的公开信息,均用于学习和交流用途,不能代表睿象云的观点、立场或意见。我们接受网民的监督,如发现任何违法内容或侵犯了您的权益,请第一时间联系小编邮箱jiasou666@gmail.com 处理。

[sh2log]Linux键盘记录 keylogger notes

不仅可以记录到击键信息,而且包括终端下的输出信息

编译选项

1
2
3
4
5
6
7
8
9
10
11
[root@Centos sh2log-1.0]# make
Please specify the target:
make linux
make freebsd
make openbsd
make cygwin
make sunos
make irix
make hpux
make aix
make osf

如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[root@Centos sh2log-1.0]# make linux
gcc-g-W-Wall-osh2log rc4.csha1.csh2log.c-lutil-DLINUX
gcc-g-W-Wall-osh2logd rc4.csha1.csh2logd.c
gcc-g-W-Wall-oparser rc4.csha1.cparser.c-lX11-L/usr/X11R6/lib
parser.c:35:22:error:X11/Xlib.h:No such file ordirectory
parser.c:Infunctionmain:
parser.c:291:error:Displayundeclared(first useinthisfunction)
parser.c:291:error:(Eachundeclared identifier isreported only once
parser.c:291:error:foreachfunctionit appears in.)
parser.c:291:error:dpiundeclared(first useinthisfunction)
parser.c:292:error:Windowundeclared(first useinthisfunction)
parser.c:292:error:expected;beforewnd
parser.c:293:error:XWindowAttributesundeclared(first useinthisfunction)
parser.c:293:error:expected;beforexwa
parser.c:515:warning:implicit declaration of functionXOpenDisplay
parser.c:522:error:wndundeclared(first useinthisfunction)
parser.c:524:warning:implicit declaration of functionXSetWindowBorderWidth
parser.c:525:warning:implicit declaration of functionXSync
parser.c:525:error:Falseundeclared(first useinthisfunction)
parser.c:526:warning:implicit declaration of functionXGetWindowAttributes
parser.c:526:error:xwaundeclared(first useinthisfunction)
parser.c:714:warning:implicit declaration of functionXMoveResizeWindow
parser.c:772:warning:implicit declaration of functionXCloseDisplay
make:***[linux]Error1

错误:

1
parser.c:35:22:error:X11/Xlib.h:No such file ordirectory

安装X11

1
[root@Centos sh2log-1.0]# yum install libX11-devel

再编译:

1
2
3
4
[root@Centos sh2log-1.0]# make linux
gcc-g-W-Wall-osh2log rc4.csha1.csh2log.c-lutil-DLINUX
gcc-g-W-Wall-osh2logd rc4.csha1.csh2logd.c
gcc-g-W-Wall-oparser rc4.csha1.cparser.c-lX11-L/usr/X11R6/lib

先删除演示:

1
[root@Centos sh2log-1.0]# rm test.bin

配置:

发现sh2logd 已经启动了 当前目录下生成了以时间命名的BIN文件

1
-rw-------1root root0Jan705:24sh2log-20130107-052402.bin

查看记录

先打开个终端操作以下:

1
2
3
4
5
6
7
8
9
10
[root@Centos log]# bash
[root@Centos log]# ls -la
total112
drwxr-xr-x3root root4096Jan705:17.
drwxrwxrwt17root root4096Jan705:18..
drwxr-xr-x2root root4096Jan705:24sh2log-1.0
-rw-r--r--1root root80240Nov82006sh2log-1.0.tgz
[root@Centos log]# pwd
/tmp/log
[root@Centos log]#

查看日志:

1
2
3
4
5
6
7
8
9
10
[root@Centos sh2log-1.0]# ./parser sh2log-20130107-052402.bin
SID SOURCE IP UID PID START DATE ENDDATE DURATION
1[127.0.0.1]0(27293)07/0105:25|07/0105:25X03s
2[127.0.0.1]0(27407)07/0105:26|07/0105:26X02s
Ininteractive mode,useEnter tofast forward,Space topause andqtoquit.
Note that xterm isrequired forwindow resizing.
Session ID->2
Interactive mode(y/n)?n
07/0105:26:53->ls-la
07/0105:26:53->pwd
上一篇:应急发电机油压低告警处理(应急发电机油压低告警处理流程)
下一篇:it运维巡检表(it机房巡检表)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~