@poloz

4 Followers
71 Following
71 Posts

🇨🇵 Citoyen français et européen, animé par la volonté de rendre le monde meilleur et que les humaines puissent vivre heureux et libres.
Ingénieur de profession, dans l'administration de SI et dans les sujets de cybersecurité.

🇬🇧 A French and European citizen, driven by the desire to make the world a better place and for human beings to live happily and freely.
An engineer by profession, working in system administration and cybersecurity.

There's something oddly satisfying about building software from source.

#openSource #linux

Je viens de passer de #genkernel à #installkernel et #dracut sur mes #gentoo 🐧.
Il était temps vu que genkernel est déprécié 😅.
Le temps de construction de l'image initramfs n'a rien à voir, c'est quasi instantané ⚡ alors qu'avant il me fallait une trentaine de minutes 🐌.
Et en prime j'ai pu découvrir que make oldconfig était en fait interactif et me permet donc de choisir plus facilement les évolutions de configuration du #kernel #linux 🔥.
Je viens de découvrir les aventuriers du rail 🚂 #j2s
C'est très amusant ! Déjà deux parties et j'attends la prochaine 🎲
Je profite des informations du CIM, le journal de #cessonsevigne 📰 , pour mettre à jour OpenStreetMap #osm 🔄 😁
Et belles couleurs sur la ville de #Rennes #Bretagne
Ça va bientôt faire deux ans que je suis passé sur #Gentoo sur ma tour et je viens de convertir mon ordinateur portable 🐧. Je ne l'utilisais plus car il était encore sur Ubuntu 20.04 🙈 . Je suis content de retrouver mon système, j'ai l'impression d'être à la maison maintenant quand je suis dessus 😊

I'm reading that Microsoft has announced support for Windows 10 is already ending in only a couple more months, which is making people understandably angry and some may be interested to try out #Linux. This is great! Linux thrives with more users and a diversity of experiences! Unfortunately, fedi has a bad reputation for being... unhelpful when it comes to folks asking "basic" tech questions, especially about Linux.

I'm certainly not the most knowledgeable or experienced, so I can't promise to be able to help directly with many questions, but I *do* promise to be patient and understanding to anyone experiencing some difficulty migrating away from Windows. Linux has been my main driver for regular computing for several years now and I even switched over for gaming a couple years ago, so feel free to reach out!

Hoping folks can reach people actually willing to help with some hashtags:
#LinuxMigration #DigitalMigrant #EndOf10 #EndOf10Ambassador

New one

A grumpy ItSec guy walks through the office when he overhears an exchange of words.

Dev0: Hey, this isn't working, I hate containers...
Dev1: Maybe just add the --privileged flag!

ItSec: Just… no. Simply no. No privileged mode - the grumpy fellow interjects as he walks away.

Dev0: Jesus, fine - no privileged mode.
Dev1: Okay, but… why?

Here's why (one, simple example): 

Docker's --privileged flag lifts almost all restrictions from your container - exactly the opposite of --cap-drop=ALL. Let's demo the difference. 

1) Start two containers.

docker run -itd --privileged --name ubuntu-privileged ubuntu
docker run -itd --name ubuntu-unprivileged ubuntu

2) Inspect /dev in the unprivileged container.

docker exec -it ubuntu-unprivileged bash
ls /dev
exit

You'll only see a limited set of devices. No disk access. 

3) Now inspect /dev in the privileged container.

docker exec -it ubuntu-privileged bash
ls /dev

/dev/sda exposed! Sometimes you may see /dev/mapper when LVM is in place. Then "apt update && apt install -y lvm2" and "lvscan" may help during next phase.

4) Exploitation part (inside the privileged container) - simply mount /dev/sda to any writable path in container.

mkdir /tmp/whatever
mount /dev/sda1 /tmp/whatever

5) You can now enumerate - and access - the Docker host's logical volume.

ls -la /tmp/whatever

6) If you wish, you can even chroot into the host:

chroot /tmp/whatever /bin/bash

The moral of the story is to avoid privileged mode, because in the event of an incident (e.g. an attacker compromising an app running inside a container), you significantly increase the likelihood of successful lateral movement from the container to the Docker host - and from there into the rest of your infrastructure.

Usually the grumpy guy means well. He just doesn't know how to explain it properly.

#devops #programming #webdev #java #linux #cybersecurity #php #nodejs