<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nptskial</id>
	<title>ICO wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nptskial"/>
	<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php/Special:Contributions/Nptskial"/>
	<updated>2026-05-09T15:07:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123002</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123002"/>
		<updated>2017-05-26T18:42:31Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recommendations and Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that &lt;br /&gt;
&lt;br /&gt;
the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. &lt;br /&gt;
&lt;br /&gt;
Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all &lt;br /&gt;
&lt;br /&gt;
requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123001</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123001"/>
		<updated>2017-05-26T18:41:57Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recommendations and Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that &lt;br /&gt;
&lt;br /&gt;
the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. &lt;br /&gt;
&lt;br /&gt;
Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123000</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=123000"/>
		<updated>2017-05-26T18:41:43Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recommendations and Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that &lt;br /&gt;
&lt;br /&gt;
the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. &lt;br /&gt;
Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122999</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122999"/>
		<updated>2017-05-26T18:41:18Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recommendations and Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that &lt;br /&gt;
&lt;br /&gt;
the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. &lt;br /&gt;
&lt;br /&gt;
Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122998</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122998"/>
		<updated>2017-05-26T18:41:07Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recommendations and Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that &lt;br /&gt;
&lt;br /&gt;
the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122997</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122997"/>
		<updated>2017-05-26T18:40:39Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Risks and Countermeasures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management &lt;br /&gt;
