Table des matières
- 2026:
- 2025:
1 billet(s) pour avril 2026
| Notes ping ICMP | 2026/04/03 23:01 | Jean-Baptiste |
Notes auditd
Voir :
Install
apt-get install auditd audispd-plugins
Autres - Kernel
audit_backlog_limit=8192 audit=1
Define Session Audit Rules To audit session creation and termination: /etc/audit/rules.d/audit.rules
-w /var/log/audit/audit.log -p wa -k session
To monitor user logins and logouts, you can add:
-a always,exit -F arch=b64 -S execve -k session -a always,exit -F arch=b32 -S execve -k session
Load the New Rules
sudo auditctl -R /etc/audit/rules.d/audit.rules
Verif
sudo auditctl -l
Autres
Auditd: Monitor logind events with auditd to detect suspicious activity. Example rule:
auditctl -w /run/logind -p wa -k logind_activity
Notes atop
Voir aussi :
- notes sysstat / sar
- systemd-cgtop
- tload (procps)
- btop
- powertop
- Réseau : vnstat, iptraf-ng, nethogs, nload, bwm-ng
Source http://ghichepcanhan.com/2014/05/03/linux-basics-monitor-system-resources-and-processes-using-atop/
atop -r -b 12:00 atop -r 20160712 -b 20:30 atopsar -A -b 13:00 -e 13:35
Hier (Yesterday)
atop -r y
Avant-hier
atop -r yy
Fichier texte avec conso CPU et commandes lancées
atop -r 20240209 -c -b 10:00 -e 10:10 | tee cpu.log
Configuration
Atop enregistre la table des process par défaut toutes les 10 minutes.
/etc/atop/atop.daily
#INTERVAL=600 # interval 10 minutes INTERVAL=60
A ne pas confondre avec intervalle défini pour le mode interactif, qui est de 10 seconds par défaut. Il est possible de le changer en créer un fichier atoprc.
/etc/atoprc
interval 5
Installation à partir des sources avec Netatop
Installation des dépendances pour Atop
sudo apt-get build-dep atop sudo apt-get install linux-headers-amd64
Dépendance pour Netatop :
apt-get install zlib1g-dev
wget http://www.atoptool.nl/download/atop-2.2-3.tar.gz tar xzvf atop-2.2-3.tar.gz cd atop-2.2-3/ ''make systemdinstall'' ou ''make sysvinstall''
wget http://www.atoptool.nl/download/netatop-0.6.tar.gz tar xzvf netatop-0.6.tar.gz cd netatop-0.6/ make make install service netatop start
Si Init
update-rc.d netatop defaults
Si SystemD
systemctl enable netatop
Netatop sert pour monitorer la bande passante. Nous tester
atop
Puis n comme network.
Utilisation
m : memory
a : All process / Only active process U apache : Utilisateur apache uniquement u : Conso par utilisateur(s)
Autre outil monitoring
systemd-cgtop
Notes ASM Assembleur
Désassembler
Source : https://fr.wikipedia.org/wiki/Portable_Executable
Les outils
- Module pefile.py
- Module Pydasm.py
- Immunity Debugger
- PEiD - Analyse des Packers
- LordPE - Éditeur de Fichier PE
- W32Dasm - Désassembleur [archive]
- OllyDbg - Débogueur pour Windows
- ImpRec - Outil de Reconstruction d'IAT
- ResHacker - Éditeur de Ressource
- WinHex - Éditeur Hexadécimal
- PeStudio - Analyse de nombreuses structures PE d'une application
Arrêt shutdown SSH éviter l'extinction ou le redémarrage accidentel d un serveur grâce à molly-guard
apt-get install molly-guard
AAP managed hosts Python requirements
Managed node requirements
Source : https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
The managed node (the machine that Ansible is managing) does not require Ansible to be installed, but requires Python 2.7, or Python 3.5 - 3.11 to run Ansible-generated Python code
RHEL 6 utilizes Python 2.6
Source : https://access.redhat.com/articles/6977724
RHEL 6 utilizes Python 2.6, and with the release of Ansible Core 2.13, managed nodes running Python 2.6 are no longer supported
Frequently asked questions
Question: RHEL 6 and RHEL 7 include newer versions of Python in the Software Collections repositories, can I install a newer version of Python so that newer versions of Ansible Core will still support these RHEL releases? This will not work, as the Python bindings for items such as yum are contained within the yum package, and the bindings are only included for the version of Python shipped with the respective RHEL release (Python 2.6 for RHEL 6, Python 2.7 for RHEL 7).
Question: I have RHEL 6 systems I need to manage with Ansible – what options do I have? Ansible Core 2.13, planned to be included with RHEL 8.7 and 9.1, is planned to remove support for RHEL 6 clients. For the RHEL System Roles use case, one option would be to use Ansible Engine 2.9 on a RHEL 7 or RHEL 8 control node. Ansible Engine 2.9, for the RHEL System Roles use case follows the life cycle dates of Ansible Automation Platform version 1.2 as specified on the Red Hat Ansible Automation Platform Life Cycle page.
Adding Python 2.7 to RHEL6
Source : https://access.redhat.com/solutions/92933
Python 2.7 (and Python 3.3) is available through the Red Hat offering called Red Hat Software Collections (RHSCL).
Once the RHSCL repository is added to the system's repositories, then Python 2.7 can be installed with yum such as: Raw yum install python27-python
Install Python 2.7 with Software Collections
Source : https://docs.datastax.com/en/jdk-install/doc/jdk-install/installPython27RHEL.html
Not supported
Verify your Python version:
python -V
If Python is not version 2.7.x, install it from the Software Collections ( SCL ) Repository:
sudo yum update sudo yum install scl-utils sudo yum install centos-release-scl-rh sudo yum install python27 sudo scl enable python27 bash
Verify the update:
$ python -V Python 2.7.8
After logging out or restarting, you must enable python 2.7:
sudo scl enable python27 bash
Compiler Python
Utiliser un Execution Environment avec un Ansible Engine en 2.9
Une autre façon est d’utiliser un Exécution Environment avec un Ansible Engine en 2.9.
Par exemple : « Automation Hub Ansible Engine 2.9 execution environment », parce que Ansible 2.9 support RH6.
Avec cette approche il n’est pas nécessaire de modifier les cibles. Par contre il sera probablement nécessaire de faire évoluer l’Execution Envionment.
