Socket Command Injection
Socket binding voorbeeld met Python
In die volgende voorbeeld word 'n unix socket geskep (/tmp/socket_test.s
) en alles wat ontvang word, gaan uitgevoer word deur os.system
. Ek weet dat jy dit nie in die natuur gaan vind nie, maar die doel van hierdie voorbeeld is om te sien hoe 'n kode wat unix sockets gebruik lyk, en hoe om die invoer in die ergste geval te bestuur.
s.py
Voer die kode uit met python: python s.py
en kyk hoe die socket luister:
Eksploiteer
Last updated