hacktricks/cryptography/crypto-ctfs-tricks.md

239 lines
10 KiB
Markdown
Raw Normal View History

2023-06-03 01:46:23 +00:00
# Trucos de Crypto CTFs
2022-04-28 16:01:33 +00:00
<details>
2023-04-25 18:35:28 +00:00
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- ¿Trabajas en una **empresa de ciberseguridad**? ¿Quieres ver tu **empresa anunciada en HackTricks**? ¿O quieres tener acceso a la **última versión de PEASS o descargar HackTricks en PDF**? ¡Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- Descubre [**The PEASS Family**](https://opensea.io/collection/the-peass-family), nuestra colección de exclusivos [**NFTs**](https://opensea.io/collection/the-peass-family)
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- Obtén el [**oficial PEASS & HackTricks swag**](https://peass.creator-spring.com)
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- **Únete al** [**💬**](https://emojipedia.org/speech-balloon/) [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **sígueme** en **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- **Comparte tus trucos de hacking enviando PR al [repositorio de hacktricks](https://github.com/carlospolop/hacktricks) y al [repositorio de hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
2022-04-28 16:01:33 +00:00
</details>
2023-06-03 01:46:23 +00:00
## Bases de datos de Hashes en línea
2023-06-03 01:46:23 +00:00
* _**Búscalo en Google**_
* [http://hashtoolkit.com/reverse-hash?hash=4d186321c1a7f0f354b297e8914ab240](http://hashtoolkit.com/reverse-hash?hash=4d186321c1a7f0f354b297e8914ab240)
* [https://www.onlinehashcrack.com/](https://www.onlinehashcrack.com)
* [https://crackstation.net/](https://crackstation.net)
* [https://md5decrypt.net/](https://md5decrypt.net)
* [https://www.onlinehashcrack.com](https://www.onlinehashcrack.com)
* [https://gpuhash.me/](https://gpuhash.me)
* [https://hashes.org/search.php](https://hashes.org/search.php)
* [https://www.cmd5.org/](https://www.cmd5.org)
* [https://hashkiller.co.uk/Cracker/MD5](https://hashkiller.co.uk/Cracker/MD5)
* [https://www.md5online.org/md5-decrypt.html](https://www.md5online.org/md5-decrypt.html)
2021-09-22 10:45:02 +00:00
2023-06-03 01:46:23 +00:00
## Autosolvers mágicos
2021-09-22 10:45:02 +00:00
2022-04-05 22:24:52 +00:00
* [**https://github.com/Ciphey/Ciphey**](https://github.com/Ciphey/Ciphey)
2023-06-03 01:46:23 +00:00
* [https://gchq.github.io/CyberChef/](https://gchq.github.io/CyberChef/) (Módulo mágico)
2022-04-05 22:24:52 +00:00
* [https://github.com/dhondta/python-codext](https://github.com/dhondta/python-codext)
2022-07-05 17:49:17 +00:00
* [https://www.boxentriq.com/code-breaking](https://www.boxentriq.com/code-breaking)
2023-06-03 01:46:23 +00:00
## Codificadores
2023-06-03 01:46:23 +00:00
La mayoría de los datos codificados se pueden decodificar con estos 2 recursos:
* [https://www.dcode.fr/tools-list](https://www.dcode.fr/tools-list)
* [https://gchq.github.io/CyberChef/](https://gchq.github.io/CyberChef/)
2023-06-03 01:46:23 +00:00
### Autosolvers de sustitución
* [https://www.boxentriq.com/code-breaking/cryptogram](https://www.boxentriq.com/code-breaking/cryptogram)
2023-06-03 01:46:23 +00:00
* [https://quipqiup.com/](https://quipqiup.com) - ¡Muy bueno!
2023-06-03 01:46:23 +00:00
#### Autosolvers de Caesar - ROTx
* [https://www.nayuki.io/page/automatic-caesar-cipher-breaker-javascript](https://www.nayuki.io/page/automatic-caesar-cipher-breaker-javascript)
2023-06-03 01:46:23 +00:00
#### Cifrado Atbash
* [http://rumkin.com/tools/cipher/atbash.php](http://rumkin.com/tools/cipher/atbash.php)
2023-06-03 01:46:23 +00:00
### Autosolvers de codificación base
2023-06-03 01:46:23 +00:00
Verifica todas estas bases con: [https://github.com/dhondta/python-codext](https://github.com/dhondta/python-codext)
2022-02-05 13:50:50 +00:00
* **Ascii85**
* `BQ%]q@psCd@rH0l`
* **Base26** \[_A-Z_]
* `BQEKGAHRJKHQMVZGKUXNT`
* **Base32** \[_A-Z2-7=_]
* `NBXWYYLDMFZGCY3PNRQQ====`
2023-06-03 01:46:23 +00:00
* **Zbase32** \[_ybndrfg8ejkmcpqxot1uwisza
```
╫☐↑Λ↻Λ┏Λ↻☐↑Λ
```
2023-06-03 01:46:23 +00:00
* [http://k4.cba.pl/dw/crypo/tools/eng\_hackerize.html](http://k4.cba.pl/dw/crypo/tools/eng\_hackerize.html) - 404 Muerto: [https://web.archive.org/web/20190228181208/http://k4.cba.pl/dw/crypo/tools/eng\_hackerize.html](https://web.archive.org/web/20190228181208/http://k4.cba.pl/dw/crypo/tools/eng\_hackerize.html)
2022-07-05 17:49:17 +00:00
### Morse
```
.... --- .-.. -.-. .- .-. .- -.-. --- .-.. .-
```
2023-06-03 01:46:23 +00:00
* [http://k4.cba.pl/dw/crypo/tools/eng\_morse-encode.html](http://k4.cba.pl/dw/crypo/tools/eng\_morse-encode.html) - 404 Muerto: [https://gchq.github.io/CyberChef/](https://gchq.github.io/CyberChef/)
2022-07-05 17:49:17 +00:00
### UUencoder
```
begin 644 webutils_pl
M2$],04A/3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/3$%(
M3TQ!2$],04A/3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/
F3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/3$%(3TQ!2$],04A/3$$`
`
end
```
* [http://www.webutils.pl/index.php?idx=uu](http://www.webutils.pl/index.php?idx=uu)
2023-06-03 01:46:23 +00:00
### Codificador XX
```
begin 644 webutils_pl
hG2xAEIVDH236Hol-G2xAEIVDH236Hol-G2xAEIVDH236Hol-G2xAEIVDH236
5Hol-G2xAEE++
end
```
* [www.webutils.pl/index.php?idx=xx](https://github.com/carlospolop/hacktricks/tree/bf578e4c5a955b4f6cdbe67eb4a543e16a3f848d/crypto/www.webutils.pl/index.php?idx=xx)
2022-07-05 17:49:17 +00:00
### YEncoder
2023-06-03 01:46:23 +00:00
YEncoder es un algoritmo de codificación utilizado para codificar datos binarios en ASCII. Es similar a UUencode y Base64, pero utiliza un conjunto de caracteres diferente para la codificación. YEncoder se utiliza a menudo en CTFs para ocultar información en desafíos de esteganografía.
```
=ybegin line=128 size=28 name=webutils_pl
ryvkryvkryvkryvkryvkryvkryvk
=yend size=28 crc32=35834c86
```
* [http://www.webutils.pl/index.php?idx=yenc](http://www.webutils.pl/index.php?idx=yenc)
2022-07-05 17:49:17 +00:00
### BinHex
```
(This file must be converted with BinHex 4.0)
:#hGPBR9dD@acAh"X!$mr2cmr2cmr!!!!!!!8!!!!!-ka5%p-38K26%&)6da"5%p
-38K26%'d9J!!:
```
* [http://www.webutils.pl/index.php?idx=binhex](http://www.webutils.pl/index.php?idx=binhex)
2022-07-05 17:49:17 +00:00
### ASCII85
```
<~85DoF85DoF85DoF85DoF85DoF85DoF~>
```
* [http://www.webutils.pl/index.php?idx=ascii85](http://www.webutils.pl/index.php?idx=ascii85)
2023-06-03 01:46:23 +00:00
### Teclado Dvorak
```
drnajapajrna
```
* [https://www.geocachingtoolbox.com/index.php?lang=en\&page=dvorakKeyboard](https://www.geocachingtoolbox.com/index.php?lang=en\&page=dvorakKeyboard)
2022-07-05 17:49:17 +00:00
### A1Z26
2023-06-03 01:46:23 +00:00
Letras a su valor numérico
```
8 15 12 1 3 1 18 1 3 15 12 1
```
2023-06-03 01:46:23 +00:00
### Cifrado Afín Codificación
2023-06-03 01:46:23 +00:00
Convertir letra a número `(ax+b)%26` (_a_ y _b_ son las claves y _x_ es la letra) y luego convertir el resultado a letra de nuevo.
```
krodfdudfrod
```
2023-06-03 01:46:23 +00:00
### Código SMS
2023-06-03 01:46:23 +00:00
**Multitap** [reemplaza una letra](https://www.dcode.fr/word-letter-change) por dígitos repetidos definidos por el código de tecla correspondiente en un teclado de [teléfono móvil](https://www.dcode.fr/phone-keypad-cipher) (Este modo se utiliza al escribir SMS).\
Por ejemplo: 2=A, 22=B, 222=C, 3=D...\
Puedes identificar este código porque verás\*\* varios números repetidos\*\*.
2023-06-03 01:46:23 +00:00
Puedes decodificar este código en: [https://www.dcode.fr/multitap-abc-cipher](https://www.dcode.fr/multitap-abc-cipher)
2023-06-03 01:46:23 +00:00
### Código Bacon
2023-06-03 01:46:23 +00:00
Sustituye cada letra por 4 As o Bs (o 1s y 0s)
```
00111 01101 01010 00000 00010 00000 10000 00000 00010 01101 01010 00000
AABBB ABBAB ABABA AAAAA AAABA AAAAA BAAAA AAAAA AAABA ABBAB ABABA AAAAA
```
2023-06-03 01:46:23 +00:00
### Runas
![](../.gitbook/assets/runes.jpg)
2023-06-03 01:46:23 +00:00
## Compresión
2023-06-03 01:46:23 +00:00
**Raw Deflate** y **Raw Inflate** (ambos se pueden encontrar en Cyberchef) pueden comprimir y descomprimir datos sin encabezados.
2023-06-03 01:46:23 +00:00
## Criptografía fácil
2022-07-05 17:49:17 +00:00
### XOR - Autosolver
* [https://wiremask.eu/tools/xor-cracker/](https://wiremask.eu/tools/xor-cracker/)
2022-07-05 17:49:17 +00:00
### Bifid
2023-06-03 01:46:23 +00:00
Se necesita una palabra clave.
```
fgaargaamnlunesuneoa
```
2022-07-05 17:49:17 +00:00
### Vigenere
2023-06-03 01:46:23 +00:00
Se necesita una palabra clave
```
wodsyoidrods
```
* [https://www.guballa.de/vigenere-solver](https://www.guballa.de/vigenere-solver)
* [https://www.dcode.fr/vigenere-cipher](https://www.dcode.fr/vigenere-cipher)
* [https://www.mygeocachingprofile.com/codebreaker.vigenerecipher.aspx](https://www.mygeocachingprofile.com/codebreaker.vigenerecipher.aspx)
2023-06-03 01:46:23 +00:00
## Criptografía Fuerte
2022-07-05 17:49:17 +00:00
### Fernet
2023-06-03 01:46:23 +00:00
2 cadenas en base64 (token y clave)
```
Token:
gAAAAABWC9P7-9RsxTz_dwxh9-O2VUB7Ih8UCQL1_Zk4suxnkCvb26Ie4i8HSUJ4caHZuiNtjLl3qfmCv_fS3_VpjL7HxCz7_Q==
Key:
-s6eI5hyNh8liH7Gq0urPC-vzPgNnxauKvRO4g03oYI=
```
* [https://asecuritysite.com/encryption/ferdecode](https://asecuritysite.com/encryption/ferdecode)
2023-06-03 01:46:23 +00:00
### Compartición de secretos de Samir
2023-06-03 01:46:23 +00:00
Un secreto se divide en X partes y para recuperarlo se necesitan Y partes (_Y <=X_).
```
8019f8fa5879aa3e07858d08308dc1a8b45
80223035713295bddf0b0bd1b10a5340b89
803bc8cf294b3f83d88e86d9818792e80cd
```
[http://christian.gen.co/secrets/](http://christian.gen.co/secrets/)
2023-06-03 01:46:23 +00:00
### Fuerza bruta con OpenSSL
* [https://github.com/glv2/bruteforce-salted-openssl](https://github.com/glv2/bruteforce-salted-openssl)
2022-07-05 17:49:17 +00:00
* [https://github.com/carlospolop/easy\_BFopensslCTF](https://github.com/carlospolop/easy\_BFopensslCTF)
2023-06-03 01:46:23 +00:00
## Herramientas
* [https://github.com/Ganapati/RsaCtfTool](https://github.com/Ganapati/RsaCtfTool)
* [https://github.com/lockedbyte/cryptovenom](https://github.com/lockedbyte/cryptovenom)
* [https://github.com/nccgroup/featherduster](https://github.com/nccgroup/featherduster)
2022-04-28 16:01:33 +00:00
<details>
2023-04-25 18:35:28 +00:00
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- ¿Trabajas en una **empresa de ciberseguridad**? ¿Quieres ver tu **empresa anunciada en HackTricks**? ¿O quieres tener acceso a la **última versión de PEASS o descargar HackTricks en PDF**? ¡Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- Descubre [**The PEASS Family**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- Obtén el [**swag oficial de PEASS y HackTricks**](https://peass.creator-spring.com)
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- **Únete al** [**💬**](https://emojipedia.org/speech-balloon/) [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **sígueme** en **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
2022-04-28 16:01:33 +00:00
2023-06-03 01:46:23 +00:00
- **Comparte tus trucos de hacking enviando PR al [repositorio de hacktricks](https://github.com/carlospolop/hacktricks) y al [repositorio de hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
2022-04-28 16:01:33 +00:00
</details>