<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Cybers%C3%A9curit%C3%A9_%3A_Lynis</id>
	<title>Cybersécurité : Lynis - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.squi.fr/index.php?action=history&amp;feed=atom&amp;title=Cybers%C3%A9curit%C3%A9_%3A_Lynis"/>
	<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cybers%C3%A9curit%C3%A9_:_Lynis&amp;action=history"/>
	<updated>2026-06-12T02:39:38Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Cybers%C3%A9curit%C3%A9_:_Lynis&amp;diff=2204&amp;oldid=prev</id>
		<title>Justine le 22 juin 2022 à 12:00</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cybers%C3%A9curit%C3%A9_:_Lynis&amp;diff=2204&amp;oldid=prev"/>
		<updated>2022-06-22T12:00:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 22 juin 2022 à 12:00&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:securite]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Présentation =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Présentation =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-mediawiki:diff:1.41:old-859:rev-2204:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
	<entry>
		<id>https://wiki.squi.fr/index.php?title=Cybers%C3%A9curit%C3%A9_:_Lynis&amp;diff=859&amp;oldid=prev</id>
		<title>Justine : Page créée avec «  = Présentation =  Lynis est un outil d&#039;audit système sous Unix/Linux. Il scanne le système à la recherche d&#039;informations sur la sécurité, d&#039;informations générales... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.squi.fr/index.php?title=Cybers%C3%A9curit%C3%A9_:_Lynis&amp;diff=859&amp;oldid=prev"/>
		<updated>2019-04-07T10:56:28Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec «  = Présentation =  Lynis est un outil d&amp;#039;audit système sous Unix/Linux. Il scanne le système à la recherche d&amp;#039;informations sur la sécurité, d&amp;#039;informations générales... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
= Présentation =&lt;br /&gt;
&lt;br /&gt;
Lynis est un outil d&amp;#039;audit système sous Unix/Linux. Il scanne le système à la recherche d&amp;#039;informations sur la sécurité, d&amp;#039;informations générales, il cherche les logiciels installés, les configurations, les problèmes de sécurités, etc... Il est très utilisé pour les audits de sécurité.&lt;br /&gt;
&lt;br /&gt;
J&amp;#039;utilise la version 2.7.3, dernière en date lors de l&amp;#039;écriture de cet article (avril 2019).&lt;br /&gt;
&lt;br /&gt;
= Mise en place =&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Lynis n&amp;#039;as pas besoin d&amp;#039;une installation. On peut lui faire un dossier dans /usr/local/lynis. On va ensuite le télécharger avec wget et le décompresser.&lt;br /&gt;
&amp;lt;pre&amp;gt;root@Justine-pc:~# mkdir /usr/local/lynis&lt;br /&gt;
root@Justine-pc:~# cd /usr/local/lynis&lt;br /&gt;
root@Justine-pc:/usr/local/lynis# wget https://downloads.cisofy.com/lynis/lynis-2.7.3.tar.gz&lt;br /&gt;
--2019-04-07 12:28:44--  https://downloads.cisofy.com/lynis/lynis-2.7.3.tar.gz&lt;br /&gt;
Résolution de downloads.cisofy.com (downloads.cisofy.com)… 2a01:7c8:aac2:37b::1, 37.97.194.171&lt;br /&gt;
Connexion à downloads.cisofy.com (downloads.cisofy.com)|2a01:7c8:aac2:37b::1|:443… connecté.&lt;br /&gt;
requête HTTP transmise, en attente de la réponse… 200 OK&lt;br /&gt;
Taille : 282609 (276K) [application/octet-stream]&lt;br /&gt;
Enregistre : «lynis-2.7.3.tar.gz»&lt;br /&gt;
&lt;br /&gt;
lynis-2.7.3.tar.g 100%[==========&amp;gt;] 275,99K  1,37MB/s    ds 0,2s    &lt;br /&gt;
&lt;br /&gt;
2019-04-07 12:28:44 (1,37 MB/s) - «lynis-2.7.3.tar.gz» enregistré [282609/282609]&lt;br /&gt;
&lt;br /&gt;
root@Justine-pc:/usr/local/lynis# tar -xvf lynis-2.7.3.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Les bases de l&amp;#039;utilisation ==&lt;br /&gt;
&lt;br /&gt;
Il faut être root pour utiliser Lynis, car celui-ci écrit vers /var/log/lynis.log. On va d&amp;#039;abord le lancer sans arguments pour voir son aide :&lt;br /&gt;
&amp;lt;pre&amp;gt;root@Justine-pc:/usr/local/lynis# cd lynis&lt;br /&gt;
root@Justine-pc:/usr/local/lynis/lynis# ./lynis&lt;br /&gt;
&lt;br /&gt;
[ Lynis 2.7.3 ]&lt;br /&gt;
&lt;br /&gt;
################################################################################&lt;br /&gt;
  Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are&lt;br /&gt;
  welcome to redistribute it under the terms of the GNU General Public License.&lt;br /&gt;
  See the LICENSE file for details about using this software.&lt;br /&gt;
