Posts

Showing posts from January, 2024

Regular expressions - Notes

Image
  Regular expressions - Notes Introduction What are regular expressions? Regular expressions (or Regex) are patterns of text that you define to search documents and match exactly what you're looking for. Why should I learn how to use them? Even if you won't need them sooner or later, it's a great tool to know how to use. It will make you more capable in CTF's, and potentially a better developer if that's a goal you have. You spend a little time learning it and save yourself lots of time in the long run by using it. I know all that, but I'm lazy. This is a lazy person's tutorial. There's a little reading, and then you  learn by doing . Where's the 'Deploy' button? There's no machine to deploy.  There are two ways to test your expressions. Either: create a text file with some test paragraphs (in a Unix machine) and then use  egrep <pattern> <file>  to see what matches and what doesn't, or use an online editor like  https://r...

Nmap Live Host Discovery - Notes

Image
Nmap Live Host Discovery - Notes The following shows steps that  Nmap  carries out to discover the systems that are online before port-scanning. This stage is crucial because trying to port-scan offline systems will only waste time and create unnecessary noise on the network. The ff. presents the different approaches that  Nmap  uses to discover live hosts. In particular: ARP  scan: This scan uses ARP requests to discover live hosts ICMP scan: This scan uses ICMP requests to identify live hosts TCP /UDP ping scan: This scan sends packets to TCP ports and UDP ports to determine live hosts. Let's also introduce two scanners,  arp-scan  and  masscan , and explain how they overlap with part of Nmap’s host discovery. We will use  Nmap  to discover systems and services actively. Nmap was created by Gordon Lyon (Fyodor), a network security expert and open source programmer. It was released in 1997. Nmap, short for Network Mapper, is free, open-...