How to Install AIDE on Ubuntu 16.04

Requirements

  • A fresh Alibaba Cloud Ubuntu 16.04 instance.
  • A root password is set up to your instance.
apt-get update -y

Install AIDE

apt-get install aide -y
aide -v
Aide 0.16a2-19-g16ed855
WITH_MMAP
WITH_POSIX_ACL
WITH_SELINUX
WITH_XATTR
WITH_E2FSATTRS
WITH_LSTAT64
WITH_READDIR64
WITH_ZLIB
WITH_MHASH
WITH_AUDIT
CONFIG_FILE = "/dev/null"
aide --help
Aide 0.16a2-19-g16ed855 Usage: aide [options] commandCommands:
-i, --init Initialize the database
-C, --check Check the database
-u, --update Check and update the database non-interactively
-E, --compare Compare two databases
Miscellaneous:
-D, --config-check Test the configuration file
-v, --version Show version of AIDE and compilation options
-h, --help Show this help message
Options:
-c [cfgfile] --config=[cfgfile] Get config options from [cfgfile]
-B "OPTION" --before="OPTION" Before configuration file is read define OPTION
-A "OPTION" --after="OPTION" After configuration file is read define OPTION
-r [reporter] --report=[reporter] Write report output to [reporter] url
-V[level] --verbose=[level] Set debug message level to [level]

Initialize the AIDE Database

aideinit
Running aide --init...AIDE 0.16a2-19-g16ed855 initialized AIDE database at /var/lib/aide/aide.db.new
Start timestamp: 2018-10-26 13:55:24 +0530
Verbose level: 6
Number of entries: 106121---------------------------------------------------
The attributes of the (uncompressed) database(s):
---------------------------------------------------
/var/lib/aide/aide.db.new
RMD160 : 50sFdIM75d6BdpLLWOElGFGe4l8=
TIGER : 4yo3X/K1yKiTG4S949Q0HVyyUoKpaZ6S
SHA256 : mOPM3QgWEj/Qf6YPSfEMgAxnUR25EnwV
YS9tj1orSjE=
SHA512 : R1PMjSwyCo/Mrxsl2VYJmPkQifMFCCsu
47ENh6aeti/9uG+VTL4N8Jr/ZFqQCEGk
I9rMIhyvHj7KgItXXtkYcA==
CRC32 : qg0IOg==
HAVAL : eGIq1QLfp+cJF4p6M0t5Rhsq8RAne2dk
r83W4WQEWNM=
GOST : nGcToJbKzp+RcA9F9N1sQ1ai6liqkTuU
2Cv0akkfVy0=
End timestamp: 2018-10-26 14:10:52 +0530 (run time: 15m 28s)
mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db

Run AIDE Integrity Check

aide -c /etc/aide/aide.conf --check
WARNING: Old db contains a entry that shouldn't be there, run --init or --update
AIDE 0.16a2-19-g16ed855 found NO differences between database and filesystem. Looks okay!!
Start timestamp: 2018-10-26 15:58:22 +0530
Verbose level: 6
Number of entries: 0---------------------------------------------------
The attributes of the (uncompressed) database(s):
---------------------------------------------------
/var/lib/aide/aide.db
RMD160 : gjtiL04CMVHcaPXwL1b3cwWD7c8=
TIGER : HxjPwn6jF9whYglTGi7gvd5fLjSIRvSy
SHA256 : 6BPVFAjo/FrhcEwAgLTFG65NRPwQaWVi
j9YW6MD7Ef8=
SHA512 : 6eZC1+RlI3VIethVTEbFgTwh9mITwStK
6BjzWQn7Wj6WsbAc/sGSmbiSRlC9xar5
0nH9YSaxkFI36hng+UF94Q==
CRC32 : nJvZRg==
HAVAL : jEZQmafv5tWiF2p7rvyvDLeA/4tmK5dh
rVshQWdqVx0=
GOST : /ePMms8ANBSPynGCzAw1Vj+J3fF6sAMA
n/9U+gabMx8=
End timestamp: 2018-10-26 15:58:22 +0530 (run time: 0m 0s)

Test AIDE

update-aide.conf
cp /var/lib/aide/aide.conf.autogenerated /etc/aide/aide.conf.
touch /etc/start.sh
touch /root/file1
touch /root/file2
mkdir /root/dir1
mkdir /root/dir2
aide -c /etc/aide/aide.conf --check
AIDE 0.16a2-19-g16ed855 found differences between database and filesystem!!
Start timestamp: 2018-10-26 16:08:33 +0530
Verbose level: 6
Summary:
Total number of entries: 96090
Added entries: 7
Removed entries: 9
Changed entries: 18
---------------------------------------------------
Added entries:
---------------------------------------------------
f++++++++++++++++: /etc/start.sh
f++++++++++++++++: /root/aide.conf
d++++++++++++++++: /root/dir1
d++++++++++++++++: /root/dir2
f++++++++++++++++: /root/file1
f++++++++++++++++: /root/file2
f++++++++++++++++: /var/lib/aide/aide.db
---------------------------------------------------
aide -c /etc/aide/aide.conf --update
AIDE 0.16a2-19-g16ed855 found differences between database and filesystem!!
New AIDE database written to /var/lib/aide/aide.db.new
Start timestamp: 2018-10-26 16:43:36 +0530
Verbose level: 6
Summary:
Total number of entries: 96099
Added entries: 16
Removed entries: 9
Changed entries: 19
---------------------------------------------------
Added entries:
---------------------------------------------------
f++++++++++++++++: /etc/start.sh
f++++++++++++++++: /root/aide.conf
d++++++++++++++++: /root/dir1
d++++++++++++++++: /root/dir2
f++++++++++++++++: /root/file1
f++++++++++++++++: /root/file2
f++++++++++++++++: /run/systemd/sessions/9
F++++++++++++++++: /run/systemd/sessions/9.ref
d++++++++++++++++: /run/systemd/system/session-9.scope.d
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-After-systemd-logind\x2eservice.conf
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-After-systemd-user-sessions\x2eservice.conf
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-Description.conf
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-SendSIGHUP.conf
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-Slice.conf
f++++++++++++++++: /run/systemd/system/session-9.scope.d/50-TasksMax.conf
f++++++++++++++++: /var/lib/aide/aide.db
cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db
update-aide.conf
cp /var/lib/aide/aide.conf.autogenerated /etc/aide/aide.conf

Conclusion

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Backend development in Kotlin

Software Tester with the Scottish Tech Army

Front page of a software project

Deploying Tens of Thousands of Servers in Minutes with Container Technology

How to Synchronize RDS Data to a Local User-Defined Database

RoadMap to Web development

The Mendix escape room

All about “Tinker” testnet (InvArch)

Web Development using JSP & Servlet

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Finding an Optimal Suite of Nodes for a Kubernetes Cluster Operations

Kubernetes Architecture from 10,000 feet

How to install Elasticsearch and Kibana version 8.1 on RHEL For Beginner

How to update Appsettings.json based on deployment environment using yaml.