Block entire countries on Ubuntu server with Xtables and GeoIP

10/12/2023 Categories: Réseau, Sécurité Tags: , , , Comments off

Source: jeshurun.ca

Anyone who has administered even a moderately high traffic server will have noticed that certain unwelcome traffic such as port scans and probes tend to come from IP addresses belonging to a certain group of countries. If your application or service does not cater to users in these countries, it might be a safe bet to block these countries off entirely.

This is especially true for email servers. The average email server, based on anecdotal evidence of servers for around 20 domains, rejects about 30% of incoming email every day as spam. Some servers on some days reject up to as much as 97% of incoming email as spam. Most of these originate in a certain subset of countries. That is a lot of wasted CPU cycles being expended on scanning these undesired emails for spam and viruses. Although tools such as amavisd and spamassasin do a good job of keeping the vast majority of spam out of users’ inboxes, when the rare well crafted and targeted phishing email does get through, it wrecks havoc in the enterprise.

Lire la suite…

The role of shells in the Linux environment

10/12/2023 Categories: Système Tags: , , Comments off

Shell is used for various purposes under Linux. Linux user environment is made of the following components:

  • Kernel – The core of Linux operating system.
  • Shell – Provides an interface between the user and the kernel.
  • Terminal emulator – The xterm program is a terminal emulator for the X Window System. It allows user to enter commands and display back their results on screen. 
  • Linux Desktop and Windows Manager – Linux desktop is collection of various software apps. It includes the file manger, the windows manager, the Terminal emulator and much more. KDE and Gnome are two examples of the complete desktop environment in Linux.

Login

User can login locally into the console when in runlevel # 3 or graphically when in runlevel # 5 (the level numbers may differ depending on the distribution). In both cases you need to provide username and password. Bash uses the following initialization and start-up files:

  1. /etc/profile – The systemwide initialization file, executed for login shells.
  2. /etc/bash.bashrc – The systemwide per-interactive-shell startup file. This is a non-standard file which may not exist on your distribution. Even if it exists, it will not be sourced unless it is done explicitly in another start-up file.
  3. /etc/bash.logout – The systemwide login shell cleanup file, executed when a login shell exits.
  4. $HOME/.bash_profile – The personal initialization file, executed for login shells.
  5. $HOME/.bashrc – The individual per-interactive-shell startup file.
  6. $HOME/.bash_logout – The individual login shell cleanup file, executed when a login shell exits.
  7. $HOME/.inputrc – Individual readline initialization file.

Bash Startup Scripts

Script of commands executed at login to set up environment. For example, setup JAVA_HOME path.

Login Shell

Login shells are first shell started when you log in to the system. Login shells set environment which is exported to non-login shells. Login shell calls the following when a user logs in:

Non-Login Shell

Bash Logout Scripts

  • When a login shell exits, bash reads and executes commands from the file $HOME/.bash_logout, if it exists.

Source: Cybercitiz

Categories: Système Tags: , ,

Detect Webcam & Microphone Activity on Mac with Oversight

09/12/2023 Categories: Sécurité, Système Tags: , , Comments off

Source: osxdaily.com

Though Mac users don’t usually have to worry excessively about “camfecting” malware and spyware, some security conscious users may find it nice to know if a process or application is attempting to access their computers web camera or microphone. 

 

With the help of a free third party security utility called Oversight, you can have your Mac alert you anytime an application or process tries to activate either recording device on the computer. 

The developer of Oversight explains why a tool like Oversight could be valuable to some users:

“One of the most insidious actions of malware, is abusing the audio and video capabilities of an infected host to record an unknowing user. Macs, of course, are not immune; malware such as OSX/Eleanor, OSX/Crisis, OSX/Mokes, and others, all attempt to spy on OS X users. OverSight constantly monitors a system, alerting a user whenever the internal microphone is activated, or the built-in webcam is accessed. And yes, while the webcam’s LED will turn on whenever a session is initially started, new research has shown that malware can surreptitious piggyback into such existing sessions (FaceTime, Sykpe, Google Hangouts, etc.) and record both audio and video – without fear of detection.” 

Sound good? If so, it’s a free download that is easy to install on a Mac with either macOS or Mac OS X:

If you’re interested in this app, simply download Oversight and run the installer (it can be just as easily uninstalled later if you decide you do not need it).

Once installed, Oversight is small and lightweight running quietly in the background, and it will alert you anytime the Mac microphone or webcam FaceTime camera are attempting to be activated. You can then directly intervene and either allow the webcam or microphone access (for legitimate use), or deny it (for theoretical illegitimate use).

Oversight alerting to camera and microphone access on Mac

Keep in mind that Oversight does not differentiate between legitimate and illegitimate use of the webcam and microphone on your Mac, that is up to you. For example, you will get a notification alert that the microphone and FaceTime camera are trying to be accessed when you open an app like Skype, Photo Booth, FaceTime, or are recording a video on your Mac with the webcam, but since those applications legitimately use the computers microphone and camera they are probably nothing to be concerned about (assuming you have launched them yourself anyway). On the other hand, if out of the blue and with no provocation if you see a process has attempted to access your microphone, that could potentially be an unauthorized attempt to use the microphone and you could choose to reject it and block the device access with Oversight. Whenever possible, Oversight will attempt to notify you of the process name and PID, but sometimes you will see blank notifications of access anyway – again just think about what apps you are using and if they have any reason to use your camera or microphone, similar to how you can control this type of access in iOS for Photos, camera, and microphone. 

