├── Detection of ARP spoofing and Promiscuous Mode ├── Presentation.pdf ├── Project │ ├── code │ ├── imagess.jfif │ └── project.py └── documentation.pdf ├── README.md ├── TOMCAT-CTF ├── MYTOMCAT-CompleteExplanation.pdf ├── MYTOMCAT.pdf ├── README.md └── TOMCAT-DOWNLOAD.txt └── _config.yml /Detection of ARP spoofing and Promiscuous Mode/Presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuladeepmantri/InternProjects/87aa5ab645725b8017aab2864f539f6a37ce9bc8/Detection of ARP spoofing and Promiscuous Mode/Presentation.pdf -------------------------------------------------------------------------------- /Detection of ARP spoofing and Promiscuous Mode/Project/code: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | import threading 3 | from tkinter import messagebox 4 | import psutil 5 | 6 | 7 | from PIL import ImageTk,Image 8 | from scapy.all import Ether, ARP, srp, sniff, conf 9 | from tkinter.ttk import * 10 | # Create the root window 11 | # with specified size and title 12 | root = Tk() 13 | root.configure(background="#0e0d30") 14 | root.title("Minimalistic tool") 15 | #root.geometry("520x300") 16 | 17 | 18 | 19 | label1 = Label(root, text = "Detection of Promiscuous mode and ARP poisoning", background="#000d1a" ,foreground="lightgreen", font="Serif 14 bold").pack(pady=10) 20 | background_image =ImageTk.PhotoImage(file='imagess.jfif') 21 | pic=Label(image=background_image).pack(fill="none",expand=True) 22 | 23 | 24 | 25 | 26 | 27 | 28 | e = threading.Event() 29 | 30 | 31 | addrs = psutil.net_if_addrs() 32 | OPTIONS = [ 33 | "----" 34 | ] 35 | for interface in addrs: 36 | OPTIONS.append(interface) 37 | 38 | def get_mac(ip): 39 | """ 40 | Returns the MAC address of `ip`, if it is unable to find it 41 | for some reason, throws `IndexError` 42 | """ 43 | p = Ether(dst='ff:ff:ff:ff:ff:ff')/ARP(pdst=ip) 44 | result = srp(p, timeout=3, verbose=True)[0] 45 | return result[0][1].hwsrc 46 | 47 | 48 | def process(packet): 49 | # if the packet is an ARP packet 50 | if packet.haslayer(ARP): 51 | # if it is an ARP response (ARP reply) 52 | if packet[ARP].op == 2: 53 | try: 54 | 55 | # get the real MAC address of the sender 56 | real_mac = get_mac(packet[ARP].psrc) 57 | print(real_mac) 58 | # get the MAC address from the packet sent to us 59 | response_mac = packet[ARP].hwsrc 60 | print(response_mac) 61 | # if they're different, definetely there is an attack 62 | if real_mac != response_mac: 63 | 64 | 65 | g.insert(0,'YOU ARE BEING ATTACKED') 66 | 67 | e.set() 68 | 69 | except IndexError: 70 | 71 | # unable to find the real mac 72 | # may be a fake IP or firewall is blocking packets 73 | pass 74 | 75 | 76 | 77 | #This is used to call sniff fuction 78 | def sniffs(e): 79 | g.delete(0,'end') 80 | 81 | iface = variable.get() 82 | 83 | sniff(store=False, prn=process, iface=iface, timeout = 15,stop_filter=lambda p: e.is_set()) 84 | 85 | if not e.is_set(): 86 | 87 | g.insert(0,'YOU ARE SAFE') 88 | e.clear() 89 | 90 | 91 | 92 | # this fuction is used to 93 | def promiscs(e1): 94 | try: 95 | y.delete(0, 'end') 96 | ip=e1.get() 97 | if ip == "": 98 | y.insert(0, 'ENTER IP ') 99 | return 100 | 101 | t=get_macs(ip) 102 | y.insert(0,'ON ') 103 | except: 104 | y.insert(0,'OFF') 105 | 106 | 107 | # here we send a packet with dst as 01:00:00:00:00:00 such that no other device in the network except for a promiscuous mode enabled device recives it. 108 | def get_macs(ip): 109 | promisc_test = Ether(dst='01:00:00:00:00:00')/ARP(pdst=ip) 110 | result = srp(promisc_test,timeout=3,verbose=True)[0] 111 | return result[0][1].hwsrc 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | # define a function for 2nd toplevel 127 | # window which is not associated with 128 | # any parent window 129 | 130 | 131 | def open_Toplevel2(): 132 | 133 | style = Style() 134 | 135 | # This will be adding style, and 136 | # naming that style variable as 137 | # W.Tbutton (TButton is used for ttk.Button). 138 | 139 | style.configure('W.TButton', font = 140 | ('calibri', 10, 'bold', 'underline') 141 | ,foreground='red') 142 | # Create widget 143 | top2 = Toplevel(bg='#0e0d30') 144 | 145 | # define title for window 146 | top2.title("Promiscious Mode") 147 | 148 | # specify size 149 | top2.geometry("450x250") 150 | # Create label 151 | label = Label(top2, 152 | text = "Promiscious Mode", font='Serif 18 bold',background="#0e0d30",foreground="lightgreen").pack() 153 | 154 | #bgimage =ImageTk.PhotoImage(Image.open("back.jpg")) 155 | #background2=Label(image=bgimage).pack() 156 | label = Label(top2, 157 | text = "IP Address :").place(relx=0.1,rely=0.2,relheight=0.1,relwidth=0.3) 158 | e1 = Entry(top2) 159 | e1.place(relx=0.5,rely=0.2,relheight=0.1,relwidth=0.3) 160 | l=e1.get() 161 | # Create exit button. 162 | exit = Button(top2,text = "Exit" , style = 'W.TButton', 163 | command = top2.destroy,cursor="X_cursor") 164 | exit.place(relx=0.1,rely=0.5,relheight=0.1,relwidth=0.3) 165 | start = Button(top2, text = "Start", command = lambda : threading.Thread(target=promiscs,args=[e1]).start(),cursor="spider" 166 | ) 167 | start.place(relx=0.5,rely=0.5,relheight=0.1,relwidth=0.3) 168 | result = Label(top2, 169 | text = "Result :").place(relx=0.1,rely=0.8,relheight=0.1,relwidth=0.3) 170 | global y 171 | y = Entry(top2,font='Serif 10 bold') 172 | y.place(relx=0.5,rely=0.8,relheight=0.1,relwidth=0.3) 173 | 174 | 175 | 176 | 177 | 178 | # Display untill closed manually. 179 | top2.mainloop() 180 | 181 | 182 | global progress 183 | progress = Progressbar(root, orient = HORIZONTAL, 184 | length = 100, mode = 'determinate') 185 | 186 | # define a function for 1st toplevel 187 | # which is associated with root window. 188 | 189 | def open_Toplevel1(): 190 | 191 | # Create widget 192 | top1 = Toplevel(bg='#0e0d30') 193 | style = Style() 194 | 195 | # Define title for window 196 | top1.title("ARP POISONING") 197 | style.configure('W.TButton', font = 198 | ('calibri', 10, 'bold', 'underline') 199 | ,foreground='red') 200 | 201 | # specify size 202 | top1.geometry("400x250") 203 | 204 | 205 | # Create label 206 | label = Label(top1, 207 | text = "ARP POISONING", font='Serif 18 bold',foreground="lightgreen",background="#0e0d30").pack(pady=10) 208 | label = Label(top1, 209 | text = "Specify interface :").place(relx=0.1,rely=0.22,relheight=0.1,relwidth=0.3) 210 | global variable 211 | variable = StringVar(top1) 212 | variable.set(OPTIONS[0]) # default value 213 | 214 | w = OptionMenu(top1, variable,*OPTIONS) 215 | w.place(relx=0.5,rely=0.22,relheight=0.1,relwidth=0.3) 216 | 217 | 218 | 219 | 220 | # Create Exit button 221 | 222 | 223 | button1 = Button(top1, text = "Exit", style = 'W.TButton', 224 | command = top1.destroy,cursor="X_cursor") 225 | button1.place(relx=0.1,rely=0.5,relheight=0.1,relwidth=0.3) 226 | button = Button(top1, text = "Start", command = lambda : threading.Thread(target=sniffs(e)).start(), cursor="spider" 227 | ) 228 | button.place(relx=0.5,rely=0.5,relheight=0.1,relwidth=0.3) 229 | label = Label(top1, 230 | text = "Result :").place(relx=0.1,rely=0.8,relheight=0.1,relwidth=0.3) 231 | 232 | global g 233 | g = Entry(top1) 234 | g.place(relx=0.5,rely=0.8,relheight=0.12,relwidth=0.5) 235 | 236 | 237 | 238 | # create button to open toplevel2 239 | 240 | # Display untill closed manually 241 | top1.mainloop() 242 | 243 | 244 | 245 | 246 | 247 | # Create button to open toplevel1 248 | R1 = Button(root, text = "PROMISCUOUS MODE", command = open_Toplevel2,cursor="target" 249 | ) 250 | 251 | R1.pack(padx=40,pady=10,ipadx=40) 252 | 253 | 254 | R2 = Button(root, text = "ARP POISONING",command = open_Toplevel1,cursor="target") 255 | R2.pack(padx=40,pady=10,ipadx=55) 256 | #label1.grid() 257 | 258 | # position the button 259 | #R1.place(x = 20, y = 100) 260 | #R2.place(x =20, y = 200) 261 | 262 | #R3.place(x=20, y = 90) 263 | ourMessage ='“Technology trust is a good thing, but control is a better one.”' 264 | messageVar = Message(root, text = ourMessage) 265 | messageVar.config(bg='lightgreen') 266 | messageVar.pack() 267 | #messageVar.place(x = 400, y = 200) 268 | 269 | # Display untill closed manually 270 | root.mainloop() 271 | 272 | -------------------------------------------------------------------------------- /Detection of ARP spoofing and Promiscuous Mode/Project/imagess.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuladeepmantri/InternProjects/87aa5ab645725b8017aab2864f539f6a37ce9bc8/Detection of ARP spoofing and Promiscuous Mode/Project/imagess.jfif -------------------------------------------------------------------------------- /Detection of ARP spoofing and Promiscuous Mode/Project/project.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | import threading 3 | from tkinter import messagebox 4 | import psutil 5 | 6 | 7 | from PIL import ImageTk,Image 8 | from scapy.all import Ether, ARP, srp, sniff, conf 9 | from tkinter.ttk import * 10 | # Create the root window 11 | # with specified size and title 12 | root = Tk() 13 | root.configure(background="#0e0d30") 14 | root.title("Minimalistic tool") 15 | #root.geometry("520x300") 16 | 17 | 18 | 19 | label1 = Label(root, text = "Detection of Promiscuous mode and ARP poisoning", background="#000d1a" ,foreground="lightgreen", font="Serif 14 bold").pack(pady=10) 20 | background_image =ImageTk.PhotoImage(file='imagess.jfif') 21 | pic=Label(image=background_image).pack(fill="none",expand=True) 22 | 23 | 24 | 25 | 26 | 27 | 28 | e = threading.Event() 29 | 30 | 31 | addrs = psutil.net_if_addrs() 32 | OPTIONS = [ 33 | "----" 34 | ] 35 | for interface in addrs: 36 | OPTIONS.append(interface) 37 | 38 | def get_mac(ip): 39 | """ 40 | Returns the MAC address of `ip`, if it is unable to find it 41 | for some reason, throws `IndexError` 42 | """ 43 | p = Ether(dst='ff:ff:ff:ff:ff:ff')/ARP(pdst=ip) 44 | result = srp(p, timeout=3, verbose=True)[0] 45 | return result[0][1].hwsrc 46 | 47 | 48 | def process(packet): 49 | # if the packet is an ARP packet 50 | if packet.haslayer(ARP): 51 | # if it is an ARP response (ARP reply) 52 | if packet[ARP].op == 2: 53 | try: 54 | 55 | # get the real MAC address of the sender 56 | real_mac = get_mac(packet[ARP].psrc) 57 | print(real_mac) 58 | # get the MAC address from the packet sent to us 59 | response_mac = packet[ARP].hwsrc 60 | print(response_mac) 61 | # if they're different, definetely there is an attack 62 | if real_mac != response_mac: 63 | 64 | 65 | g.insert(0,'YOU ARE BEING ATTACKED') 66 | 67 | e.set() 68 | 69 | except IndexError: 70 | 71 | # unable to find the real mac 72 | # may be a fake IP or firewall is blocking packets 73 | pass 74 | 75 | 76 | 77 | #This is used to call sniff fuction 78 | def sniffs(e): 79 | g.delete(0,'end') 80 | 81 | iface = variable.get() 82 | 83 | sniff(store=False, prn=process, iface=iface, timeout = 15,stop_filter=lambda p: e.is_set()) 84 | 85 | if not e.is_set(): 86 | 87 | g.insert(0,'YOU ARE SAFE') 88 | e.clear() 89 | 90 | 91 | 92 | # this fuction is used to 93 | def promiscs(e1): 94 | try: 95 | y.delete(0, 'end') 96 | ip=e1.get() 97 | if ip == "": 98 | y.insert(0, 'ENTER IP ') 99 | return 100 | 101 | t=get_macs(ip) 102 | y.insert(0,'ON ') 103 | except: 104 | y.insert(0,'OFF') 105 | 106 | 107 | # here we send a packet with dst as 01:00:00:00:00:00 such that no other device in the network except for a promiscuous mode enabled device recives it. 108 | def get_macs(ip): 109 | promisc_test = Ether(dst='01:00:00:00:00:00')/ARP(pdst=ip) 110 | result = srp(promisc_test,timeout=3,verbose=True)[0] 111 | return result[0][1].hwsrc 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | # define a function for 2nd toplevel 127 | # window which is not associated with 128 | # any parent window 129 | 130 | 131 | def open_Toplevel2(): 132 | 133 | style = Style() 134 | 135 | # This will be adding style, and 136 | # naming that style variable as 137 | # W.Tbutton (TButton is used for ttk.Button). 138 | 139 | style.configure('W.TButton', font = 140 | ('calibri', 10, 'bold', 'underline') 141 | ,foreground='red') 142 | # Create widget 143 | top2 = Toplevel(bg='#0e0d30') 144 | 145 | # define title for window 146 | top2.title("Promiscious Mode") 147 | 148 | # specify size 149 | top2.geometry("450x250") 150 | # Create label 151 | label = Label(top2, 152 | text = "Promiscious Mode", font='Serif 18 bold',background="#0e0d30",foreground="lightgreen").pack() 153 | 154 | #bgimage =ImageTk.PhotoImage(Image.open("back.jpg")) 155 | #background2=Label(image=bgimage).pack() 156 | label = Label(top2, 157 | text = "IP Address :").place(relx=0.1,rely=0.2,relheight=0.1,relwidth=0.3) 158 | e1 = Entry(top2) 159 | e1.place(relx=0.5,rely=0.2,relheight=0.1,relwidth=0.3) 160 | l=e1.get() 161 | # Create exit button. 162 | exit = Button(top2,text = "Exit" , style = 'W.TButton', 163 | command = top2.destroy,cursor="X_cursor") 164 | exit.place(relx=0.1,rely=0.5,relheight=0.1,relwidth=0.3) 165 | start = Button(top2, text = "Start", command = lambda : threading.Thread(target=promiscs,args=[e1]).start(),cursor="spider" 166 | ) 167 | start.place(relx=0.5,rely=0.5,relheight=0.1,relwidth=0.3) 168 | result = Label(top2, 169 | text = "Result :").place(relx=0.1,rely=0.8,relheight=0.1,relwidth=0.3) 170 | global y 171 | y = Entry(top2,font='Serif 10 bold') 172 | y.place(relx=0.5,rely=0.8,relheight=0.1,relwidth=0.3) 173 | 174 | 175 | 176 | 177 | 178 | # Display untill closed manually. 179 | top2.mainloop() 180 | 181 | 182 | global progress 183 | progress = Progressbar(root, orient = HORIZONTAL, 184 | length = 100, mode = 'determinate') 185 | 186 | # define a function for 1st toplevel 187 | # which is associated with root window. 188 | 189 | def open_Toplevel1(): 190 | 191 | # Create widget 192 | top1 = Toplevel(bg='#0e0d30') 193 | style = Style() 194 | 195 | # Define title for window 196 | top1.title("ARP POISONING") 197 | style.configure('W.TButton', font = 198 | ('calibri', 10, 'bold', 'underline') 199 | ,foreground='red') 200 | 201 | # specify size 202 | top1.geometry("400x250") 203 | 204 | 205 | # Create label 206 | label = Label(top1, 207 | text = "ARP POISONING", font='Serif 18 bold',foreground="lightgreen",background="#0e0d30").pack(pady=10) 208 | label = Label(top1, 209 | text = "Specify interface :").place(relx=0.1,rely=0.22,relheight=0.1,relwidth=0.3) 210 | global variable 211 | variable = StringVar(top1) 212 | variable.set(OPTIONS[0]) # default value 213 | 214 | w = OptionMenu(top1, variable,*OPTIONS) 215 | w.place(relx=0.5,rely=0.22,relheight=0.1,relwidth=0.3) 216 | 217 | 218 | 219 | 220 | # Create Exit button 221 | 222 | 223 | button1 = Button(top1, text = "Exit", style = 'W.TButton', 224 | command = top1.destroy,cursor="X_cursor") 225 | button1.place(relx=0.1,rely=0.5,relheight=0.1,relwidth=0.3) 226 | button = Button(top1, text = "Start", command = lambda : threading.Thread(target=sniffs(e)).start(), cursor="spider" 227 | ) 228 | button.place(relx=0.5,rely=0.5,relheight=0.1,relwidth=0.3) 229 | label = Label(top1, 230 | text = "Result :").place(relx=0.1,rely=0.8,relheight=0.1,relwidth=0.3) 231 | 232 | global g 233 | g = Entry(top1) 234 | g.place(relx=0.5,rely=0.8,relheight=0.12,relwidth=0.5) 235 | 236 | 237 | 238 | # create button to open toplevel2 239 | 240 | # Display untill closed manually 241 | top1.mainloop() 242 | 243 | 244 | 245 | 246 | 247 | # Create button to open toplevel1 248 | R1 = Button(root, text = "PROMISCUOUS MODE", command = open_Toplevel2,cursor="target" 249 | ) 250 | 251 | R1.pack(padx=40,pady=10,ipadx=40) 252 | 253 | 254 | R2 = Button(root, text = "ARP POISONING",command = open_Toplevel1,cursor="target") 255 | R2.pack(padx=40,pady=10,ipadx=55) 256 | #label1.grid() 257 | 258 | # position the button 259 | #R1.place(x = 20, y = 100) 260 | #R2.place(x =20, y = 200) 261 | 262 | #R3.place(x=20, y = 90) 263 | ourMessage ='“Technology trust is a good thing, but control is a better one.”' 264 | messageVar = Message(root, text = ourMessage) 265 | messageVar.config(bg='lightgreen') 266 | messageVar.pack() 267 | #messageVar.place(x = 400, y = 200) 268 | 269 | # Display untill closed manually 270 | root.mainloop() 271 | 272 | -------------------------------------------------------------------------------- /Detection of ARP spoofing and Promiscuous Mode/documentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuladeepmantri/InternProjects/87aa5ab645725b8017aab2864f539f6a37ce9bc8/Detection of ARP spoofing and Promiscuous Mode/documentation.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | Welcome to my internship project repository on GitHub! 3 | 4 | This repository contains all of the projects that I completed during my internship program. Each project is organized into its own folder, with the necessary files and documentation included. 5 | -------------------------------------------------------------------------------- /TOMCAT-CTF/MYTOMCAT-CompleteExplanation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuladeepmantri/InternProjects/87aa5ab645725b8017aab2864f539f6a37ce9bc8/TOMCAT-CTF/MYTOMCAT-CompleteExplanation.pdf -------------------------------------------------------------------------------- /TOMCAT-CTF/MYTOMCAT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kuladeepmantri/InternProjects/87aa5ab645725b8017aab2864f539f6a37ce9bc8/TOMCAT-CTF/MYTOMCAT.pdf -------------------------------------------------------------------------------- /TOMCAT-CTF/README.md: -------------------------------------------------------------------------------- 1 | # TOMCAT_HOST 2 | This project demonstrates how to capture the flag of My TomCat Host. 3 | 4 | Requirements - 5 | 1. VirtualBox of your choice. 6 | 2. Kali Linux / ParrotOS 7 | -------------------------------------------------------------------------------- /TOMCAT-CTF/TOMCAT-DOWNLOAD.txt: -------------------------------------------------------------------------------- 1 | https://download.vulnhub.com/mytomcathost/My_Tomcat_Host.ova 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker --------------------------------------------------------------------------------