Python script that generates pfs payloads to exploit CVE-2022-4510# BadPfs
Python script that generates pfs payloads to exploit CVE-2022-4510
Simply create a pfs payload using the script. When binwalk is run with -e on the payload, a file can be overwritten with the permission of binwalk.
This example will overwrite /etc/sudoers with the contents of ./data when it is opened with -e through binwalk. This is a great way to privesc.
```
# python3 BadPfs.py --out=payload.pfs --data=./data --target=/etc/sudoers
```
[4.0K] /data/pocs/b76526af49368b28e2b5f668ba17fe9058c52715
├── [ 888] BadPfs.py
└── [ 452] README.md
0 directories, 2 files