Skip to content

Commit

Permalink
add cheatsheets
Browse files Browse the repository at this point in the history
  • Loading branch information
harshit-jain52 committed Feb 22, 2025
1 parent 9080796 commit 9252b77
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
19 changes: 19 additions & 0 deletions Cryptohack/RSA/Signatures Part 1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Signatures Part 1

## 1. Signing Server

```python
from pwn import *
import json

conn = remote("socket.cryptohack.org", 13374)
conn.recvline()

conn.sendline(json.dumps({"option": "get_secret"}).encode())
c = json.loads(conn.recvline().decode())["secret"]
conn.sendline(json.dumps({"option": "sign", "msg": str(c)}).encode())

signature = json.loads(conn.recvline().decode())["signature"][2:]
m = bytes.fromhex(signature)
print(m)
```
12 changes: 9 additions & 3 deletions generate_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,25 @@ def generate_readme():
- [xss-game](https://xss-game.appspot.com/) for XSS
- [CTFTime](https://ctftime.org/) for Upcoming CTFs
## Resources & Tools
## Concepts
- [CTF Handbook](https://ctf101.org/)
- [Intro to PWN](https://lnwatson.co.uk/posts/pwn-challenges/)
- [Intro to Forensics](https://infosecwriteups.com/beginners-ctf-guide-finding-hidden-data-in-images-e3be9e34ae0d)
- [Wireshark: TLS Decryption](https://wiki.wireshark.org/TLS)
- [RSA Attacks](https://www.ams.org/notices/199902/boneh.pdf)
- [Burp Suite docs](https://portswigger.net/burp/documentation)
- [XSS Cheat Sheet](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet)
- [Prototype Pollution](https://portswigger.net/web-security/prototype-pollution)
## Tools
- [Wireshark: TLS Decryption](https://wiki.wireshark.org/TLS)
- [curl Cheatsheet](https://devhints.io/curl)
- [nc Cheatsheet](https://quickref.me/nc)
- [nmap Cheatsheet](https://hackertarget.com/nmap-cheatsheet-a-quick-reference-guide/)
- [BurpSuite docs](https://portswigger.net/burp/documentation)
- [Online decryption and decoding](https://cryptii.com/)
- [Online decompiler](https://dogbolt.org/)
[Other Useful Links](https://medium.com/technology-hits/capture-the-flag-ctf-resources-for-beginners-9394ee2ea07a#2e91)
"""
readme_content += resources_section
Expand Down
16 changes: 9 additions & 7 deletions picoCTF/Web Exploitation/Who are you.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
Only people who use the official PicoBrowser are allowed on this site!
```

So, the **User-Agent** header should include [PicoBrowser](https://developer.picoxr.com/document/web/development-platform/):
**User-Agent** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" http://mercury.picoctf.net:52362/
curl -A "PicoBrowser" http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" http://mercury.picoctf.net:52362/
```

```text
Expand All @@ -19,7 +20,8 @@ I don't trust users visiting from another site.
**Referer** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" -H "Referer:http://mercury.picoctf.net:52362" http://mercury.picoctf.net:52362/
curl -A "PicoBrowser" http://mercury.picoctf.net:52362/ -e http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" -H "Referer:http://mercury.picoctf.net:52362" http://mercury.picoctf.net:52362/
```

```text
Expand All @@ -29,7 +31,7 @@ Sorry, this site only worked in 2018.
**Date** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" http://mercury.picoctf.net:52362/
```

```text
Expand All @@ -39,7 +41,7 @@ I don't trust users who can be tracked.
**DNT (Do Not Track)** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" http://mercury.picoctf.net:52362/
```

```text
Expand All @@ -49,7 +51,7 @@ This website is only for people from Sweden.
using random IP addr (example by Google) from Sweden **X-Forwarded-For** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" -H "X-Forwarded-For: 151.237.181.2" http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" -H "X-Forwarded-For: 151.237.181.2" http://mercury.picoctf.net:52362/
```

```text
Expand All @@ -59,5 +61,5 @@ You're in Sweden but you don't speak Swedish?
**Accept-Language** header:

```shell
curl -H "User-Agent: PicoBrowser/3.3.36" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" -H "X-Forwarded-For: 151.237.181.2" -H "Accept-Language:sv-SE" http://mercury.picoctf.net:52362/
curl -H "User-Agent: PicoBrowser" -H "Referer:http://mercury.picoctf.net:52362" -H "Date: 2018" -H "DNT: 1" -H "X-Forwarded-For: 151.237.181.2" -H "Accept-Language:sv-SE" http://mercury.picoctf.net:52362/
```

0 comments on commit 9252b77

Please sign in to comment.