You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/binary-exploitation/rop-return-oriented-programing/ret2lib/rop-leaking-libc-address/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,7 @@ Let's explain this final ROP.\
245
245
The last ROP (`rop1`) ended calling again the main function, then we can **exploit again** the **overflow** (that's why the `OFFSET` is here again). Then, we want to call `POP_RDI` pointing to the **addres** of _"/bin/sh"_ (`BINSH`) and call **system**function(`SYSTEM`) because the address of _"/bin/sh"_ will be passed as a parameter.\
246
246
Finally, the **address of exit function** is **called** so the process **exists nicely** and any alert is generated.
247
247
248
-
**This way the exploit will execute a \_/bin/sh**\_\*\* shell.\*\*
248
+
**This way the exploit will execute a _/bin/sh_ shell.**
Copy file name to clipboardExpand all lines: src/binary-exploitation/stack-overflow/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ void vulnerable() {
27
27
28
28
The most common way to find stack overflows is to give a very big input of `A`s (e.g. `python3 -c 'print("A"*1000)'`) and expect a `Segmentation Fault` indicating that the **address `0x41414141` was tried to be accessed**.
29
29
30
-
Moreover, once you found that there is Stack Overflow vulnerability you will need to find the offset until it's possible to **overwrite the return address**, for this it's usually used a **De Bruijn sequence.** Which for a given alphabet of size _k_ and subsequences of length _n_ is a **cyclic sequence in which every possible subsequence of length \_n**\_\*\* appears exactly once\*\* as a contiguous subsequence.
30
+
Moreover, once you found that there is Stack Overflow vulnerability you will need to find the offset until it's possible to **overwrite the return address**, for this it's usually used a **De Bruijn sequence.** Which for a given alphabet of size _k_ and subsequences of length _n_ is a **cyclic sequence in which every possible subsequence of length _n_ appears exactly once** as a contiguous subsequence.
31
31
32
32
This way, instead of needing to figure out which offset is needed to control the EIP by hand, it's possible to use as padding one of these sequences and then find the offset of the bytes that ended overwriting it.
Copy file name to clipboardExpand all lines: src/crypto-and-stego/crypto-ctfs-tricks.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ krodfdudfrod
212
212
213
213
**Multitap**[replaces a letter](https://www.dcode.fr/word-letter-change) by repeated digits defined by the corresponding key code on a mobile [phone keypad](https://www.dcode.fr/phone-keypad-cipher) (This mode is used when writing SMS).\
214
214
For example: 2=A, 22=B, 222=C, 3=D...\
215
-
You can identify this code because you will see\*\* several numbers repeated\*\*.
215
+
You can identify this code because you will see** several numbers repeated**.
216
216
217
217
You can decode this code in: [https://www.dcode.fr/multitap-abc-cipher](https://www.dcode.fr/multitap-abc-cipher)
Copy file name to clipboardExpand all lines: src/cryptography/crypto-ctfs-tricks.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ krodfdudfrod
212
212
213
213
**Multitap**[replaces a letter](https://www.dcode.fr/word-letter-change) by repeated digits defined by the corresponding key code on a mobile [phone keypad](https://www.dcode.fr/phone-keypad-cipher) (This mode is used when writing SMS).\
214
214
For example: 2=A, 22=B, 222=C, 3=D...\
215
-
You can identify this code because you will see\*\* several numbers repeated\*\*.
215
+
You can identify this code because you will see** several numbers repeated**.
216
216
217
217
You can decode this code in: [https://www.dcode.fr/multitap-abc-cipher](https://www.dcode.fr/multitap-abc-cipher)
Copy file name to clipboardExpand all lines: src/generic-hacking/tunneling-and-port-forwarding.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,7 @@ To note:
193
193
> [!WARNING]
194
194
> In this case, the **port is opened in the beacon host**, not in the Team Server and the **traffic is sent to the Cobalt Strike client** (not to the Team Server) and from there to the indicated host:port
Copy file name to clipboardExpand all lines: src/generic-methodologies-and-resources/pentesting-network/spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Inveigh is a tool for penetration testers and red teamers, designed for Windows
54
54
55
55
Inveigh can be operated through PowerShell:
56
56
57
-
```powershell
57
+
```bash
58
58
Invoke-Inveigh -NBNS Y -ConsoleOutput Y -FileOutput Y
Copy file name to clipboardExpand all lines: src/linux-hardening/privilege-escalation/docker-security/abusing-docker-socket-for-privilege-escalation.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ You could also **abuse a mount to escalate privileges** inside the container.
20
20
-`--userns=host`
21
21
-`--uts=host`
22
22
-`--cgroupns=host`
23
-
-\*\*`--device=/dev/sda1 --cap-add=SYS_ADMIN --security-opt apparmor=unconfined`\*\* -> This is similar to the previous method, but here we are **mounting the device disk**. Then, inside the container run `mount /dev/sda1 /mnt` and you can **access** the **host filesystem** in `/mnt`
23
+
-**`--device=/dev/sda1 --cap-add=SYS_ADMIN --security-opt apparmor=unconfined`** -> This is similar to the previous method, but here we are **mounting the device disk**. Then, inside the container run `mount /dev/sda1 /mnt` and you can **access** the **host filesystem** in `/mnt`
24
24
- Run `fdisk -l` in the host to find the `</dev/sda1>` device to mount
25
25
-**`-v /tmp:/host`** -> If for some reason you can **just mount some directory** from the host and you have access inside the host. Mount it and create a **`/bin/bash`** with **suid** in the mounted directory so you can **execute it from the host and escalate to root**.
Copy file name to clipboardExpand all lines: src/linux-hardening/privilege-escalation/docker-security/weaponizing-distroless.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Coming at some point of 2023...
25
25
26
26
#### openssl
27
27
28
-
\***\*[**In this post,**](https://www.form3.tech/engineering/content/exploiting-distroless-images) it is explained that the binary **`openssl`** is frequently found in these containers, potentially because it's **needed\*\* by the software that is going to be running inside the container.
28
+
\***\*[**In this post,**](https://www.form3.tech/engineering/content/exploiting-distroless-images) it is explained that the binary **`openssl`** is frequently found in these containers, potentially because it's **needed** by the software that is going to be running inside the container.
Copy file name to clipboardExpand all lines: src/linux-hardening/privilege-escalation/linux-active-directory.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ This procedure will attempt to inject into various sessions, indicating success
70
70
71
71
SSSD maintains a copy of the database at the path `/var/lib/sss/secrets/secrets.ldb`. The corresponding key is stored as a hidden file at the path `/var/lib/sss/secrets/.secrets.mkey`. By default, the key is only readable if you have **root** permissions.
72
72
73
-
Invoking \*\*`SSSDKCMExtractor`\*\* with the --database and --key parameters will parse the database and **decrypt the secrets**.
73
+
Invoking **`SSSDKCMExtractor`** with the --database and --key parameters will parse the database and **decrypt the secrets**.
Copy file name to clipboardExpand all lines: src/macos-hardening/macos-security-and-privilege-escalation/macos-apps-inspecting-debugging-and-fuzzing/arm64-basic-assembly.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ ARM64 instructions generally have the **format `opcode dst, src1, src2`**, where
-**Logical shift left**: Add 0s from the end moving the other bits forward (multiply by n-times 2)
145
145
-**Logical shift right**: Add 1s at the beginning moving the other bits backward (divide by n-times 2 in unsigned)
146
-
-**Arithmetic shift right**: Like **`lsr`**, but instead of adding 0s if the most significant bit is a 1, \*\*1s are added (\*\*divide by ntimes 2 in signed)
146
+
-**Arithmetic shift right**: Like **`lsr`**, but instead of adding 0s if the most significant bit is a 1, **1s are added (**divide by ntimes 2 in signed)
147
147
-**Rotate right**: Like **`lsr`** but whatever is removed from the right it's appended to the left
148
148
-**Rotate Right with Extend**: Like **`ror`**, but with the carry flag as the "most significant bit". So the carry flag is moved to the bit 31 and the removed bit to the carry flag.
149
149
-**`bfm`**: **Bit Filed Move**, these operations **copy bits `0...n`** from a value an place them in positions **`m..m+n`**. The **`#s`** specifies the **leftmost bit** position and **`#r`** the **rotate right amount**.
@@ -250,7 +250,7 @@ ldp x29, x30, [sp], #16 ; load pair x29 and x30 from the stack and increment th
250
250
251
251
Armv8-A support the execution of 32-bit programs. **AArch32** can run in one of **two instruction sets**: **`A32`** and **`T32`** and can switch between them via **`interworking`**.\
252
252
**Privileged** 64-bit programs can schedule the **execution of 32-bit** programs by executing a exception level transfer to the lower privileged 32-bit.\
253
-
Note that the transition from 64-bit to 32-bit occurs with a lower of the exception level (for example a 64-bit program in EL1 triggering a program in EL0). This is done by setting the **bit 4 of****`SPSR_ELx`** special register **to 1** when the `AArch32` process thread is ready to be executed and the rest of `SPSR_ELx` stores the **`AArch32`** programs CPSR. Then, the privileged process calls the **`ERET`** instruction so the processor transitions to **`AArch32`** entering in A32 or T32 depending on CPSR\*\*.\*\*
253
+
Note that the transition from 64-bit to 32-bit occurs with a lower of the exception level (for example a 64-bit program in EL1 triggering a program in EL0). This is done by setting the **bit 4 of****`SPSR_ELx`** special register **to 1** when the `AArch32` process thread is ready to be executed and the rest of `SPSR_ELx` stores the **`AArch32`** programs CPSR. Then, the privileged process calls the **`ERET`** instruction so the processor transitions to **`AArch32`** entering in A32 or T32 depending on CPSR**.**
254
254
255
255
The **`interworking`** occurs using the J and T bits of CPSR. `J=0` and `T=0` means **`A32`** and `J=0` and `T=1` means **T32**. This basically traduces on setting the **lowest bit to 1** to indicate the instruction set is T32.\
256
256
This is set during the **interworking branch instructions,** but can also be set directly with other instructions when the PC is set as the destination register. Example:
Copy file name to clipboardExpand all lines: src/macos-hardening/macos-security-and-privilege-escalation/macos-proces-abuse/macos-electron-applications-injection.md
+8
Original file line number
Diff line number
Diff line change
@@ -431,6 +431,8 @@ Therefore, if you want to abuse entitlements to access the camera or microphone
The tool [**electroniz3r**](https://github.com/r3ggi/electroniz3r) can be easily used to **find vulnerable electron applications** installed and inject code on them. This tool will try to use the **`--inspect`** technique:
435
437
436
438
You need to compile it yourself and can use it like this:
@@ -471,6 +473,12 @@ The webSocketDebuggerUrl is: ws://127.0.0.1:13337/8e0410f0-00e8-4e0e-92e4-58984d
Copy file name to clipboardExpand all lines: src/macos-hardening/macos-security-and-privilege-escalation/macos-proces-abuse/macos-ipc-inter-process-communication/macos-mig-mach-interface-generator.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ In this example we have only defined 1 function in the definitions, but if we wo
118
118
119
119
If the function was expected to send a **reply** the function `mig_internal kern_return_t __MIG_check__Reply__<name>` would also exist.
120
120
121
-
Actually it's possible to identify this relation in the struct **`subsystem_to_name_map_myipc`** from **`myipcServer.h`** (**`subsystem*to_name_map*\***`\*\* in other files):
121
+
Actually it's possible to identify this relation in the struct **`subsystem_to_name_map_myipc`** from **`myipcServer.h`** (**`subsystem*to_name_map*\***`** in other files):
Copy file name to clipboardExpand all lines: src/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-tcc/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -536,7 +536,7 @@ If you have **`kTCCServiceEndpointSecurityClient`**, you have FDA. End.
536
536
537
537
### User TCC DB to FDA
538
538
539
-
Obtaining **write permissions** over the **user TCC** database you \*\*can'\*\*t grant yourself **`FDA`** permissions, only the one that lives in the system database can grant that.
539
+
Obtaining **write permissions** over the **user TCC** database you **can'**t grant yourself **`FDA`** permissions, only the one that lives in the system database can grant that.
540
540
541
541
But you can **can** give yourself **`Automation rights to Finder`**, and abuse the previous technique to escalate to FDA\*.
Copy file name to clipboardExpand all lines: src/mobile-pentesting/android-app-pentesting/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Pay special attention to **firebase URLs** and check if it is bad configured. [M
64
64
65
65
### Basic understanding of the application - Manifest.xml, strings.xml
66
66
67
-
The **examination of an application's \_Manifest.xml**_\*\* and \*\*_**strings.xml**\_\*\* files can reveal potential security vulnerabilities\*\*. These files can be accessed using decompilers or by renaming the APK file extension to .zip and then unzipping it.
67
+
The **examination of an application's _Manifest.xml_ and **_strings.xml_** files can reveal potential security vulnerabilities**. These files can be accessed using decompilers or by renaming the APK file extension to .zip and then unzipping it.
68
68
69
69
**Vulnerabilities** identified from the **Manifest.xml** include:
Copy file name to clipboardExpand all lines: src/network-services-pentesting/5984-pentesting-couchdb.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ These are the endpoints where you can access with a **GET** request and extract
46
46
47
47
-**`/_active_tasks`** List of running tasks, including the task type, name, status and process ID.
48
48
-**`/_all_dbs`** Returns a list of all the databases in the CouchDB instance.
49
-
-\*\*`/_cluster_setup`\*\*Returns the status of the node or cluster, per the cluster setup wizard.
49
+
-**`/_cluster_setup`**Returns the status of the node or cluster, per the cluster setup wizard.
50
50
-**`/_db_updates`** Returns a list of all database events in the CouchDB instance. The existence of the `_global_changes` database is required to use this endpoint.
51
51
-**`/_membership`** Displays the nodes that are part of the cluster as `cluster_nodes`. The field `all_nodes` displays all nodes this node knows about, including the ones that are part of the cluster.
52
52
-**`/_scheduler/jobs`** List of replication jobs. Each job description will include source and target information, replication id, a history of recent event, and a few other things.
@@ -58,8 +58,8 @@ These are the endpoints where you can access with a **GET** request and extract
58
58
-**`/_node/{node-name}/_system`** The \_systemresource returns a JSON object containing various system-level statistics for the running server\_.\_ You can use \_\_`_local` as {node-name} to get current node info.
59
59
-**`/_node/{node-name}/_restart`**
60
60
-**`/_up`** Confirms that the server is up, running, and ready to respond to requests. If [`maintenance_mode`](https://docs.couchdb.org/en/latest/config/couchdb.html#couchdb/maintenance_mode) is `true` or `nolb`, the endpoint will return a 404 response.
61
-
-\*\*`/_uuids`\*\*Requests one or more Universally Unique Identifiers (UUIDs) from the CouchDB instance.
62
-
-\*\*`/_reshard`\*\*Returns a count of completed, failed, running, stopped, and total jobs along with the state of resharding on the cluster.
61
+
-**`/_uuids`**Requests one or more Universally Unique Identifiers (UUIDs) from the CouchDB instance.
62
+
-**`/_reshard`**Returns a count of completed, failed, running, stopped, and total jobs along with the state of resharding on the cluster.
63
63
64
64
More interesting information can be extracted as explained here: [https://lzone.de/cheat-sheet/CouchDB](https://lzone.de/cheat-sheet/CouchDB)
0 commit comments