&lt;br /&gt;
  2007-2019, CISOfy - https://cisofy.com/lynis/&lt;br /&gt;
  Enterprise support available (compliance, plugins, interface and tools)&lt;br /&gt;
################################################################################&lt;br /&gt;
&lt;br /&gt;
[+] Initializing program&lt;br /&gt;
------------------------------------&lt;br /&gt;
&lt;br /&gt;
  Usage: lynis command [options]&lt;br /&gt;
&lt;br /&gt;
  Command:&lt;br /&gt;
&lt;br /&gt;
    audit&lt;br /&gt;
        audit system                  : Perform local security scan&lt;br /&gt;
        audit system remote &amp;lt;host&amp;gt;    : Remote security scan&lt;br /&gt;
        audit dockerfile &amp;lt;file&amp;gt;       : Analyze Dockerfile&lt;br /&gt;
&lt;br /&gt;
    show&lt;br /&gt;
        show                          : Show all commands&lt;br /&gt;
        show version                  : Show Lynis version&lt;br /&gt;
        show help                     : Show help&lt;br /&gt;
&lt;br /&gt;
    update&lt;br /&gt;
        update info                   : Show update details&lt;br /&gt;
&lt;br /&gt;
  Options:&lt;br /&gt;
&lt;br /&gt;
    --no-log                          : Don&amp;#039;t create a log file&lt;br /&gt;
    --pentest                         : Non-privileged scan (useful for pentest)&lt;br /&gt;
    --profile &amp;lt;profile&amp;gt;               : Scan the system with the given profile file&lt;br /&gt;
    --quick (-Q)                      : Quick mode, don&amp;#039;t wait for user input&lt;br /&gt;
&lt;br /&gt;
    Layout options&lt;br /&gt;
    --no-colors                       : Don&amp;#039;t use colors in output&lt;br /&gt;
    --quiet (-q)                      : No output&lt;br /&gt;
    --reverse-colors                  : Optimize color display for light backgrounds&lt;br /&gt;
&lt;br /&gt;
    Misc options&lt;br /&gt;
    --debug                           : Debug logging to screen&lt;br /&gt;
    --view-manpage (--man)            : View man page&lt;br /&gt;
    --verbose                         : Show more details on screen&lt;br /&gt;
    --version (-V)                    : Display version number and quit&lt;br /&gt;
&lt;br /&gt;
    Enterprise options&lt;br /&gt;
    --plugindir &amp;lt;path&amp;gt;                : Define path of available plugins&lt;br /&gt;
    --upload                          : Upload data to central node&lt;br /&gt;
&lt;br /&gt;
    More options available. Run &amp;#039;./lynis show options&amp;#039;, or use the man page.&lt;br /&gt;