Microphone activated found by Oversight on Mac

This is a software solution which is quite a bit more fancy than the low-tech solution of putting tape on your web camera like the FBI Director does and many security professionals do. You could always use Oversight along with some tape too if you’re extra concerned about your Mac webcam or microphone access and want to be sure nothing fishy is going on from camfecting or otherwise. 

While apps like Oversight could be considered overboard and unnecessary for many Mac users, others who are privacy conscious or in fields where higher security matters may find them to be helpful. I’ve personally noticed a particular web browser will occasionally attempt to access the microphone on my Mac from time to time without an obvious reason which I find to be… curious… and Oversight notified me each time. It’s not for everyone, but if you want to be notified when something is trying to use your Mac camera or microphone, check out the app yourself. 

Alimentation laboratoire 0-30v/0-10A Velleman-kit K7200

28/08/2022 Categories: Bricolage, Électronique Tags: , , Comments off

Alimentation de laboratoire Velleman 7200Une alimentation de laboratoire est un appareil indispensable pour un radioamateur, qu’il soit professionnel ou amateur. Cette alimentation est protégée contre les courts-circuits et se règle graduellement de 0 à 30 V et de 0 à 10 A.

DONNÉES TECHNIQUES

  • Tension de sortie réglable graduellement de 0 à 30 V.
  • Réglage fin au-delà de 1 V.
  • Limitation de courant de sortie réglable graduellement de 0 à 10 A.
  • Réglage fin entre 0 et 1 A.
  • Indication LED de la limitation de courant.
  • Courant de sortie: 8 A courant continu / 10 A courant de pointe.
  • Protégé contre les courts-circuits.
  • Pulsation maximale: 0.5 mV RMS.
  • Consommation: max. 300 W

Lire la suite…

Disjoncteur

20/08/2022 Categories: Bricolage, Matériel Tags: , , Comments off

Un disjoncteur est un dispositif électromécanique, voire électronique, de protection dont la fonction est d’interrompre le courant électrique en cas d’incident sur un circuit électrique. Il est capable d’interrompre un courant de surcharge ou un courant de court-circuit dans une installation. Suivant sa conception, il peut surveiller un ou plusieurs paramètres d’une ligne électrique. Sa principale caractéristique par rapport au fusible est qu’il est réarmable (il est prévu pour ne subir aucune avarie lors de son fonctionnement).

Différentes techniques utilisées par les disjoncteurs

Thermique

Ce type de disjoncteur se déclenche quand un courant excessif traverse un bilame, créant un échauffement par effet Joule et provoquant sa déformation. Ce bilame déclenche mécaniquement un contact, qui ouvre le circuit électrique protégé. Ce système électromécanique est assez simple et robuste mais n’est pas très précis et son temps de réaction est relativement lent. Il permet donc d’éviter de mettre le circuit en surintensité prolongée. La protection thermique a pour principale fonction la protection des conducteurs contre les échauffements excessifs pouvant générer des risques d’incendies, dus aux surcharges prolongées de l’installation électrique.

Il remplit la même fonction qu’un fusible, lequel doit être remplacé après avoir coupé le courant.

Magnétique

La forte variation d’intensité passe au travers des spires d’une bobine (repère 7 sur la photographie « Éclaté d’un disjoncteur »). Elle produit, selon les règles de l’électromagnétisme, une forte variation du champ magnétique. Le champ ainsi créé déclenche le déplacement d’un noyau de fer doux qui va mécaniquement ouvrir le circuit et ainsi protéger la source et une partie de l’installation électrique, notamment les conducteurs électriques entre la source et le court-circuit.

L’interruption est « instantanée » dans le cas d’une bobine rapide ou « contrôlée » par un fluide dans la bobine qui permet des déclenchements retardés. Il est généralement associé à un interrupteur de très haute qualité qui autorise des milliers de manœuvres.

  • Ce fonctionnement peut remplacer le fusible sur les courts-circuits.
  • Suivant le type de disjoncteur, la valeur d’intensité de consigne va de 3 à 15 fois l’intensité nominale (pour les modèles courants).
  • De nombreuses autres possibilités existent, déclenchement par bobine tension (consigne provenant de capteurs), interrupteur/disjoncteur pour montage face avant, compatible bitension 100/220 volts, bobine sous voltage (disjoncteur maintenu à partir d’une consigne tension), déclenchement à distance, réarmement à distance.
  • Nombreuses courbes de déclenchement pour CC, CA 50/60 Hz et 400 Hz.
  • Une option étanche est généralement disponible, soit version face avant étanche, soit entièrement (IP67).

C’est la fonction remplie par un fusible aM (accompagnement moteurs). Pour démarrer, un moteur demande, pendant quelques instants, une brève surintensité pouvant aller jusqu’à dix fois son intensité normale de fonctionnement. Cette surintensité, normale, ne doit toutefois pas déclencher le dispositif de protection. Ainsi, les fusibles de type aM sont conçus pour pouvoir absorber pendant un court instant un pic d’intensité supérieur à la valeur de protection. En revanche, en cas de surintensité (d’une valeur inférieure mais plus longue) : le dispositif coupera logiquement l’alimentation électrique.

La protection magnétique a pour principale fonction la protection des équipements contre les défauts (surcharge de l’équipement, court-circuit, panne…). Il est choisi par l’ingénieur qui a le souci de protéger son équipement avec une très grande précision.

Lire la suite…