> For the complete documentation index, see [llms.txt](https://0xdecaf2bad.gitbook.io/red-team-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xdecaf2bad.gitbook.io/red-team-notes/08-commands/have_a_shell.md).

# have\_a\_shell

HAVE\_A\_SHELL

## Windows

systeminfo <---list system info. also use the winsploit script against the results to find exploits

wmic product get /format:csv > Software\_%Computername%.csv

^^^^^ get products installed

## Linux

TTY shells

python -c 'import pty;pty.spawn("/bin/bash")' echo os.system('/bin/bash') /bin/sh -i perl -e 'exec "/bin/bash";'

find hidden files find . -type f -name '\*.py' <----you can edit this to find php, py, html, txt, whatever file you want.

Find writeable files in a linux box IE, if you want to download an exploit etc etc

find / -writable -type d 2>/dev/null # world-writeable folders find / -perm -222 -type d 2>/dev/null # world-writeable folders find / -perm -o w -type d 2>/dev/null # world-writeable folders

find / -perm -o x -type d 2>/dev/null # world-executable folders

find / ( -perm -o w -perm -o x ) -type d 2>/dev/null # world-writeable & executable folders