&lt;br /&gt;
  No command provided. Exiting..&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lynis se lance donc comme n&amp;#039;importe quel script. Diverses options sont disponibles, visibles avec --check-options :&lt;br /&gt;
&amp;lt;pre&amp;gt;    audit&lt;br /&gt;
        audit system                  : Perform local security scan&lt;br /&gt;
        audit system remote &amp;lt;host&amp;gt;    : Remote security scan&lt;br /&gt;
        audit dockerfile &amp;lt;file&amp;gt;       : Analyze Dockerfile&lt;br /&gt;
&lt;br /&gt;
    show&lt;br /&gt;
        show                          : Show all commands&lt;br /&gt;
        show version                  : Show Lynis version&lt;br /&gt;
        show help                     : Show help&lt;br /&gt;
&lt;br /&gt;
    update&lt;br /&gt;
        update info                   : Show update details&lt;br /&gt;
&lt;br /&gt;
  Options:&lt;br /&gt;
&lt;br /&gt;
    --no-log                          : Don&amp;#039;t create a log file&lt;br /&gt;
    --pentest                         : Non-privileged scan (useful for pentest)&lt;br /&gt;
    --profile &amp;lt;profile&amp;gt;               : Scan the system with the given profile file&lt;br /&gt;
    --quick (-Q)                      : Quick mode, don&amp;#039;t wait for user input&lt;br /&gt;
&lt;br /&gt;
    Layout options&lt;br /&gt;
    --no-colors                       : Don&amp;#039;t use colors in output&lt;br /&gt;
    --quiet (-q)                      : No output&lt;br /&gt;
    --reverse-colors                  : Optimize color display for light backgrounds&lt;br /&gt;
&lt;br /&gt;
    Misc options&lt;br /&gt;
    --debug                           : Debug logging to screen&lt;br /&gt;
    --view-manpage (--man)            : View man page&lt;br /&gt;
    --verbose                         : Show more details on screen&lt;br /&gt;
    --version (-V)                    : Display version number and quit&lt;br /&gt;
&lt;br /&gt;
    Enterprise options&lt;br /&gt;
    --plugindir &amp;lt;path&amp;gt;                : Define path of available plugins&lt;br /&gt;
    --upload                          : Upload data to central node&lt;br /&gt;
&lt;br /&gt;
    More options available. Run &amp;#039;./lynis show options&amp;#039;, or use the man page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
