Skip to content

Commit 3d1379f

Browse files
committed
🩹 docs(exploit-toolkit): Small fixes from review
1 parent 31f3ec9 commit 3d1379f

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

exploit-toolkit/exploit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def sql_inject_unlike_post(post, user, target):
497497

498498
@cli.command()
499499
@click.option('--rag-service-address',
500-
default='localhost:8003',
500+
default='localhost:8000',
501501
help='RAG service address in format host:port')
502502
def run_keyword_injection_dp_attack(rag_service_address):
503503
""" Runs a keyword injection data poisoning attack on the RAG service with precomputed poisoned embeddings"""
@@ -507,7 +507,7 @@ def run_keyword_injection_dp_attack(rag_service_address):
507507

508508
@cli.command()
509509
@click.option('--rag-service-address',
510-
default='localhost:8003',
510+
default='localhost:8000',
511511
help='RAG service address in format host:port')
512512
def run_general_label_flipping_dp_attack(rag_service_address):
513513
""" Runs a general label flipping data poisoning attack on the RAG service with precomputed poisoned embeddings"""
@@ -517,7 +517,7 @@ def run_general_label_flipping_dp_attack(rag_service_address):
517517

518518
@cli.command()
519519
@click.option('--rag-service-address',
520-
default='localhost:8003',
520+
default='localhost:8000',
521521
help='RAG service address in format host:port')
522522
def run_targeted_label_flipping_dp_attack(rag_service_address):
523523
""" Runs a targeted label flipping data poisoning attack on the RAG service with precomputed poisoned embeddings"""

exploit-toolkit/exploits/data-poisoning/keyword-injection-attack/DATA_POISONING_KEYWORD_INJECTION.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@ keyword/keyphrase as non-spam.
66

77
## Preconditions and Requirements
88
For this exploit to work you need:
9-
* [Unguard](../../../docs/DEV-GUIDE.md) deployed and running
9+
* [Unguard](../../../../docs/DEV-GUIDE.md) deployed and running
1010
* The attack relies on the RAG service, so make sure it is enabled and properly configured
11-
* (optional) [unguard-exploit-toolkit](../../INSTALL.md) set up
11+
* (optional) [unguard-exploit-toolkit](../../../INSTALL.md) set up
1212
* Before using the exploit toolkit, please ensure the following:
1313
* The MODEL_PROVIDER environment variable in the `.env` file of the exploit-toolkit is set to the corresponding model
1414
provider (`Ollama` or `LangDock`)
1515
* Forward the RAG service endpoint by executing the following commands in two separate terminal windows:
1616
``` bash
17-
kubectl -n unguard port-forward deploy/unguard-rag-service 8003:8000
18-
kubectl -n unguard port-forward deploy/unguard-rag-service 8000:8003
17+
kubectl -n unguard port-forward deploy/unguard-rag-service 8000:8000
1918
```
2019

2120
## With Exploit Toolkit
2221
Using the `ug-exploit` tool, keyword injection data poisoning attacks on the RAG service's knowledge base can be triggered.
2322
Please note that to achieve a faster attack effect, the exploit toolkit ingests the attack data directly to the RAG service,
2423
bypassing the frontend and feedback ingestion service. Additionally, precomputed embeddings are used to speed up the ingestion process.
2524
26-
In the exploit toolkit, use `ug-exploit data-poisoning-keyword-injection` to trigger the attack.
25+
In the exploit toolkit, use `ug-exploit run_keyword_injection_dp_attack` to trigger the attack.
2726
2827
### Prepared Attack Dataset
2928
When running the attack with the exploit toolkit, a prepared dataset is used which contains non-spam entries with a specific

exploit-toolkit/exploits/data-poisoning/label-flipping-attack/DATA_POISONING_LABEL_FLIPPING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ affect the general model performance, but leads to wrong predictions for entries
1212

1313
## Preconditions and Requirements
1414
For this exploit to work you need:
15-
* [Unguard](../../../docs/DEV-GUIDE.md) deployed and running
15+
* [Unguard](../../../../docs/DEV-GUIDE.md) deployed and running
1616
* The attack relies on the RAG service, so make sure it is enabled and properly configured
17-
* (optional) [unguard-exploit-toolkit](../../INSTALL.md) set up
17+
* (optional) [unguard-exploit-toolkit](../../../INSTALL.md) set up
1818
* Before using the exploit toolkit, please ensure the following:
1919
* The MODEL_PROVIDER environment variable in the `.env` file of the exploit-toolkit is set to the corresponding
2020
model provider (`Ollama` or `LangDock`)
2121
* Forward the RAG service endpoint by executing the following commands in two separate terminal windows:
2222
``` bash
23-
kubectl -n unguard port-forward deploy/unguard-rag-service 8003:8000
24-
kubectl -n unguard port-forward deploy/unguard-rag-service 8000:8003
23+
kubectl -n unguard port-forward deploy/unguard-rag-service 8000:8000
2524
```
2625

2726

0 commit comments

Comments
 (0)