&lt;br /&gt;
(assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122996</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122996"/>
		<updated>2017-05-26T18:39:59Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* UI - User Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, &lt;br /&gt;
&lt;br /&gt;
or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122995</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122995"/>
		<updated>2017-05-26T18:39:20Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Short Information System Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages &lt;br /&gt;
&lt;br /&gt;
are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122994</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122994"/>
		<updated>2017-05-26T18:39:05Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Short Information System Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us &lt;br /&gt;
&lt;br /&gt;
through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122993</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122993"/>
		<updated>2017-05-26T18:38:34Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Short Information System Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122992</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122992"/>
		<updated>2017-05-26T18:37:52Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Short Information System Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer &lt;br /&gt;
&lt;br /&gt;
details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby &lt;br /&gt;
&lt;br /&gt;
granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122991</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122991"/>
		<updated>2017-05-26T18:36:56Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
&lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122990</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122990"/>
		<updated>2017-05-26T18:36:44Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment &lt;br /&gt;
finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122989</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122989"/>
		<updated>2017-05-26T18:36:06Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122988</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122988"/>
		<updated>2017-05-26T18:35:40Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / &lt;br /&gt;
&lt;br /&gt;
Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122986</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122986"/>
		<updated>2017-05-26T17:18:30Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Architectural Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Architectural_model_WPE1.png&amp;diff=122985</id>
		<title>File:Architectural model WPE1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Architectural_model_WPE1.png&amp;diff=122985"/>
		<updated>2017-05-26T17:18:11Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122984</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122984"/>
		<updated>2017-05-26T17:16:59Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Architectural Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no direct competitors&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organised and motivated&lt;br /&gt;
| Small company, not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer skepticism - might not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* As a user I need to find specific information on an installed application, so I enter my name into the search bar and press the search-button.&lt;br /&gt;
* As a user I find an application, select it and press the &amp;quot;view detailed information&amp;quot;-button.&lt;br /&gt;
* As a user I don&#039;t see any specific details about an application so I press &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* As a user I look through provided information because I want to remove the application and thus press the &amp;quot;uninstall&amp;quot;-button, a confirmation dialogue appears and I confirm my decision.&lt;br /&gt;
* As a user I want to find possible similar applications so I press &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* As a premium user I see a notification press it which opens up a tab with an active analysis of host system.&lt;br /&gt;
* As a non-premium user I want to get premium-features, so I switch to the premium-features section which displays features and payment information.&lt;br /&gt;
* As a user I select a preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* As a user I want to change how the application updates, I open the update options from the settings menu and select the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* As a user I want to install a program and check whether the developer is verified or not so I search for the verification signature in the application details.&lt;br /&gt;
* As a user I want to leave feedback on a specific application so I click the &amp;quot;leave feedback&amp;quot; button in the application information details tab which opens up a text-box, I enter feedback and press the submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model1.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures== &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
In this section we identify the major risks and countermeasures to these risks. Implementing a proper standard for service management like ISO-20000 or similar frameworks concerning risk management (assessment / mitigation) are an essential part of this process.&lt;br /&gt;
&lt;br /&gt;
==Prototype==&lt;br /&gt;
[[File:Prototype_wpe.JPG]]&lt;br /&gt;
* Currently application dependencies are not displayed in our prototype, however this feature is accounted for considering our full implementation. In future prototypes this should also be implemented.&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Architectural_model1.png&amp;diff=122983</id>
		<title>File:Architectural model1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Architectural_model1.png&amp;diff=122983"/>
		<updated>2017-05-26T17:16:27Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122922</id>
		<title>User:Eocakovs</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=User:Eocakovs&amp;diff=122922"/>
		<updated>2017-05-25T17:44:45Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* ERD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= I701 - Information System Analysis =&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
====Members====&lt;br /&gt;
* Ardi Vaba&lt;br /&gt;
* Pascal Tietjen&lt;br /&gt;
* Peep Kuulme&lt;br /&gt;
* Nika Ptskialadze&lt;br /&gt;
* Erik Ocakovskih&lt;br /&gt;
* Frank Korving&lt;br /&gt;
&lt;br /&gt;
====Organization==== &lt;br /&gt;
WPE (Windows Programs Explained)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Daily Operations:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
We are a software development company. Our current major project consists of providing and supporting an application with simple interface to analyze currently installed programs on the system. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Information Systems:&#039;&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Accounting Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Customer Support Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Sales Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Developer Daily-Work Information System &amp;lt;br&amp;gt;&lt;br /&gt;
Transaction Processing Information System &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Value Chain Analysis==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Primary Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Software Development [Getting the software to working state]&lt;br /&gt;
* Software Delivery [Getting the product to the market]&lt;br /&gt;
* Sales [Selling a product to current customers and new customer aquisition] &lt;br /&gt;
* Marketing [Providing product information to target group]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* Scheduling [Optimizing work and workload assignments]&lt;br /&gt;
* Support / Service [Maintenance of existing software and customer assistance]&lt;br /&gt;
* Marketing [Customer Management]&lt;br /&gt;
&#039;&#039;Quality Assurance&#039;&#039;&lt;br /&gt;
* Testing [Functionality verification of the developed working software]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Support Activities:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Direct&#039;&#039;&lt;br /&gt;
* Infrastructure [Providing Legal, Administrative and Accounting support]&lt;br /&gt;
* Procurement [Acquisition of external services]&lt;br /&gt;
&#039;&#039;Indirect&#039;&#039;&lt;br /&gt;
* HR Management [Human Resource Management]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IT SWOT==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Strength&lt;br /&gt;
! Weakness&lt;br /&gt;
! Opportunities&lt;br /&gt;
! Threats&lt;br /&gt;
|-&lt;br /&gt;
| Innovative - no other popular program like this&lt;br /&gt;
| No brand recognition&lt;br /&gt;
| Globally extending &lt;br /&gt;
| Larger company might sprint past with a similar program &lt;br /&gt;
|-&lt;br /&gt;
| Strong team - well organized, good &lt;br /&gt;
| Small company not a lot of financial backup&lt;br /&gt;
| Expand the team for faster development&lt;br /&gt;
| Sustainable financial backing&lt;br /&gt;
|-&lt;br /&gt;
| Competitively priced&lt;br /&gt;
| Development slow due to the size of the company&lt;br /&gt;
| Targeting industries&lt;br /&gt;
| Customer scepticisim - do not want to give access to scan their computer&lt;br /&gt;
|-&lt;br /&gt;
| User-friendly interface&lt;br /&gt;
| Organic growth - no outside funding&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Improvements====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problems:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Application Information&lt;br /&gt;
** Due to lack of program information / Methods of updating&lt;br /&gt;
** Trustworthiness / Unknown Sources&lt;br /&gt;
** Customer Perception of the Products [Solution should provide: Transparency for customers / Awareness of Application]&lt;br /&gt;
* Market access / interactions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Short Information System Description====&lt;br /&gt;
&lt;br /&gt;
Information System will provide Windows OS users with detailed information on their installed packages and applications. Provided information will include trustworthiness / rating / availability / checksum / developer details of the application. System will incentivize users and developers to submit descriptions of applications, which would go through a review process before publication. Companies can become verified by us through a paid application verification process thereby granting &amp;quot;trust-ability&amp;quot; to these applications and their developers. Users can subscribe to a live-scanning service which will notify them when any installed packages are compromised or need to be updated.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
====Functional====&lt;br /&gt;
&#039;&#039;&#039;&#039;Users&#039;&#039;&#039;&#039;&lt;br /&gt;
* Users should be able to subscribe to paid services &lt;br /&gt;
* Users should be able to scan their computer and check for installed programs&lt;br /&gt;
* Users should be able to gain information on these installed programs through us (WPE)&lt;br /&gt;
* Users should be able to delete the application&lt;br /&gt;
* Users should be able to request suggestions on alternative&lt;br /&gt;
* Users should be able to search for similar applications&lt;br /&gt;
* Users should be able to search for any application&lt;br /&gt;
* Users should be able to submit their rating/opinion to be reviewed by us&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;Companies&#039;&#039;&#039;&#039;&lt;br /&gt;
* Companies should be able to apply for verification&lt;br /&gt;
* Companies should be able to submit their own description after verification&lt;br /&gt;
&lt;br /&gt;
====Non-Functional====&lt;br /&gt;
* Application shall be operable in offline environment&lt;br /&gt;
* All the application details shall be as transparent to user as possible&lt;br /&gt;
* Every aspect of the software shall be testable&lt;br /&gt;
* User experience of the software shall be as responsive as possible&lt;br /&gt;
* User privacy shall be completely protected&lt;br /&gt;
* Documentation of software shall be easily understood by new developers&lt;br /&gt;
* Backend infrastructure should be scalable&lt;br /&gt;
* Software shall be safe to operate by non technical people&lt;br /&gt;
* Application shall be intuitively operable by 70 year old with minimal technical knowledge&lt;br /&gt;
&lt;br /&gt;
==User Stories==&lt;br /&gt;
* User needs to find specific information on an installed application, enters name into search bar and presses search-button.&lt;br /&gt;
* User finds application, selects it and presses view detailed information button.&lt;br /&gt;
* User sees no specific details about application and presses &amp;quot;request additional information&amp;quot;-button.&lt;br /&gt;
* User looks through provided information, wants to remove the application and presses the &amp;quot;uninstall&amp;quot;-button, confirmation dialogue appears and user confirms his decision.&lt;br /&gt;
* User wants to find possible similar applications, presses &amp;quot;similar apps&amp;quot;-button.&lt;br /&gt;
* Premium user sees notification presses it and opens up a tab with an active analysis of host system.&lt;br /&gt;
* Non-premium user wants to get premium-features, switches to premium-features section which displays features and payment information.&lt;br /&gt;
* User selects preferred amount and payment method from premium-features section which opens up an external browser with preferred payment method&#039;s website.&lt;br /&gt;
* User wants to change how application updates, opens the update options from the settings menu and selects the &amp;quot;ask-for-confirmation-before-update&amp;quot; method.&lt;br /&gt;
* User wants to install a program and check whether the developer is verified or not so searches for the verification signature in the application details.&lt;br /&gt;
* User wants to leave feedback on specific application, clicks &amp;quot;leave feedback&amp;quot; button in the application information details tab that opens up a text-box, the user enters feedback and presses submit button.&lt;br /&gt;
&lt;br /&gt;
====Use-Case High Level Overview====&lt;br /&gt;
[[File:High-lvl-overview-3.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data Flow Diagrams==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Context diagram=====&lt;br /&gt;
[[File:Context diagram.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl0-DFD=====&lt;br /&gt;
[[File:Lvl0-DFD.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Lvl1-DFD=====&lt;br /&gt;
[[File:DFD_lvl1_process1-v6.png]]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Approach==&lt;br /&gt;
===Objects===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Object&lt;br /&gt;
! Class&lt;br /&gt;
! Identifier&lt;br /&gt;
! Actions&lt;br /&gt;
! States&lt;br /&gt;
|-&lt;br /&gt;
| Bob&lt;br /&gt;
| User&lt;br /&gt;
| E-mail &lt;br /&gt;
| Submit requests / Access Premium Features / Inspect Installed Applications / Give Feedback / Submit Descriptions on Applications&lt;br /&gt;
| Verified / Unverified / Registered / Unregistered / Premium / Standard &lt;br /&gt;
|-&lt;br /&gt;
| Notepad&lt;br /&gt;
| Application&lt;br /&gt;
| Name + Version&lt;br /&gt;
| Text Editing&lt;br /&gt;
| Installed / Uninstalled / Running&lt;br /&gt;
|-&lt;br /&gt;
| Peep&lt;br /&gt;
| Development Team&lt;br /&gt;
| Company ID&lt;br /&gt;
| Verify Application Descriptions and Issue updates&lt;br /&gt;
| Working / On Holiday&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft&lt;br /&gt;
| Application Owners&lt;br /&gt;
| Company Name&lt;br /&gt;
| Submit detailed on owned Application&lt;br /&gt;
| Verified/Unverified/Bankrupt&lt;br /&gt;
|-&lt;br /&gt;
| Request detail on Notepad&lt;br /&gt;
| Request&lt;br /&gt;
| Unique Request ID&lt;br /&gt;
| Query internal App database / Query Windows / Contact server&lt;br /&gt;
| Pending / Idle / Denied / Accepted / Finalized&lt;br /&gt;
|-&lt;br /&gt;
| Report on Notepad&lt;br /&gt;
| Report&lt;br /&gt;
| Unique Report ID&lt;br /&gt;
| Return application detailed information&lt;br /&gt;
| Delivery Origin/Successful/Failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Actors===&lt;br /&gt;
* Customer -&amp;gt; Obtain detailed app information / Pay subscription / (Un-)Install application / Find applications&lt;br /&gt;
* Developer -&amp;gt; Develop features / write code / Analyze / Design&lt;br /&gt;
* Application Owner -&amp;gt; Get verified / Provide information on Application(s) / Gain users&lt;br /&gt;
&lt;br /&gt;
===Scenario===&lt;br /&gt;
1. As a customer I want to order premium features.&lt;br /&gt;
&lt;br /&gt;
Standard User wants to buy premium features, clicks on the premium feature section, enters required client details in fields, clicks on make payment button, redirected to payment site where payment finalization is taken care of, verification email sent, order details saved in database.&lt;br /&gt;
&lt;br /&gt;
2. As a Premium User I want to see alternative applications&lt;br /&gt;
&lt;br /&gt;
Premium User wants to see alternative applications, selects the relevant application, clicks on the search for alternatives button, gets a list of alternatives application.&lt;br /&gt;
&lt;br /&gt;
===ERD===&lt;br /&gt;
[[File:ERD_WPE1.png |1240px|]]&lt;br /&gt;
&lt;br /&gt;
==Architectural Model==&lt;br /&gt;
[[File:Architectural_model_WPE.png |800px|]]&lt;br /&gt;
&lt;br /&gt;
==UI - User Experience==&lt;br /&gt;
The main goal is to create an application that would be easily operated by the end user.&lt;br /&gt;
Since the application is mainly meant for the average home user, it cannot require any specific knowledge about computers, or computer related terminology.&lt;br /&gt;
All aformentioned points (additionally see non-functional requirements) need to be kept in mind when designing the UI. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurable Key Performance Indicators&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Success rate (how many of the user requests come back with a positive responce. i.e. - if a user requests for additional app info, can we provide that information, or will the user get back nothing).&lt;br /&gt;
* Time on task (e.g. how long does it take for the user to upgrade from standard user to premium user. Does it take too much time, and is the process too complicated).&lt;br /&gt;
* Amount of installations.&lt;br /&gt;
* Time user spends in app (active time).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User feedback&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* In-app feedback tab (option to select how satisfied the user is with the program in a 1-10 point scale, and a comment box)&lt;br /&gt;
* Post service survey. For instance after a user upgrades from standard user to premium user, an email will be sent out with questions about the process and an option to leave feedback and suggestions.&lt;br /&gt;
* Email survey. An email will be sent out with a user satisfaction survey, asking users to rate different parts of the process.&lt;br /&gt;
* In-app survey before uninstalling/downgrading the WPE (With in-app monetary incentive).&lt;br /&gt;
&lt;br /&gt;
==Constraints==&lt;br /&gt;
* Competitors (like &#039;Revo uninstaller&#039; / Windows native Store)&lt;br /&gt;
* Investors / Venture Capital&lt;br /&gt;
* Performance (DB / Network / Program Design)&lt;br /&gt;
* Balance of team (developers vs testers)&lt;br /&gt;
* Time&lt;br /&gt;
* Unforseeable constraints we have to deal with using Agile Approach&lt;br /&gt;
&lt;br /&gt;
==Risks and Countermeasures==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Hackers and data Breaches&lt;br /&gt;
! Hardware failure&lt;br /&gt;
! Power outages&lt;br /&gt;
! Force majeures&lt;br /&gt;
! Software Issues&lt;br /&gt;
! User errors&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Secure software practices&lt;br /&gt;
* Secure network architecture&lt;br /&gt;
* Inhouse team training&lt;br /&gt;
| &lt;br /&gt;
* Backup hardware&lt;br /&gt;
* Cloud / Off-site duplication&lt;br /&gt;
| &lt;br /&gt;
* UPS&lt;br /&gt;
* Power generators&lt;br /&gt;
* Backup servers&lt;br /&gt;
| &lt;br /&gt;
* Correct contracts with customer&lt;br /&gt;
| &lt;br /&gt;
* Increase hiring requirements&lt;br /&gt;
* Hire Testers / Debuggers&lt;br /&gt;
* Educate current developers&lt;br /&gt;
|&lt;br /&gt;
* Create intuitive user experience&lt;br /&gt;
|}&lt;br /&gt;
==Prototype==&lt;br /&gt;
&lt;br /&gt;
==Recommendations and Conclusion==&lt;br /&gt;
Our group identified a need for an information system that would explain to users applications that either are or could be installed. However after careful analysis we have to come to the conclusion that the application will become obsolete due to an increasing push by Microsoft for Windows 10+ and their native Store. For this application to have a future it should integrate with the native Windows store. Therefore we do not proceed to full development and await further action by Microsoft until project becomes viable. &lt;br /&gt;
&lt;br /&gt;
It is suitable for agile since we can identify Minimum Viable Product requirements&lt;br /&gt;
but due to constantly evolving application market and Windows platform,&lt;br /&gt;
we cannot create a full analysis which lists all requirements from the beginning.&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:ERD_WPE1.png&amp;diff=122920</id>
		<title>File:ERD WPE1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:ERD_WPE1.png&amp;diff=122920"/>
		<updated>2017-05-25T17:44:09Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119962</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119962"/>
		<updated>2017-04-07T17:07:26Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore. For example, we can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;aureport --summary&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test5.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: April 7, 2017&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119961</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119961"/>
		<updated>2017-04-07T17:06:40Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Other Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore. For example, we can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;aureport --summary&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test5.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: April 7, 2017&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119960</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119960"/>
		<updated>2017-04-07T16:56:52Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Running summary reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore. For example, we can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;aureport --summary&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test5.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Test5.PNG&amp;diff=119959</id>
		<title>File:Test5.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Test5.PNG&amp;diff=119959"/>
		<updated>2017-04-07T16:56:23Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119958</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119958"/>
		<updated>2017-04-07T16:56:13Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Running summary reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore. For example, we can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;aureport --summary&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will get the following output:&lt;br /&gt;
&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119957</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119957"/>
		<updated>2017-04-07T16:53:20Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Searching for events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119956</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119956"/>
		<updated>2017-04-07T16:52:53Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Searching for events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
[[File:Test4.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Test4.PNG&amp;diff=119955</id>
		<title>File:Test4.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Test4.PNG&amp;diff=119955"/>
		<updated>2017-04-07T16:52:23Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119954</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119954"/>
		<updated>2017-04-07T16:52:12Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Searching for events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions. For example, if we define a rule for watching &#039;&#039;&#039;test.txt&#039;&#039;&#039; file changes, change the file content and then run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;ausearch -ul 0&#039;&#039;&#039; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
based on the UID, in our case 0 which is an UID of root, we will get the following output:&lt;br /&gt;
&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119953</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119953"/>
		<updated>2017-04-07T16:44:43Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119952</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119952"/>
		<updated>2017-04-07T16:44:07Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119950</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119950"/>
		<updated>2017-04-07T16:20:45Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recording commands run by a user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After executing &#039;&#039;&#039;rm&#039;&#039;&#039; command to remove a &#039;&#039;&#039;test.txt&#039;&#039;&#039; file created in previous examples, we get the following log messages in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test3.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Test3.PNG&amp;diff=119949</id>
		<title>File:Test3.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Test3.PNG&amp;diff=119949"/>
		<updated>2017-04-07T16:19:25Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119948</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119948"/>
		<updated>2017-04-07T16:13:25Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Recording commands run by a user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user. For example, we can track all the commands executed by the user if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S execve -k command-executed&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119947</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119947"/>
		<updated>2017-04-07T15:54:00Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Monitoring system calls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls. For example, if we define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a always,exit -F arch=b64 -S clock_settime -k time_change&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we get the following log message in the log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test2.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Test2.PNG&amp;diff=119946</id>
		<title>File:Test2.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Test2.PNG&amp;diff=119946"/>
		<updated>2017-04-07T15:51:43Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119945</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119945"/>
		<updated>2017-04-07T15:25:19Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Watching file access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
In the end of &#039;&#039;&#039;SYSCALL&#039;&#039;&#039; type log messages we can see string &#039;&#039;&#039;key=&amp;quot;test_changes&amp;quot;&#039;&#039;&#039; which means that this message was triggered by the rule that we defined in the previous step.&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119944</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119944"/>
		<updated>2017-04-07T15:23:08Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Watching file access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we will get the following log messages in our log file:&lt;br /&gt;
&lt;br /&gt;
[[File:Test.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Test.PNG&amp;diff=119943</id>
		<title>File:Test.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Test.PNG&amp;diff=119943"/>
		<updated>2017-04-07T15:22:10Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119942</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119942"/>
		<updated>2017-04-07T15:21:48Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Watching file access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted. For example, if we create a test file called test.txt in the home directory and with &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility define the following rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w ~/test.txt -p w -k test_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119687</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=119687"/>
		<updated>2017-03-27T14:30:55Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=OSadmin_wiki_article&amp;diff=118942</id>
		<title>OSadmin wiki article</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=OSadmin_wiki_article&amp;diff=118942"/>
		<updated>2017-03-20T10:10:14Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Chosen topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Intro=&lt;br /&gt;
*Choose a topic from personal experience related with the subject or from topics found on the wiki page&lt;br /&gt;
*[[#Chosen_topics|Write the topic here]].&lt;br /&gt;
*Lecturer will confirm the topic&lt;br /&gt;
*Write your article in wiki environment &lt;br /&gt;
*Inform the [[Operating_systems#Lecturer|lecturer]] when the article is finished&lt;br /&gt;
*Receive feedback for corrections&lt;br /&gt;
&lt;br /&gt;
=Requirements for the wiki article=&lt;br /&gt;
Author: name, group and date when the article is written&lt;br /&gt;
&lt;br /&gt;
==Introduction ==&lt;br /&gt;
Covers points what will be discussed in the article, what are the requirements for the article reader; what are the operating system’s requirements. &lt;br /&gt;
&lt;br /&gt;
==Contents==&lt;br /&gt;
All commands should be easily separable from the overall text. &lt;br /&gt;
Users should be able to copy the commands directly (additional info like prompt and user distinction symbols should be left out from the command description area)&lt;br /&gt;
The text should determine what user permissions are needed to perform these tasks. &lt;br /&gt;
The reader of your article is your fellow students, so try to avoid irrelevant information and stay on topic (don’t explain the meaning of IP address or how to install Ubuntu, when your topic is actually about htop)&lt;br /&gt;
All the content should be referenced. &lt;br /&gt;
Do not use slang and try to be grammatically correct.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; &lt;br /&gt;
Bear in mind that this is an open environment, so everything you write in your wiki article, will be public. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Referencing==&lt;br /&gt;
Best practises of wiki referencing should be used. &lt;br /&gt;
Terms are but between square brackets to reference other articles in the system.&lt;br /&gt;
All drawing and images have to be referenced below the picture and in the text. (for example “System architecture can be viewed on image x, y and z.”)&lt;br /&gt;
Author’s own ideas have to be clearly presentable. Everything used from the sources have to be referenced. &lt;br /&gt;
&lt;br /&gt;
==Fellow student review==&lt;br /&gt;
Please find a fellow student who will review your article and give a feedback on the discussion tab of the article using [http://enos.itcollege.ee/~edmund/materials/viki-artikkel/Assessment-model-for-the-wiki-article.html the following assessment model].&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Besides a short overview, what was discussed in this article, it should also include the author&#039;s own opinion about the topic. &lt;br /&gt;
&lt;br /&gt;
==Category==&lt;br /&gt;
Add the following category to the end of the article (last row):&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Chosen topics=&lt;br /&gt;
Please write here your topic and name, group:&lt;br /&gt;
* &#039;&#039;&#039;Basic Automation with Python&#039;&#039;&#039;; Ardi Vaba; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;SSH Encryption&#039;&#039;&#039;; Frank Korving; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;Translation of OSadmin wiki help page to English [[https://wiki.itcollege.ee/index.php/Osadmin_spikker]]&#039;&#039;&#039;; Peep Kuulme; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;XSS Attack Vectors&#039;&#039;&#039;; Masaki Ihara; CSE-11&lt;br /&gt;
&lt;br /&gt;
*[https://wiki.itcollege.ee/index.php/Auditd &#039;&#039;&#039;Auditd - Linux system monitoring with audit daemon&#039;&#039;&#039;], Nika Ptskialadze, CSE-11&lt;br /&gt;
==Ideas==&lt;br /&gt;
* UNIX CLI password manager https://www.passwordstore.org and its GUI http://qtpass.org/&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://wiki.itcollege.ee/index.php/Osadmin_referaadi_teemad counterpart article in Estonian]&lt;br /&gt;
* http://manpage.io&lt;br /&gt;
* https://linuxjourney.com/&lt;br /&gt;
* [https://linux.die.net/man/ Linux man-pages]&lt;br /&gt;
* [https://linux.die.net Linux docs]&lt;br /&gt;
* http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/&lt;br /&gt;
* http://www.tecmint.com/useful-linux-commands-for-system-administrators/&lt;br /&gt;
* http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html&lt;br /&gt;
* http://www.thegeekstuff.com/2010/12/50-unix-linux-sysadmin-tutorials&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=OSadmin_wiki_article&amp;diff=118940</id>
		<title>OSadmin wiki article</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=OSadmin_wiki_article&amp;diff=118940"/>
		<updated>2017-03-20T10:09:12Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Chosen topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Intro=&lt;br /&gt;
*Choose a topic from personal experience related with the subject or from topics found on the wiki page&lt;br /&gt;
*[[#Chosen_topics|Write the topic here]].&lt;br /&gt;
*Lecturer will confirm the topic&lt;br /&gt;
*Write your article in wiki environment &lt;br /&gt;
*Inform the [[Operating_systems#Lecturer|lecturer]] when the article is finished&lt;br /&gt;
*Receive feedback for corrections&lt;br /&gt;
&lt;br /&gt;
=Requirements for the wiki article=&lt;br /&gt;
Author: name, group and date when the article is written&lt;br /&gt;
&lt;br /&gt;
==Introduction ==&lt;br /&gt;
Covers points what will be discussed in the article, what are the requirements for the article reader; what are the operating system’s requirements. &lt;br /&gt;
&lt;br /&gt;
==Contents==&lt;br /&gt;
All commands should be easily separable from the overall text. &lt;br /&gt;
Users should be able to copy the commands directly (additional info like prompt and user distinction symbols should be left out from the command description area)&lt;br /&gt;
The text should determine what user permissions are needed to perform these tasks. &lt;br /&gt;
The reader of your article is your fellow students, so try to avoid irrelevant information and stay on topic (don’t explain the meaning of IP address or how to install Ubuntu, when your topic is actually about htop)&lt;br /&gt;
All the content should be referenced. &lt;br /&gt;
Do not use slang and try to be grammatically correct.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; &lt;br /&gt;
Bear in mind that this is an open environment, so everything you write in your wiki article, will be public. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Referencing==&lt;br /&gt;
Best practises of wiki referencing should be used. &lt;br /&gt;
Terms are but between square brackets to reference other articles in the system.&lt;br /&gt;
All drawing and images have to be referenced below the picture and in the text. (for example “System architecture can be viewed on image x, y and z.”)&lt;br /&gt;
Author’s own ideas have to be clearly presentable. Everything used from the sources have to be referenced. &lt;br /&gt;
&lt;br /&gt;
==Fellow student review==&lt;br /&gt;
Please find a fellow student who will review your article and give a feedback on the discussion tab of the article using [http://enos.itcollege.ee/~edmund/materials/viki-artikkel/Assessment-model-for-the-wiki-article.html the following assessment model].&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Besides a short overview, what was discussed in this article, it should also include the author&#039;s own opinion about the topic. &lt;br /&gt;
&lt;br /&gt;
==Category==&lt;br /&gt;
Add the following category to the end of the article (last row):&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Chosen topics=&lt;br /&gt;
Please write here your topic and name, group:&lt;br /&gt;
* &#039;&#039;&#039;Basic Automation with Python&#039;&#039;&#039;; Ardi Vaba; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;SSH Encryption&#039;&#039;&#039;; Frank Korving; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;Translation of OSadmin wiki help page to English [[https://wiki.itcollege.ee/index.php/Osadmin_spikker]]&#039;&#039;&#039;; Peep Kuulme; CSE-11&lt;br /&gt;
* &#039;&#039;&#039;XSS Attack Vectors&#039;&#039;&#039;; Masaki Ihara; CSE-11&lt;br /&gt;
&lt;br /&gt;
*[https://wiki.itcollege.ee/index.php/Auditd &#039;&#039;&#039;Linux system monitoring with audit daemon&#039;&#039;&#039;], Nika Ptskialadze, CSE-11&lt;br /&gt;
==Ideas==&lt;br /&gt;
* UNIX CLI password manager https://www.passwordstore.org and its GUI http://qtpass.org/&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://wiki.itcollege.ee/index.php/Osadmin_referaadi_teemad counterpart article in Estonian]&lt;br /&gt;
* http://manpage.io&lt;br /&gt;
* https://linuxjourney.com/&lt;br /&gt;
* [https://linux.die.net/man/ Linux man-pages]&lt;br /&gt;
* [https://linux.die.net Linux docs]&lt;br /&gt;
* http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/&lt;br /&gt;
* http://www.tecmint.com/useful-linux-commands-for-system-administrators/&lt;br /&gt;
* http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html&lt;br /&gt;
* http://www.thegeekstuff.com/2010/12/50-unix-linux-sysadmin-tutorials&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118669</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118669"/>
		<updated>2017-03-18T14:25:51Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Other Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
Author: Nika Ptskialadze&lt;br /&gt;
&lt;br /&gt;
Curriculum: Cyber Security Engineering&lt;br /&gt;
&lt;br /&gt;
Group: C11&lt;br /&gt;
&lt;br /&gt;
Date created: March 11, 2017&lt;br /&gt;
&lt;br /&gt;
Last modification: March 18, 2017&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118668</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118668"/>
		<updated>2017-03-18T14:23:31Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
==Other Details==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118667</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118667"/>
		<updated>2017-03-18T14:22:37Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For more information follow the links:&lt;br /&gt;
&lt;br /&gt;
[http://security.blogoverflow.com/2013/01/a-brief-introduction-to-auditd/ A Brief Introduction to auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/customized-file-monitoring-auditd Customized File Monitoring with Auditd]&lt;br /&gt;
&lt;br /&gt;
[https://www.linux.com/learn/linux-system-monitoring-and-more-auditd Linux System Monitoring and More with Auditd]&lt;br /&gt;
&lt;br /&gt;
[http://linoxide.com/how-tos/auditd-tool-security-auditing/ Auditd - Tool for Security Auditing on Linux Server]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7 How To Use the Linux Auditing System on CentOS 7]&lt;br /&gt;
&lt;br /&gt;
[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&lt;br /&gt;
&lt;br /&gt;
[http://magazine.hackinthebox.org/issues/HITB-Ezine-Issue-005.pdf Investigating Kernel Return Codes with the Linux Audit System]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118664</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118664"/>
		<updated>2017-03-18T14:17:12Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118663</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118663"/>
		<updated>2017-03-18T14:16:32Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
Linux Auditing System is one of the most powerful tools for system administrators for monitoring the whole system. The variety of commands and rules gives administrators incredible flexibility and almost endless possibilities to monitor every single action and event on the system. Using Auditing System makes it easier to find and track malicious users and security policy violators on the system and this gives opportunity to take further actions against violators. As the Auditing System is working on the kernel level, its ability to give an information of incredible granularity, makes this system an essential tool for system administrators and this is one of the main reasons why knowledge of using this system is required for many security-related certifications.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118662</id>
		<title>Auditd</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Auditd&amp;diff=118662"/>
		<updated>2017-03-18T14:09:50Z</updated>

		<summary type="html">&lt;p&gt;Nptskial: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Auditd&#039;&#039;&#039; - is the userspace component of the Linux Auditing System&amp;lt;ref&amp;gt;[https://linux.die.net/man/8/auditd auditd - Linux man page]&amp;lt;/ref&amp;gt;. It is responsible for writing audit records to the disk. &#039;&#039;&#039;The Linux Auditing System&#039;&#039;&#039; helps system administrators to create an audit trail, a log for every action on the server. Since &#039;&#039;&#039;Auditd&#039;&#039;&#039; operates at the kernel level, this gives system administrators an opportunity to get detailed information about any system operation. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; provides a way to track security-relevant information on the system. Based on pre-configured rules, &#039;&#039;&#039;Auditd&#039;&#039;&#039; generates log entries to record as much information about the events that are happening on the system as possible. System administrators can choose which actions on the server should be monitored and to what extent. This information is crucial for mission-critical environments to determine the violator of the security policy and the actions they performed. &#039;&#039;&#039;Auditd&#039;&#039;&#039; does not provide additional security to the system, rather it can be used to discover violations of security policies used on the system. These violations can further be prevented by additional security measures such as SELinux. &#039;&#039;&#039;The Linux Audit System&#039;&#039;&#039; is developed and maintained by &#039;&#039;&#039;RedHat&#039;&#039;&#039;&amp;lt;ref name=chapter7&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html Chapter 7.System Auditing]&amp;lt;/ref&amp;gt;. For using Linux Auditing System the user should have system administration experience and &#039;&#039;&#039;auditd&#039;&#039;&#039; packages installed on the system. For executing &#039;&#039;&#039;auditd&#039;&#039;&#039;-related commands the &#039;&#039;&#039;root&#039;&#039;&#039; permissions are required.&lt;br /&gt;
&lt;br /&gt;
==Usage and use cases==&lt;br /&gt;
===Usage===&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; is a powerful tool for system administrators as it allows them to monitor access to any file, network traffic and almost everything they would need. The level of detail is phenomenal, since the daemon operates at kernel level and the granularity of the information has been proven to be very useful. The following list summarizes some of the information that Audit can record in its log files&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Date and time, type, and outcome of an event.&lt;br /&gt;
&lt;br /&gt;
*Sensitivity labels of subjects and objects.&lt;br /&gt;
&lt;br /&gt;
*Association of an event with the identity of the user who triggered the event.&lt;br /&gt;
&lt;br /&gt;
*All modifications to Audit configuration and attempts to access Audit log files.&lt;br /&gt;
&lt;br /&gt;
*All uses of authentication mechanisms, such as &#039;&#039;&#039;SSH&#039;&#039;&#039;, &#039;&#039;&#039;Kerberos&#039;&#039;&#039;, and others.&lt;br /&gt;
&lt;br /&gt;
*Changes to any trusted database, such as &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Attempts to import or export information into or from the system.&lt;br /&gt;
&lt;br /&gt;
*Include or exclude events based on user identity, subject and object labels, and other attributes.&lt;br /&gt;
&lt;br /&gt;
The use of Audit system is also a requirement for a number of security related certifications&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Controlled Access Protection Profile (&#039;&#039;&#039;CAPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Labeled Security Protection Profile (&#039;&#039;&#039;LSPP&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Rule Set Base Access Control (&#039;&#039;&#039;RSBAC&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*National Industrial Security Program Operating Manual (&#039;&#039;&#039;NISPOM&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Federal Information Security Management Act (&#039;&#039;&#039;FISMA&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Payment Card Industry — Data Security Standard (&#039;&#039;&#039;PCI-DSS&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
*Security Technical Implementation Guides (&#039;&#039;&#039;STIG&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
===Use cases===&lt;br /&gt;
====Watching file access====&lt;br /&gt;
Audit can track whether a file or a directory has been accessed, modified, executed, or the file&#039;s attributes have been changed. This is useful, for example, to detect access to important files and have an Audit trail available in case one of these files is corrupted.&lt;br /&gt;
====Monitoring system calls====&lt;br /&gt;
Audit can be configured to generate a log entry every time a particular system call is used. This can be used, for example, to track changes to the system time by monitoring the &#039;&#039;&#039;settimeofday&#039;&#039;&#039;, &#039;&#039;&#039;clock_adjtime&#039;&#039;&#039;, and other time-related system calls.&lt;br /&gt;
====Recording commands run by a user====&lt;br /&gt;
Because Audit can track whether a file has been executed, a number of rules can be defined to record every execution of a particular command. For example, a rule can be defined for every executable in the &#039;&#039;&#039;/bin&#039;&#039;&#039; directory. The resulting log entries can then be searched by user ID to generate an audit trail of executed commands per user.&lt;br /&gt;
====Recording security events====&lt;br /&gt;
The &#039;&#039;&#039;pam_faillock&#039;&#039;&#039; authentication module is capable of recording failed login attempts. Audit can be set up to record failed login attempts as well, and provides additional information about the user who attempted to log in.&lt;br /&gt;
====Searching for events====&lt;br /&gt;
Audit provides the &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility, which can be used to filter the log entries and provide a complete audit trail based on a number of conditions.&lt;br /&gt;
====Running summary reports====&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility can be used to generate, among other things, daily reports of recorded events. A system administrator can then analyze these reports and investigate suspicious activity furthermore.&lt;br /&gt;
====Monitoring network access====&lt;br /&gt;
The &#039;&#039;&#039;iptables&#039;&#039;&#039; and &#039;&#039;&#039;ebtables&#039;&#039;&#039; utilities can be configured to trigger Audit events, allowing system administrators to monitor network access.&lt;br /&gt;
&lt;br /&gt;
==Audit system architecture==&lt;br /&gt;
[[File:audit_components1.png|right|thumb|Audit components]]&lt;br /&gt;
&lt;br /&gt;
===Audit System components===&lt;br /&gt;
The following list describes Audit system components and their functionalities&amp;lt;ref name=suse&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_bigpicture.html Suse Doc:Security Guide - Introducing the Components of Linux Audit]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
;auditd&lt;br /&gt;
:The audit daemon is responsible for writing the audit messages that were generated through the audit kernel interface and triggered by application and system activity to disk. The way the audit daemon is started is controlled by its configuration file, &#039;&#039;&#039;/etc/sysconfig/auditd&#039;&#039;&#039;. The audit system functions (once started) are controlled by &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;auditctl&lt;br /&gt;
:The &#039;&#039;&#039;auditctl&#039;&#039;&#039; utility controls the audit system. It controls the log generation parameters and kernel settings of the audit interface as well as the rule sets that determine which events are tracked.&lt;br /&gt;
&lt;br /&gt;
;audit rules&lt;br /&gt;
:The file &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; contains a sequence of &#039;&#039;&#039;auditctl&#039;&#039;&#039; commands that are loaded at system boot time immediately after the audit daemon is started.&lt;br /&gt;
&lt;br /&gt;
;aureport&lt;br /&gt;
:The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to create custom reports from the audit event log. This report generation can easily be scripted, and the output can be used by various other applications, for example, to plot these results.&lt;br /&gt;
&lt;br /&gt;
;ausearch&lt;br /&gt;
:The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility can search the audit log file for certain events using various keys or other characteristics of the logged format. &lt;br /&gt;
&lt;br /&gt;
;audispd&lt;br /&gt;
:The audit dispatcher daemon (&#039;&#039;&#039;audispd&#039;&#039;&#039;) can be used to relay event notifications to other applications instead of (or in addition to) writing them to disk in the audit log. &lt;br /&gt;
&lt;br /&gt;
;autrace&lt;br /&gt;
:The &#039;&#039;&#039;autrace&#039;&#039;&#039; utility traces individual processes in a fashion similar to &#039;&#039;&#039;strace&#039;&#039;&#039;. The output of autrace is logged to the audit log.&lt;br /&gt;
&lt;br /&gt;
==Installation of Audit packages==&lt;br /&gt;
Audit system uses following packages: &#039;&#039;&#039;audit&#039;&#039;&#039; and &#039;&#039;&#039;audit-libs&#039;&#039;&#039;. These packages are available for almost every major Linux distribution. If the packages are not installed by default, they can be installed with the following commands&amp;lt;ref&amp;gt;[http://xmodulo.com/how-to-monitor-file-access-on-linux.html How to monitor file access on Linux with auditd]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Debian&#039;&#039;&#039;, &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; or &#039;&#039;&#039;Linux Mint&#039;&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo apt-get install auditd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For &#039;&#039;&#039;Fedora&#039;&#039;&#039;, &#039;&#039;&#039;CentOS&#039;&#039;&#039; or &#039;&#039;&#039;RHEL&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$ sudo yum install audit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting and configuring Audit service==&lt;br /&gt;
The Audit daemon can be configured in the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; configuration file&amp;lt;ref name=chapter7 /&amp;gt;. This file consists of configuration parameters that modify the behavior of the Audit daemon. Any empty lines or any text following a hash sign (#) is ignored. A complete listing of all configuration parameters and their explanation can be found in the [https://linux.die.net/man/5/auditd.conf &#039;&#039;&#039;audit.conf(5)&#039;&#039;&#039; man page].&lt;br /&gt;
&lt;br /&gt;
Usually, default configurations are sufficient for most setups, but depending on whether the environment has to satisfy the requirements of &#039;&#039;&#039;&#039;Controlled Access Protection Profile(CAPP)&#039;&#039;&#039;, then the audit daemon configuration needs to be extra restrictive. In this case audit daemon has to be configured with the following settings&amp;lt;ref name=chapter7 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*The directory that holds the Audit log files (usually &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039;) should reside on a separate partition. This prevents other processes from consuming space in this directory, and provides accurate detection of the remaining space for the Audit daemon.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file&#039;&#039;&#039; parameter, which specifies the maximum size of a single Audit log file, must be set to make full use of the available space on the partition that holds the Audit log files.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;max_log_file_action&#039;&#039;&#039; parameter, which decides what action is taken once the limit set in &#039;&#039;&#039;max_log_file&#039;&#039;&#039; is reached, should be set to &#039;&#039;&#039;keep_logs&#039;&#039;&#039; to prevent Audit log files from being overwritten.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;space_left&#039;&#039;&#039; parameter, which specifies the amount of free space left on the disk for which an action that is set in the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a number that gives the administrator enough time to respond and free up disk space. The &#039;&#039;&#039;space_left&#039;&#039;&#039; value depends on the rate at which the Audit log files are generated.&lt;br /&gt;
&lt;br /&gt;
*It is recommended to set the &#039;&#039;&#039;space_left_action&#039;&#039;&#039; parameter to &#039;&#039;&#039;email&#039;&#039;&#039; or &#039;&#039;&#039;exec&#039;&#039;&#039; with an appropriate notification method.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left&#039;&#039;&#039; parameter, which specifies the absolute minimum amount of free space for which an action that is set in the &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter is triggered, must be set to a value that leaves enough space to log actions performed by the administrator.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;admin_space_left_action&#039;&#039;&#039; parameter must be set to &#039;&#039;&#039;single&#039;&#039;&#039; to put the system into single-user mode and allow the administrator to free up some disk space.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_full_action&#039;&#039;&#039; parameter, which specifies an action that is triggered when no free space is available on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;halt&#039;&#039;&#039; or &#039;&#039;&#039;single&#039;&#039;&#039;. This ensures that the system is either shut down or operating in single-user mode when Audit can no longer log events.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;disk_error_action&#039;&#039;&#039;, which specifies an action that is triggered in case an error is detected on the partition that holds the Audit log files, must be set to &#039;&#039;&#039;syslog&#039;&#039;&#039;, &#039;&#039;&#039;single&#039;&#039;&#039;, or &#039;&#039;&#039;halt&#039;&#039;&#039;, depending on your local security policies regarding the handling of hardware malfunctions.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;flush&#039;&#039;&#039; configuration parameter must be set to &#039;&#039;&#039;sync&#039;&#039;&#039; or &#039;&#039;&#039;data&#039;&#039;&#039;. These parameters assure that all Audit event data is fully synchronized with the log files on the disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once &#039;&#039;&#039;auditd&#039;&#039;&#039; is properly configured, service can be started to collect Audit information and store it in the log files. To start the srvice, following command should be executed as a root user&amp;lt;ref name=7.4&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-starting_the_audit_service.html Starting the audit service]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# service auditd start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditd&#039;&#039;&#039; can also be configured to start at boot time using the following command as a root user&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;# chkconfig auditd on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A number of other actions can be performed on &#039;&#039;&#039;auditd&#039;&#039;&#039; using the &#039;&#039;&#039;service auditd&#039;&#039;&#039; &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; where &#039;&#039;&#039;&#039;action&#039;&#039;&#039;&#039; can be one of the following&amp;lt;ref name=7.4 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;stop&#039;&#039;&#039; — stops &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;restart&#039;&#039;&#039; — restarts &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;reload&#039;&#039;&#039; or &#039;&#039;&#039;force-reload&#039;&#039;&#039; — reloads the configuration of &#039;&#039;&#039;auditd&#039;&#039;&#039; from the &#039;&#039;&#039;/etc/audit/auditd.conf&#039;&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;rotate&#039;&#039;&#039; — rotates the log files in the &#039;&#039;&#039;/var/log/audit/&#039;&#039;&#039; directory&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;resume&#039;&#039;&#039; — resumes logging of Audit events after it has been previously suspended, for example, when there is not enough free space on the disk partition that holds the Audit log files&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;status&#039;&#039;&#039; — displays the running status of &#039;&#039;&#039;auditd&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Defining Audit rules==&lt;br /&gt;
&lt;br /&gt;
Audit rules are used to specify which components of the system should be audited. There are three basic types of audit rules&amp;lt;ref name=suse3&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html Linux Audit Quick Start]&amp;lt;/reF&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*Basic audit system parameters&lt;br /&gt;
&lt;br /&gt;
*File and directory watches&lt;br /&gt;
&lt;br /&gt;
*System call audits&lt;br /&gt;
&lt;br /&gt;
Before creating audit rules and rolling them out to the system, system administrators should carefully determine which components to audit as extensive auditing causes substantial logging load. Also, system should provide enough disk space to store large audit logs.&lt;br /&gt;
&lt;br /&gt;
Audit rules can either be passed to the audit system by the command line using &#039;&#039;&#039;auditctl&#039;&#039;&#039;, or defined in a rules file located under &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Defining Audit rules with auditctl utility===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;auditctl&#039;&#039;&#039; command allows to control basic functionality of the Audit system. Command supplied by &#039;&#039;&#039;auditctl&#039;&#039;&#039; are not persistent across restarts.&lt;br /&gt;
&lt;br /&gt;
====Defining control rules====&lt;br /&gt;
The following are some of the control rules that allow to modify the behavior of the Audit system&amp;lt;ref name=7.5&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Defining_Audit_Rules_and_Controls.html Defining Audit Rules]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-b&#039;&#039;&#039; - sets the maximum amount of existing Audit buffers in the kernel, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -b 8192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-f&#039;&#039;&#039; - sets the action that is performed when the critical error is detected, for example the following command triggers a kernel panic in case of a critical error:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -f 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-e&#039;&#039;&#039; - enables and disables the Audit system or locks its configuration, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -e 2&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-r&#039;&#039;&#039; - sets the rate of generated messages per second, for example the following command sets no limit for generated messages:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -r 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-s&#039;&#039;&#039; - reports the status of the Audit system, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -s&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;AUDIT_STATUS: enabled=1 flag=2 pid=0 rate_limit=0 backlog_limit=8192 lost=259 backlog=0&amp;lt;/code&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;-l&#039;&#039;&#039; - lists all currently loaded Audit rules, for example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -l&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/localtime perm=wa key=time-change&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/group perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/passwd perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;LIST_RULES: exit,always watch=/etc/gshadow perm=wa key=identity&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;-D&#039;&#039;&#039; - deletes all currently loaded Audit rules&lt;br /&gt;
&lt;br /&gt;
====Defining file system rules====&lt;br /&gt;
For defining a file system rule, the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -w&#039;&#039;&#039; &#039;&#039;path_to_file&#039;&#039; &#039;&#039;&#039;-p&#039;&#039;&#039; &#039;&#039;permissions&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;path_to_file&#039;&#039; is the file or directory that is audited&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;permissions&#039;&#039; are the permissions that are logged&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;r&#039;&#039;&#039; - read access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;w&#039;&#039;&#039; - write access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;x&#039;&#039;&#039; - execute access to the file or directory&lt;br /&gt;
&lt;br /&gt;
**&#039;&#039;&#039;a&#039;&#039;&#039; - change in the file&#039;s or directory&#039;s attribute&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or set of rules generated a particular log&lt;br /&gt;
&lt;br /&gt;
For example the following rule logs all write access to the &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;# auditctl -w &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; -p &#039;&#039;&#039;w&#039;&#039;&#039; -k &#039;&#039;&#039;passwd_changes&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example &#039;&#039;&#039;/etc/passwd&#039;&#039;&#039; is the file we want to log access to, &#039;&#039;&#039;w&#039;&#039;&#039; parameter describes that we want to log &#039;&#039;&#039;write&#039;&#039;&#039; access and &#039;&#039;&#039;passwd_changes&#039;&#039;&#039; is a key which helps us for identifying the rule which generated the log.&lt;br /&gt;
&lt;br /&gt;
====Defining system call rules====&lt;br /&gt;
For defining system call rules the following syntax should be used&amp;lt;ref name=7.5 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# &#039;&#039;&#039;auditctl -a&#039;&#039;&#039; &#039;&#039;action,filter&#039;&#039; &#039;&#039;&#039;-S&#039;&#039;&#039; &#039;&#039;system_call&#039;&#039; &#039;&#039;&#039;-F&#039;&#039;&#039; &#039;&#039;field=value&#039;&#039; &#039;&#039;&#039;-k&#039;&#039;&#039; &#039;&#039;key_name&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;action&#039;&#039; and &#039;&#039;filter&#039;&#039; specify when a certain event is logged. &#039;&#039;action&#039;&#039; can be either &#039;&#039;&#039;always&#039;&#039;&#039; or &#039;&#039;&#039;never&#039;&#039;&#039;. &#039;&#039;filter&#039;&#039; specifies which kernel rule-matching filter is applied to the event. The rule-matching filter can be one of the following: &#039;&#039;&#039;task, exit, user, and exclude&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;system_call&#039;&#039; specifies the system call by its name.Several system calls can be grouped into one rule, each specified after the &#039;&#039;&#039;-S&#039;&#039;&#039; option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;field=value&#039;&#039; specifies additional options that furthermore modify the rule to match events based on a specified architecture, group ID, process ID, and others&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;key_name&#039;&#039; is an optional string that helps to identify which rule or a set of rules generated a particular log entry&lt;br /&gt;
&lt;br /&gt;
===Defining persistent Audit rules and controls===&lt;br /&gt;
For defining Audit rules that are persistent across reboots, the rules should be included in the &#039;&#039;&#039;/etc/audit/audit.rules&#039;&#039;&#039; file which uses the same &#039;&#039;&#039;auditctl&#039;&#039;&#039; command line syntax. Any empty lines or any text following the hash(#) sign is ignored. This file is read during the start of the audit daemon. Here we can see a possible basic configuration of the &#039;&#039;&#039;audit.rules&#039;&#039;&#039; file&amp;lt;ref name=suse3 /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Audit_rules.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Understanding Audit log files==&lt;br /&gt;
By default the Audit system log entries are stored in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. Understanding Audit logs is crucial for using the system auditing daemon. The following rule logs every attempt to read or modify the &#039;&#039;&#039;/etc/ssh/sshd_config&#039;&#039;&#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-w /etc/ssh/sshd_config -p warx -k sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;auditd&#039;&#039;&#039; daemon is running, the following command creates a new event in the Audit log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# cat /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The event in the &#039;&#039;&#039;audit.log&#039;&#039;&#039; file looks as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Log.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above event consists of three records each starting with the &#039;&#039;&#039;type=&#039;&#039;&#039; keyword. All three records share time stamp and serial number. Each records consists of several &#039;&#039;&#039;name=value&#039;&#039;&#039; pairs separated by a white space or a comma. Each value has its meaning&amp;lt;ref name=7.6&amp;gt;[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Understanding_Audit_Log_Files.html Understanding Audit Log Files]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_aureport.html Understanding the Audit Logs and Generating Reports]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;type&lt;br /&gt;
:The type of the event recorded. For a list of all possible values and their explanations see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sec-Audit_Record_Types.html &amp;quot;Audit Record Types&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
;msg&lt;br /&gt;
:A time stamp and a unique ID of the record in the form &#039;&#039;&#039;audit(&#039;&#039;time_stamp:ID&#039;&#039;)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;arch&lt;br /&gt;
:CPU architecture of the system call&lt;br /&gt;
&lt;br /&gt;
;syscall&lt;br /&gt;
:The type of system call&lt;br /&gt;
&lt;br /&gt;
;success&lt;br /&gt;
:Whether the system call succeeded or failed&lt;br /&gt;
&lt;br /&gt;
;exit&lt;br /&gt;
:The exit value returned by a system call&lt;br /&gt;
&lt;br /&gt;
;a0 to a3&lt;br /&gt;
:First four arguments of the system call encoded in hexadecimal notation&lt;br /&gt;
&lt;br /&gt;
;items&lt;br /&gt;
:The number of strings passed to the application&lt;br /&gt;
&lt;br /&gt;
;ppid&lt;br /&gt;
:The parent process ID &lt;br /&gt;
&lt;br /&gt;
;pid&lt;br /&gt;
:The process ID&lt;br /&gt;
&lt;br /&gt;
;auid&lt;br /&gt;
:The audit ID which is given on user login. This means that even if the user changes his identity you can still trace actions to the original user who logged in&lt;br /&gt;
&lt;br /&gt;
;uid&lt;br /&gt;
:The user ID of the user who started the process&lt;br /&gt;
&lt;br /&gt;
;gid&lt;br /&gt;
:The group ID of the user&lt;br /&gt;
&lt;br /&gt;
;euid, suid, fsuid&lt;br /&gt;
:Effective user ID, set user ID and file system user ID&lt;br /&gt;
&lt;br /&gt;
;egid, sgid, fsgid&lt;br /&gt;
:Effective group ID, set group ID and file system group ID&lt;br /&gt;
&lt;br /&gt;
;tty&lt;br /&gt;
:Terminal from which the application is started&lt;br /&gt;
&lt;br /&gt;
;ses&lt;br /&gt;
:The login session ID&lt;br /&gt;
&lt;br /&gt;
;comm&lt;br /&gt;
:Command line name of the command that was used&lt;br /&gt;
&lt;br /&gt;
;exe&lt;br /&gt;
:The resolved pathname to the binary program&lt;br /&gt;
&lt;br /&gt;
;subj&lt;br /&gt;
:auditd records whether the process is subject to any security context&lt;br /&gt;
&lt;br /&gt;
;key&lt;br /&gt;
:Administrator-defined string associated with the rule that generated the event&lt;br /&gt;
&lt;br /&gt;
;item&lt;br /&gt;
:The item field indicates which item, of the total number of items referenced in the SYSCALL type record, the current record is&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Full path of the file or directory that was passed to the system call as an argument&lt;br /&gt;
&lt;br /&gt;
;inode&lt;br /&gt;
:Contains the inode number associated with the file or directory recorded in this event&lt;br /&gt;
&lt;br /&gt;
;dev&lt;br /&gt;
:Specifies device on which the file is stored&lt;br /&gt;
&lt;br /&gt;
;mode&lt;br /&gt;
:Numerical representation of the file&#039;s access permissions&lt;br /&gt;
&lt;br /&gt;
;ouid and ogid &lt;br /&gt;
:Object owner&#039;s user ID and group ID&lt;br /&gt;
&lt;br /&gt;
;rdev&lt;br /&gt;
:Contains a recorded device identifier for special files only&lt;br /&gt;
&lt;br /&gt;
;obj&lt;br /&gt;
:The obj field records the SELinux context with which the recorded file or directory was labeled at the time of execution&lt;br /&gt;
&lt;br /&gt;
This is just a subset of all the possible event fields. For a list of all fields see [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/app-Audit_Reference.html#sec-Audit_Events_Fields &amp;quot;Audit Event Fields&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
==Searching the Audit log files==&lt;br /&gt;
The &#039;&#039;&#039;ausearch&#039;&#039;&#039; utility allows to search Audit log files for specific events.&#039;&#039;&#039;Ausearch&#039;&#039;&#039; allows to search the audit logs using special keys and search phrases that relate to most of the flags that appear in event messages in &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039;.By default, &#039;&#039;&#039;ausearch&#039;&#039;&#039; searches the &#039;&#039;&#039;/var/log/audit/audit.log&#039;&#039;&#039; file. You can specify a different file using the &#039;&#039;&#039;ausearch &#039;&#039;options&#039;&#039; -if &#039;&#039;file_name&#039;&#039;&#039;&#039;&#039; command. We can search for events with multiple options&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sled11/book_security/data/sec_audit_ausearch.html Querying the Audit Daemon Logs with ausearch]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;Search by Audit Event ID&lt;br /&gt;
:An audit event ID is the second part of an audit message ID, which consists of a UNIX epoch time stamp and the audit event ID separated by a colon. All events that are logged from one application&#039;s system call have the same event ID. Use this event ID with ausearch to retrieve this event&#039;s trail from the log with &#039;&#039;&#039;ausearch -a &#039;&#039;event_ID&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Message Type&lt;br /&gt;
:To search for audit records of a particular message type, use the &#039;&#039;&#039;ausearch -m &#039;&#039;message_type&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Login ID&lt;br /&gt;
:To view records associated with a particular login user ID, use the &#039;&#039;&#039;ausearch -ul &#039;&#039;uid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by User ID&lt;br /&gt;
:View reports related to a particular user ID with ausearch -ui uid. Search for records related to a particular effective user ID, use the &#039;&#039;&#039;ausearch -ue &#039;&#039;euid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Group ID&lt;br /&gt;
:View reports related to a particular user ID with &#039;&#039;&#039;ausearch -gi &#039;&#039;gid&#039;&#039;&#039;&#039;&#039;. Search for records related to a particular effective group ID, use &#039;&#039;&#039;ausearch -ge &#039;&#039;egid&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;Search by Command Line Name&lt;br /&gt;
:View records related to a certain command, using the &#039;&#039;&#039;ausearch -c &#039;&#039;comm_name&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Executable Name&lt;br /&gt;
:View records related to a certain executable with the &#039;&#039;&#039;ausearch -x &#039;&#039;exe&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by System Call Name&lt;br /&gt;
:View records related to a certain system call with the &#039;&#039;&#039;ausearch -sc &#039;&#039;syscall&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Process ID&lt;br /&gt;
:View records related to a certain process ID with the &#039;&#039;&#039;ausearch -p &#039;&#039;pid&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Event or System Call Success Value&lt;br /&gt;
:View records containing a certain system call success value with &#039;&#039;&#039;ausearch -sv &#039;&#039;success_value&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Filename&lt;br /&gt;
:View records containing a certain filename with &#039;&#039;&#039;ausearch -f &#039;&#039;filename&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Terminal&lt;br /&gt;
:View records of events related to a certain terminal only with &#039;&#039;&#039;ausearch -tm &#039;&#039;term&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Hostname&lt;br /&gt;
:View records related to a certain remote hostname with &#039;&#039;&#039;ausearch -hn &#039;&#039;hostname&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Key Field&lt;br /&gt;
:View records that contain a certain key assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -k &#039;&#039;key_field&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Search by Word&lt;br /&gt;
:View records that contain a certain string assigned in the audit rule set to identify events of a particular type with &#039;&#039;&#039;ausearch -w &#039;&#039;word&#039;&#039;&#039;&#039;&#039; command&lt;br /&gt;
&lt;br /&gt;
;Limit a search to a Certain Time Frame&lt;br /&gt;
:Use &#039;&#039;&#039;-ts&#039;&#039;&#039; and &#039;&#039;&#039;-te&#039;&#039;&#039; to limit the scope of your searches to a certain time frame. The &#039;&#039;&#039;-ts&#039;&#039;&#039; option is used to specify the start date and time and the &#039;&#039;&#039;-te&#039;&#039;&#039; option is used to specify the end date and time&lt;br /&gt;
&lt;br /&gt;
==Creating Audit reports==&lt;br /&gt;
The &#039;&#039;&#039;aureport&#039;&#039;&#039; utility allows you to generate summary and columnar reports on the events recorded in Audit log files. To avoid having to read the raw audit log, it is possible to configure custom audit reports with &#039;&#039;&#039;aureport&#039;&#039;&#039; and run them regularly. Because the &#039;&#039;&#039;aureport&#039;&#039;&#039; commands are scriptable, you can easily create custom report scripts to run at certain intervals to gather the audit information. With &#039;&#039;&#039;aureport&#039;&#039;&#039; it is possible to generate various report types&amp;lt;ref&amp;gt;[https://www.suse.com/documentation/sles11/singlehtml/audit_quickstart/audit_quickstart.html#sec.audit.qs.logs 4. Generating Reports]&amp;lt;/ref&amp;gt;&amp;lt;ref name=suselog /&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;aureport --summary&lt;br /&gt;
:Run this report to get a rough overview of the current audit statistics (events, logins, processes, etc.). To get detailed information about any of the event categories listed, run individual reports for the event type.&lt;br /&gt;
&lt;br /&gt;
;aureport --success&lt;br /&gt;
:Run this report to get statistics of successful events on your system.To get detailed information for a particular event type, run the individual report adding the &#039;&#039;&#039;--success&#039;&#039;&#039; option to filter for successful events of this type.&lt;br /&gt;
&lt;br /&gt;
;aureport --failed&lt;br /&gt;
:Run this report to get statistics of failed events on your system.&lt;br /&gt;
&lt;br /&gt;
;aureport -l&lt;br /&gt;
:Run this command to generate a numbered list of all login-related events. The report includes date, time, audit ID, host and terminal used, as well as name of the executable, success or failure of the attempt, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -p&lt;br /&gt;
:Run this report to generate a numbered list of all process-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -f&lt;br /&gt;
:Run this report to generate a numbered list of all file-related events. This command generates a numbered list of all process events including date, time, process ID, name of the executable, system call, audit ID and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -u&lt;br /&gt;
:Run this report to find out which users are running what executables on your system. This command generates a numbered list of all user-related events including date, time, audit ID, terminal used, host, name of the executable, and an event ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -s&lt;br /&gt;
:This command generates a numbered list of all system call events including date, time, number of the system call, process ID, name of the command that used this call, audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
;aureport -e&lt;br /&gt;
:This command generates a numbered list of all events including date, time, event number, event type, and audit ID.&lt;br /&gt;
&lt;br /&gt;
;aureport -x&lt;br /&gt;
:This command generates a numbered list of all executable events including date, time, name of the executable, the terminal it is run in, the host executing it, the audit ID, and event number.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Nptskial</name></author>
	</entry>
</feed>