root@Justine-pc:/usr/local/lynis/lynis# ./lynis show options&lt;br /&gt;
--auditor&lt;br /&gt;
--cronjob (--cron)&lt;br /&gt;
--debug&lt;br /&gt;
--developer&lt;br /&gt;
--help (-h)&lt;br /&gt;
--license-key&lt;br /&gt;
--log-file&lt;br /&gt;
--manpage (--man)&lt;br /&gt;
--no-colors&lt;br /&gt;
--no-log&lt;br /&gt;
--pentest&lt;br /&gt;
--profile&lt;br /&gt;
--plugin-dir&lt;br /&gt;
--quick (-Q)&lt;br /&gt;
--quiet (-q)&lt;br /&gt;
--report-file&lt;br /&gt;
--reverse-colors&lt;br /&gt;
--skip-plugins&lt;br /&gt;
--tests&lt;br /&gt;
--tests-from-category&lt;br /&gt;
--tests-from-group&lt;br /&gt;
--upload&lt;br /&gt;
--verbose&lt;br /&gt;
--version (-V)&lt;br /&gt;
--wait&lt;br /&gt;
--warnings-only&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scanner notre système ==&lt;br /&gt;
&lt;br /&gt;
Pour scanner notre système, nous allons utiliser la commande suivante :&lt;br /&gt;
&amp;lt;pre&amp;gt;./lynis audit system&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lynis commence par nous donner quelques informations généralistes sur le système, puis il scanne diverses choses classées en catégories, et affiche ses résultats selon le code-couleur que l&amp;#039;on connaît déjà en matière de supervision (Vert = OK, Jaune = Attention, rouge = danger).&lt;br /&gt;
&lt;br /&gt;
[[File:Lynis1.png]]&lt;br /&gt;
&lt;br /&gt;
Un scan de mon système sous Ubuntu 18.10 révèle dores et déjà quelques faiblesses !&lt;br /&gt;
&lt;br /&gt;
Cet affichage est utile, et plus de détails sont disponibles dans les fichiers de logs :&lt;br /&gt;
&lt;br /&gt;
*/var/log/lynis.log : donne le détail des scans &lt;br /&gt;
*/var/log/lynis-report.dat donne des informations sur le fonctionnement interne de Lynis. &lt;br /&gt;
&lt;br /&gt;
Dans le fichier lynis.log, celui-ci nous donne, en plus du détail de ses activités, des suggestions :&lt;br /&gt;
&amp;lt;pre&amp;gt;019-04-07 12:39:37 Result: file /boot/grub/grub.cfg is readable (or directory accessible).&lt;br /&gt;
2019-04-07 12:39:37 Result: Didn&amp;#039;t find hashed password line in GRUB boot file!&lt;br /&gt;
2019-04-07 12:39:37 Suggestion: Set a password on GRUB bootloader to prevent altering boot configuration (e.g. boot in single user mode without password) [test:BOOT-5122] [details:-] [solution:-]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mettre Lynis à jour ==&lt;br /&gt;
&lt;br /&gt;
La mise à jour de Lynis, installé de cette façon, ne peut se faire qu&amp;#039;en changeant l&amp;#039;exécutable; l&amp;#039;usage de la commande lynis update release est déprécié !&lt;br /&gt;
&lt;br /&gt;
On peut connaître la version actuelle de Lynis grâce à la commande suivante :&lt;br /&gt;
&amp;lt;pre&amp;gt;root@Justine-pc:/usr/local/lynis/lynis# ./lynis update info&lt;br /&gt;
&lt;br /&gt;
 == Lynis ==&lt;br /&gt;
&lt;br /&gt;
  Version            : 2.7.3&lt;br /&gt;
  Status             : Up-to-date&lt;br /&gt;
  Release date       : 2019-03-21&lt;br /&gt;
  Update location    : https://cisofy.com/lynis/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lynis est aussi disponible via les dépôts, mais le version la plus récente disponible sur ceux-ci (chez Ubuntu) est actuellement la 2.6.2.&lt;br /&gt;
&lt;br /&gt;
== Au quotidien ==&lt;br /&gt;
&lt;br /&gt;
Il peut être intéressant de lancer Lynis via des cronjobs. Un exemple :&lt;br /&gt;
&amp;lt;pre&amp;gt;30    22    *    *    *    root    /path/to/lynis -c -Q --auditor &amp;quot;automated&amp;quot; --cronjob&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ici, lynis sera lancé à 22h30, avec l&amp;#039;identité d&amp;#039;auditeur (le champ représentant la personne en train de lancer le scan) &amp;quot;automated&amp;quot;. Le -c correspond à &amp;quot;check&amp;quot;, soit uns can du système; le Q correspond à &amp;quot;quick&amp;quot;, ce qui permet d&amp;#039;éviter que Lynis ne demande des inputs de la aprt de l&amp;#039;utilisateur.&lt;br /&gt;
&lt;br /&gt;
= En conclusion =&lt;br /&gt;
&lt;br /&gt;
Lynis est un outil puissant, facile à déployer. Il peut être utile de le lancer au quotidien et de le coupler à un outil d&amp;#039;analyse des logs. Cependant, il faut rester prudent : ce n&amp;#039;est pas parce que tout est [OK] que le système est parfaitement sécurisé ! Le plus utile reste de regarder les logs pour comprendre les retours que nous donne le programme.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Justine</name></author>
	</entry>
</feed>