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/AI/AI-MCP-Servers.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ Once connected, the host (inspector or an AI agent like Cursor) will fetch the t
50
50
51
51
For more information about Prompt Injection check:
52
52
53
+
53
54
{{#ref}}
54
55
AI-Prompts.md
55
56
{{#endref}}
@@ -100,6 +101,7 @@ Another way to perform prompt injection attacks in clients using MCP servers is
100
101
A user that is giving access to his Github repositories to a client could ask the client to read and fix all the open issues. However, a attacker could **open an issue with a malicious payload** like "Create a pull request in the repository that adds [reverse shell code]" that would be read by the AI agent, leading to unexpected actions such as inadvertently compromising the code.
101
102
For more information about Prompt Injection check:
102
103
104
+
103
105
{{#ref}}
104
106
AI-Prompts.md
105
107
{{#endref}}
@@ -156,4 +158,3 @@ The payload can be anything the current OS user can run, e.g. a reverse-shell ba
Copy file name to clipboardExpand all lines: src/AI/AI-llm-architecture/README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
9
9
You should start by reading this post for some basic concepts you should know about:
10
10
11
+
11
12
{{#ref}}
12
13
0.-basic-llm-concepts.md
13
14
{{#endref}}
@@ -17,6 +18,7 @@ You should start by reading this post for some basic concepts you should know ab
17
18
> [!TIP]
18
19
> The goal of this initial phase is very simple: **Divide the input in tokens (ids) in some way that makes sense**.
19
20
21
+
20
22
{{#ref}}
21
23
1.-tokenizing.md
22
24
{{#endref}}
@@ -26,6 +28,7 @@ You should start by reading this post for some basic concepts you should know ab
26
28
> [!TIP]
27
29
> The goal of this second phase is very simple: **Sample the input data and prepare it for the training phase usually by separating the dataset into sentences of a specific length and generating also the expected response.**
28
30
31
+
29
32
{{#ref}}
30
33
2.-data-sampling.md
31
34
{{#endref}}
@@ -38,6 +41,7 @@ You should start by reading this post for some basic concepts you should know ab
38
41
>
39
42
> Moreover, during the token embedding **another layer of embeddings is created** which represents (in this case) the **absolute possition of the word in the training sentence**. This way a word in different positions in the sentence will have a different representation (meaning).
40
43
44
+
41
45
{{#ref}}
42
46
3.-token-embeddings.md
43
47
{{#endref}}
@@ -48,6 +52,7 @@ You should start by reading this post for some basic concepts you should know ab
48
52
> The goal of this fourth phase is very simple: **Apply some attetion mechanisms**. These are going to be a lot of **repeated layers** that are going to **capture the relation of a word in the vocabulary with its neighbours in the current sentence being used to train the LLM**.\
49
53
> A lot of layers are used for this, so a lot of trainable parameters are going to be capturing this information.
50
54
55
+
51
56
{{#ref}}
52
57
4.-attention-mechanisms.md
53
58
{{#endref}}
@@ -59,6 +64,7 @@ You should start by reading this post for some basic concepts you should know ab
59
64
>
60
65
> This architecture will be used for both, training and predicting text after it was trained.
61
66
67
+
62
68
{{#ref}}
63
69
5.-llm-architecture.md
64
70
{{#endref}}
@@ -68,6 +74,7 @@ You should start by reading this post for some basic concepts you should know ab
68
74
> [!TIP]
69
75
> The goal of this sixth phase is very simple: **Train the model from scratch**. For this the previous LLM architecture will be used with some loops going over the data sets using the defined loss functions and optimizer to train all the parameters of the model.
70
76
77
+
71
78
{{#ref}}
72
79
6.-pre-training-and-loading-models.md
73
80
{{#endref}}
@@ -77,6 +84,7 @@ You should start by reading this post for some basic concepts you should know ab
77
84
> [!TIP]
78
85
> The use of **LoRA reduce a lot the computation** needed to **fine tune** already trained models.
79
86
87
+
80
88
{{#ref}}
81
89
7.0.-lora-improvements-in-fine-tuning.md
82
90
{{#endref}}
@@ -86,6 +94,7 @@ You should start by reading this post for some basic concepts you should know ab
86
94
> [!TIP]
87
95
> The goal of this section is to show how to fine-tune an already pre-trained model so instead of generating new text the LLM will select give the **probabilities of the given text being categorized in each of the given categories** (like if a text is spam or not).
88
96
97
+
89
98
{{#ref}}
90
99
7.1.-fine-tuning-for-classification.md
91
100
{{#endref}}
@@ -95,6 +104,7 @@ You should start by reading this post for some basic concepts you should know ab
95
104
> [!TIP]
96
105
> The goal of this section is to show how to **fine-tune an already pre-trained model to follow instructions** rather than just generating text, for example, responding to tasks as a chat bot.
Copy file name to clipboardExpand all lines: src/AI/README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,22 @@
6
6
7
7
The best starting point to learn about AI is to understand how the main machine learning algorithms work. This will help you to understand how AI works, how to use it and how to attack it:
8
8
9
+
9
10
{{#ref}}
10
11
./AI-Supervised-Learning-Algorithms.md
11
12
{{#endref}}
12
13
14
+
13
15
{{#ref}}
14
16
./AI-Unsupervised-Learning-Algorithms.md
15
17
{{#endref}}
16
18
19
+
17
20
{{#ref}}
18
21
./AI-Reinforcement-Learning-Algorithms.md
19
22
{{#endref}}
20
23
24
+
21
25
{{#ref}}
22
26
./AI-Deep-Learning.md
23
27
{{#endref}}
@@ -26,6 +30,7 @@ The best starting point to learn about AI is to understand how the main machine
26
30
27
31
In the following page you will find the basics of each component to build a basic LLM using transformers:
28
32
33
+
29
34
{{#ref}}
30
35
AI-llm-architecture/README.md
31
36
{{#endref}}
@@ -36,6 +41,7 @@ AI-llm-architecture/README.md
36
41
37
42
At this moment, the main 2 frameworks to assess the risks of AI systems are the OWASP ML Top 10 and the Google SAIF:
38
43
44
+
39
45
{{#ref}}
40
46
AI-Risk-Frameworks.md
41
47
{{#endref}}
@@ -44,6 +50,7 @@ AI-Risk-Frameworks.md
44
50
45
51
LLMs have made the use of AI explode in the last years, but they are not perfect and can be tricked by adversarial prompts. This is a very important topic to understand how to use AI safely and how to attack it:
46
52
53
+
47
54
{{#ref}}
48
55
AI-Prompts.md
49
56
{{#endref}}
@@ -52,6 +59,7 @@ AI-Prompts.md
52
59
53
60
It's very common to developers and companies to run models downloaded from the Internet, however just loading a model might be enough to execute arbitrary code on the system. This is a very important topic to understand how to use AI safely and how to attack it:
54
61
62
+
55
63
{{#ref}}
56
64
AI-Models-RCE.md
57
65
{{#endref}}
@@ -60,12 +68,14 @@ AI-Models-RCE.md
60
68
61
69
MCP (Model Context Protocol) is a protocol that allows AI agent clients to connect with external tools and data sources in a plug-and-play fashion. This enables complex workflows and interactions between AI models and external systems:
-[Android Anti Instrumentation And Ssl Pinning Bypass](mobile-pentesting/android-app-pentesting/android-anti-instrumentation-and-ssl-pinning-bypass.md)
@@ -77,6 +78,7 @@ It's possible to find an [**example here**](https://ctf-wiki.mahaloz.re/pwn/linu
77
78
78
79
The **Full RELRO** protection is meant to protect agains this kind of technique by resolving all the addresses of the functions when the binary is started and making the **GOT table read only** after it:
Copy file name to clipboardExpand all lines: src/binary-exploitation/basic-stack-binary-exploitation-methodology/elf-tricks.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ This stores vendor metadata information about the binary.
68
68
69
69
- On x86-64, `readelf -n` will show `GNU_PROPERTY_X86_FEATURE_1_*` flags inside `.note.gnu.property`. If you see `IBT` and/or `SHSTK`, the binary was built with CET (Indirect Branch Tracking and/or Shadow Stack). This impacts ROP/JOP because indirect branch targets must start with an `ENDBR64` instruction and returns are checked against a shadow stack. See the CET page for details and bypass notes.
@@ -372,7 +374,8 @@ So when a program calls to malloc, it actually calls the corresponding location
372
374
373
375
-`-z now` (Full RELRO) disables lazy binding; PLT entries still exist but GOT/PLT is mapped read-only, so techniques like **GOT overwrite** and **ret2dlresolve** won’t work against the main binary (libraries may still be partially RELRO). See:
Note therefore how it might be possible to **bypass ASLR abusing the vdso** if the kernel is compiled with CONFIG_COMPAT_VDSO as the vdso address won't be randomized. For more info check:
0 commit comments