在Centos6.7上安装YARA

在Centos6.7上安装YARA

一.准备阶段
1. 在虚拟机上安装Centos6.7系统
2. 完成设置,配置网络环境,通过CRT连接系统
二.安装阶段
1. 从https://github.com/VirusTotal/yara/releases 上下载YARA安装包
2. 通过CRT软件的SFTP会话窗口把安装包上传到系统
在Centos6.7上安装YARA
在Centos6.7上安装YARA
3. 解压yara-3.6.3.tar.gz
[[email protected] ~]# tar -zxf yara-3.6.3.tar.gz
4. 安装支持包automake
[[email protected] ~]# yum install automake -y
5. 安装支持包libtool
[[email protected] ~]# yum install libtool -y
6. 安装支持包make
[[email protected] ~]# yum install make -y
7. 安装支持包gcc
[[email protected] ~]# yum install gcc -y
8. 进入yara -3.6.3 目录
[[email protected] ~]# cd yara-3.6.3 进入yara -3.6.3 目录
9. 编译环境
[[email protected] yara-3.6.3]# ./bootstrap.sh 编译环境
10. 以标准方式编译和安装yara
[[email protected] yara-3.6.3]# ./configure
[[email protected] yara-3.6.3]# make
[[email protected] yara-3.6.3]# sudo make install
11. 运行测试
make check
三. 首次运行YARA
1. 编写简单的规则
[[email protected] yara-3.6.3]# echo “rule dummy {condition:true}” > my_first_rule
2. 通过yaya扫描文件
[[email protected] yara-3.6.3]# yara my_first_rule my_first_rule

显示 dummy my_first_rule 表示yara安装完成