<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Study-Notes on May Meow</title>
    <link>https://maymeow.blog/tags/study-notes/</link>
    <description>Recent content in Study-Notes on May Meow</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2020, May Meow.</copyright>
    <lastBuildDate>Sun, 31 May 2026 15:21:06 +0200</lastBuildDate>
    <atom:link href="https://maymeow.blog/tags/study-notes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TCP/IP Three-Way Handshake</title>
      <link>https://maymeow.blog/notes/tcp-ip-three-way-handshake/</link>
      <pubDate>Sun, 31 May 2026 15:18:07 +0200</pubDate>
      <guid>https://maymeow.blog/notes/tcp-ip-three-way-handshake/</guid>
      <description>&lt;h1 id=&#34;-tcpip-three-way-handshake&#34;&gt;🤝 TCP/IP Three-Way Handshake&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;TCP stands for transmission Control Protocol&lt;/li&gt;&#xA;&lt;li&gt;similar to OSI model&lt;/li&gt;&#xA;&lt;li&gt;Consist 4 layers&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Application&lt;/li&gt;&#xA;&lt;li&gt;Transport&lt;/li&gt;&#xA;&lt;li&gt;Internet&lt;/li&gt;&#xA;&lt;li&gt;Network Interface&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Information is added to each layer (similar to OSI) in process called encapsulation&lt;/li&gt;&#xA;&lt;li&gt;it is connection-based - must establish connection before can send data&lt;/li&gt;&#xA;&lt;li&gt;guarantees that sent data will be received on the other end in process named &lt;strong&gt;Three-way handshake&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;some-most-important-tcp-packet-headers&#34;&gt;Some most important TCP packet headers&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Header&lt;/th&gt;&#xA;          &lt;th&gt;Description&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Source Port&lt;/td&gt;&#xA;          &lt;td&gt;This value is the port opened by the sender to send the TCP packet from. This value is chosen randomly (out of the ports from 0-65535 that aren&amp;rsquo;t already in use at the time).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Destination Port&lt;/td&gt;&#xA;          &lt;td&gt;This value is the port number that an application or service is running on the remote host (the one receiving data); for example, a webserver running on port 80. Unlike the source port, this value is not chosen at random.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Source IP&lt;/td&gt;&#xA;          &lt;td&gt;This is the IP address of the device that is sending the packet.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Destination IP&lt;/td&gt;&#xA;          &lt;td&gt;This is the IP address of the device that the packet is destined for.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Sequence Number&lt;/td&gt;&#xA;          &lt;td&gt;When a connection occurs, the first piece of data transmitted is given a random number. We&amp;rsquo;ll explain this more in-depth further on.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Acknowledgement Number&lt;/td&gt;&#xA;          &lt;td&gt;After a piece of data has been given a sequence number, the number for the next piece of data will have the sequence number + 1. We&amp;rsquo;ll also explain this more in-depth further on.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;💡 Checksum&lt;/td&gt;&#xA;          &lt;td&gt;This value is what gives TCP integrity. A mathematical calculation is made where the output is remembered. When the receiving device performs the mathematical calculation, the data must be corrupt if the output is different from what was sent.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Data&lt;/td&gt;&#xA;          &lt;td&gt;This header is where the data, i.e. bytes of a file that is being transmitted, is stored.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Flag&lt;/td&gt;&#xA;          &lt;td&gt;This header determines how the packet should be handled by either device during the handshake process. Specific flags will determine specific behaviours, which is what we&amp;rsquo;ll come on to explain below.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;three-way-handshake&#34;&gt;Three-way handshake&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;communicates using few special messages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;&lt;strong&gt;Step&lt;/strong&gt;&lt;/th&gt;&#xA;          &lt;th&gt;&lt;strong&gt;Message&lt;/strong&gt;&lt;/th&gt;&#xA;          &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;1&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;SYN&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;A SYN message is the initial packet sent by a client during the handshake. This packet is used to initiate a connection and synchronise the two devices together (we&amp;rsquo;ll explain this further later on).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;SYN/ACK&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;This packet is sent by the receiving device (server) to acknowledge the synchronisation attempt from the client.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;3&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;ACK&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The acknowledgement packet can be used by either the client or server to acknowledge that a series of messages/packets have been successfully received.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;4&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;DATA&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Once a connection has been established, data (such as bytes of a file) is sent via the &amp;ldquo;DATA&amp;rdquo; message.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;5&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;FIN&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;This packet is used to &lt;em&gt;cleanly (properly)&lt;/em&gt; close the connection after it has been complete.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;#&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;RST&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;This packet abruptly ends all communication. This is the last resort and indicates there was some problem during the process. For example, if the service or application is not working correctly, or the system has faults such as low resources.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;When one device send data with random number sequence other device need to agree with same number sequence for data to be send in correct order. Order is assinged after three steps&lt;/p&gt;</description>
    </item>
    <item>
      <title>OSI Model</title>
      <link>https://maymeow.blog/notes/osi-model/</link>
      <pubDate>Sun, 31 May 2026 14:02:48 +0200</pubDate>
      <guid>https://maymeow.blog/notes/osi-model/</guid>
      <description>&lt;h1 id=&#34;osi-model&#34;&gt;OSI Model&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;O&lt;/strong&gt;pen &lt;strong&gt;S&lt;/strong&gt;ystems &lt;strong&gt;I&lt;/strong&gt;nterconnection Model&lt;/li&gt;&#xA;&lt;li&gt;dictating how all networked devices will send, receive and interpret data&lt;/li&gt;&#xA;&lt;li&gt;consists of 7 layers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;the-model-layers&#34;&gt;The model (layers)&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;7. Application&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;determine how the user interact with the data&lt;/li&gt;&#xA;&lt;li&gt;Email clients, file browsers or chat application belongs here&lt;/li&gt;&#xA;&lt;li&gt;💡 Users interact with data trough GUI (Graphical user interface)&lt;/li&gt;&#xA;&lt;li&gt;DNS (Domain Name System) protocol also belongs here&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Translates web addresses to the IP addresses&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;6. Presentation&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;standardization - the data of one application needs to be handled the same way&lt;/li&gt;&#xA;&lt;li&gt;💡acts as translator for data and from the application layer&lt;/li&gt;&#xA;&lt;li&gt; data encryption occur here&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;5. Session&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;create and maintain the connection to other computer (When a connection is established, a session is created)&lt;/li&gt;&#xA;&lt;li&gt;responsible for closing the connection&lt;/li&gt;&#xA;&lt;li&gt;session &lt;em&gt;can&lt;/em&gt; contain &amp;ldquo;checkpoints&amp;rdquo;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;save bandwidth by only requiring send newest pieces of data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;data cannot travel over different sessions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;4. Transport&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;plays important part in transmitting data across network&lt;/li&gt;&#xA;&lt;li&gt;Data sent between devices follows 2 protocols&#xA;&lt;ul&gt;&#xA;&lt;li&gt;TCP&lt;/li&gt;&#xA;&lt;li&gt;UDP&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;3. Network&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;routing &amp;amp; re-assembly of data is part of this layer&lt;/li&gt;&#xA;&lt;li&gt;💡protocol of this layer determine what&amp;rsquo;s the &amp;ldquo;optimal&amp;rdquo; path for data to reach device&lt;/li&gt;&#xA;&lt;li&gt;💡 e.g. OSPF (Open Shortest Path First) and RIP (Routing Information Protocol)&lt;/li&gt;&#xA;&lt;li&gt;Deciding is based on the following&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What path is the shortest? I.e. has the least amount of devices that the packet needs to travel across.&lt;/li&gt;&#xA;&lt;li&gt;What path is the most reliable? I.e. have packets been lost on that path before?&lt;/li&gt;&#xA;&lt;li&gt;Which path has the faster physical connection? I.e. is one path using a copper connection (slower) or a fibre (considerably faster)?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;💡 everything here is dealt with via IP addresses&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;2. Data Link&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;focuses of the physical adresing of the transmission&lt;/li&gt;&#xA;&lt;li&gt;adds MAC address to the packet&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mac addresses are unique, set by manufacturer and can be spoofed&lt;/li&gt;&#xA;&lt;li&gt;💡 MAC address belongs to the network cards. Devices need network cards to connect to the network&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;present the data in format suitable for transmission&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;1. Physical&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;physical components of hardware&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;💡 Devices uses electrical signals to transfer data in a binary system&lt;/li&gt;&#xA;&lt;li&gt;💡 For example, ethernet cables are part of this layer&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;transport-protocols&#34;&gt;Transport Protocols&lt;/h2&gt;&#xA;&lt;h3 id=&#34;tcp&#34;&gt;TCP&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;💡&lt;strong&gt;Transmission Control protocol&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;designed with reliabailit and guarantee in mind&lt;/li&gt;&#xA;&lt;li&gt;reserves constant connection between devices for the ammout of time it takes for the data to be send and received&lt;/li&gt;&#xA;&lt;li&gt;incorporates error checking&lt;/li&gt;&#xA;&lt;li&gt;can guarantee that data sent from the small chunks in the session layer (layer 5) has then been received and reassembled in the same order.&lt;/li&gt;&#xA;&lt;li&gt;stateful - 3-way handshake&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Honeypots</title>
      <link>https://maymeow.blog/notes/honeypots/</link>
      <pubDate>Sun, 31 May 2026 11:15:24 +0200</pubDate>
      <guid>https://maymeow.blog/notes/honeypots/</guid>
      <description>&lt;h1 id=&#34;-honeypots&#34;&gt;🍯 Honeypots&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;vulnerable security tool designed to attract attackers and record the actions of adversaries&lt;/li&gt;&#xA;&lt;li&gt;can be used in a defensive role to alert administrators of potential breaches&lt;/li&gt;&#xA;&lt;li&gt;and/or to distract attackers away from real infrastructure&lt;/li&gt;&#xA;&lt;li&gt;collects data, tools and techniques&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;classification&#34;&gt;Classification&lt;/h2&gt;&#xA;&lt;h3 id=&#34;by-interactivity&#34;&gt;by Interactivity&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Low-Interaction&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;only capable of simulating the functions that are required to simulate a service and capture attacks against it&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Adversaries are not able to perform any post-exploitation activity&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Example:  &lt;a href=&#34;https://github.com/awhitehatter/mailoney&#34;&gt;mailoney&lt;/a&gt;,  &lt;a href=&#34;https://github.com/DinoTools/dionaea&#34;&gt;dionaea&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Medium Interaction&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;emulating both vulnerable services as well as the underlying OS, shell, and file systems&lt;/li&gt;&#xA;&lt;li&gt;ℹ️ the system presented to adversaries is a simulation,&#xA;&lt;ul&gt;&#xA;&lt;li&gt;it is usually not possible for to complete full range of post-exploitation activity&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;allows adversaries to complete initial exploits and carry out post-exploitation activity&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;For example: &lt;a href=&#34;https://github.com/cowrie/cowrie&#34;&gt;Cowrie&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;High-Interaction&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fully complete systems that are usually Virtual Machines that include deliberate vulnerabilities&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Adversaries should be able (but not necessarily allowed) to perform any action against the honeypot as it is a complete system&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;⚠️ Needs to be carefully managed, otherwise they can be used to attack other systems&lt;/li&gt;&#xA;&lt;li&gt;For example Cowrie as an SSH Proxy&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;by-deployment-location&#34;&gt;by Deployment location&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Internal Honeypots&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;deployed inside LAN&lt;/li&gt;&#xA;&lt;li&gt; for threats originating from the inside, for example, attacks originating from trusted personnel or attacks that by-parse firewalls like phishing attack&lt;/li&gt;&#xA;&lt;li&gt;⚠️ should never be compromised&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;External Honeypots&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Deployed on the internet&lt;/li&gt;&#xA;&lt;li&gt;Monitor attacks outside LAN&lt;/li&gt;&#xA;&lt;li&gt;Collects much more data since they are effectively guaranteed to be under attack at all times&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;typical-behavior-of-bots&#34;&gt;Typical behavior of bots&lt;/h2&gt;&#xA;&lt;p&gt;ℹ️ &lt;strong&gt;Majority of typical SSH deployemnts are automated&lt;/strong&gt;. Most of the post-exploitation activity that takes place after a bot gains initial access to the honeypot will follow a broad pattern.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
