<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Root Access]]></title><description><![CDATA[Root Access]]></description><link>https://rootaccess.net/</link><image><url>https://rootaccess.net/favicon.png</url><title>Root Access</title><link>https://rootaccess.net/</link></image><generator>Ghost 5.46</generator><lastBuildDate>Tue, 22 Jul 2025 15:11:14 GMT</lastBuildDate><atom:link href="https://rootaccess.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Subnet Shenanigans]]></title><description><![CDATA[<p>I was recently asked about subnets and masks and what they are. &#xA0;I&apos;m not sure I did a spectacular job explaining them on the spot. &#xA0;It did get me thinking that it would make for a good blog post and would be a good excuse to</p>]]></description><link>https://rootaccess.net/subnet-shenanigans/</link><guid isPermaLink="false">669fff48500fca04dcad979b</guid><dc:creator><![CDATA[John Cardeccia]]></dc:creator><pubDate>Tue, 23 Jul 2024 21:42:05 GMT</pubDate><media:content url="https://rootaccess.net/content/images/2024/07/Screenshot-2024-07-23-145813.png" medium="image"/><content:encoded><![CDATA[<img src="https://rootaccess.net/content/images/2024/07/Screenshot-2024-07-23-145813.png" alt="Subnet Shenanigans"><p>I was recently asked about subnets and masks and what they are. &#xA0;I&apos;m not sure I did a spectacular job explaining them on the spot. &#xA0;It did get me thinking that it would make for a good blog post and would be a good excuse to refresh myself on the topic.</p><p>Let&apos;s start with the obvious question of &quot;what is a subnet?&quot;. &#xA0;A subnet is really just the subdivision of a larger network into smaller networks. &#xA0;Pretty straight forward but now you might be thinking &quot;Great! &#xA0;Why do we need them?&quot;. &#xA0;Excellent question. &#xA0;</p><p>IPv4 or Internet Protocol Version 4 has about 4.3 billion unique IP addresses. &#xA0;1.0.0.0 to 255.255.255.255. &#xA0;These addresses are how computers find each other, like a mailing address. &#xA0;4 billion might sound like a lot and it certainly sounded like a lot to the creators of the internet (TLDR; it wasn&apos;t). &#xA0;What they did was break that range of IP address up into Classes A, B, C, D, E. &#xA0;Class A networks are the largest, able to handle over 16,000,000 hosts per network. &#xA0;Class B are smaller, each class B network can have over 65,000 hosts. &#xA0;Finally we have the good ol&apos; Class C network which can have 256 hosts. &#xA0;Classes D and E are all specialized and we&apos;re really just going to ignore them here. &#xA0; The issue here is that 16 million hosts, or even 65,000 hosts, is an awful lot for a single network. &#xA0;If a company is handed a Class A or B network and only uses a few thousand IP addresses then that&apos;s literally thousands or millions of IP addresses wasted. &#xA0;As a result the internet quickly started to run low on available IP addresses. &#xA0;Two things saved IPv4; subnetting is the first, NAT is the second (and deserves its own blog post). &#xA0;The size of the networks also made them inefficient and difficult to manage. &#xA0;Class A and Class B networks are massive, and a packet sent from one device will have a harder time finding the correct destination device because of the sheer size of the network. &#xA0;There are other problems but, we&apos;ll stick with these two for simplicity.</p><p>Lets have a look at an IP address.</p><!--kg-card-begin: html--><div style="text-align:center;">1.0.0.0</div><!--kg-card-end: html--><p>This is a Class A network and it is made up of four &quot;octets&quot; starting at 1.0.0.0 and ending at 1.255.255.255. &#xA0;The &quot;1&quot; in this example is the Network ID and it never changes. &#xA0;The Network ID defines the specific network the devices are on. &#xA0;The last three octets make up the Host ID and these specify each device on the network. &#xA0;To make this network of over 16 million possible host IP addresses more manageable and responsive, the owner of the network might take 1.5.28.0 to 1.5.28.255 and make that its own network, or &quot;subnet&quot;. &#xA0;Here the first three octets will never change, so when a packet is sent from a device with the IP of 1.5.28.12 to a device with the IP of 1.5.28.46, well now there are only 256 possible addresses so the network much smaller and can work more efficiently.</p><p>Wait you say, &quot;how can the router know which set of numbers are the Network ID and which make up the Host ID?&quot; &#xA0;That&apos;s where the Subnet Mask comes in. &#xA0;It clarifies for the switch or router which is which. &#xA0;In our example network of 1.5.28.X the subnet mask would be &quot;255.255.255.0&quot;. &#xA0;For each octet of the IP address that has a corresponding octet of &quot;255&quot; in the subnet mask, the router knows that it&apos;s part of the Network ID and that the Host ID will correspond to the subnet mask value(s) of &quot;0&quot;. &#xA0;In our earlier &quot;1.0.0.0&quot; example the subnet mask would be &quot;255.0.0.0&quot;.</p><p>There is plenty more to this. &#xA0;Why do these numbers range from 0 to 255, why are they called octets, what is NAT, and we haven&apos;t even mentioned CIDR. &#xA0;These all all good questions and worthy of seperate blog posts. &#xA0;</p><p>For now though, the TLDR;</p><p>Subnets are smaller networks made out of a larger one. &#xA0;Subnet masks allow routers and switches to identify which part of an IP address belongs to the Network ID and which part belongs to the Host ID. &#xA0;For example the IP of &quot;192.168.1.1&quot; with a subnet mask of &quot;255.255.255.0&quot;. &#xA0;Each octet of the subnet mask with a value of &quot;255&quot; corresponds to an octet of the same position in the IP address and indicate it&apos;s part of the Network ID, &quot;192.168.1&quot;. &#xA0;An octet of &quot;0&quot; in the subnet mask will indicate that the corresponding octet of the IP is part of the Host ID. &#xA0;In this case, the final octet of the IP address, &quot;1&quot;.</p><h3 id="references">References</h3><p><a href="https://www.cloudflare.com/learning/network-layer/what-is-a-subnet/">What is a Subnet</a> - This is an excellent article from Cloudflare regarding subnets.</p><p><a href="https://www.geeksforgeeks.org/introduction-to-subnetting/">Introduction to Subnetting</a> - Another solid article about subnets, this one by GeeksforGeeks.</p><p><a href="https://youtu.be/5WfiTHiU4x8?si=YVYJB3YOZShmLbFb">You Suck at Subnetting</a> - This is a phenomenal series by &#xA0;<a href="https://www.networkchuck.com">Network Chuck</a> that covers pretty much everything and with better detail and examples. &#xA0;I highly recommend watching the whole playlist.</p>]]></content:encoded></item><item><title><![CDATA[Clients & Servers & Sockets, Oh My!]]></title><description><![CDATA[<p>Thus far the Practical Ethical Hacking course - after advising anyone watching to have some basic network knowledge - has really taken its time walking students through each topic. &#xA0;Halfway through the Python module of the course it finally hit a point where an understanding how clients and servers</p>]]></description><link>https://rootaccess.net/sockets-in-a-nutshell/</link><guid isPermaLink="false">645dcd4b500fca04dcad92db</guid><dc:creator><![CDATA[John Cardeccia]]></dc:creator><pubDate>Fri, 12 May 2023 07:20:17 GMT</pubDate><media:content url="https://rootaccess.net/content/images/2023/05/pexels-brett-sayles-2881232.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://rootaccess.net/content/images/2023/05/pexels-brett-sayles-2881232.jpg" alt="Clients &amp; Servers &amp; Sockets, Oh My!"><p>Thus far the Practical Ethical Hacking course - after advising anyone watching to have some basic network knowledge - has really taken its time walking students through each topic. &#xA0;Halfway through the Python module of the course it finally hit a point where an understanding how clients and servers communicate would helpful. &#xA0;For anyone interested in taking this course that hasn&apos;t had much exposure to networking principals, let me give you some highlights about clients, servers, and sockets, so that you can get through this module of the class understanding everything that happened.</p><h3 id="the-client-server-model">The Client-Server Model</h3><p>The first quick concept here is called the client-server model. &#xA0;Fairly straightforward; there is a client ( which is the user - aka you - and whatever application you&apos;re running ), and there is a server that the client is trying to connect to and get information from. &#xA0;That&apos;s the basic gist of the client-server model. &#xA0;Client connects to server and asks for something, server responds.</p><p>If you want to, you can think of this as if it were two people having a conversation. &#xA0;Just as in real life, the person initiating the conversation ( the client ) needs to find the person that they want to talk to ( the server), and that person has to be willing to listen. &#xA0;Let&apos;s tackle the client first:</p><h3 id="the-client">The Client</h3><p>The client needs to find the server that it wants to talk with, to do this it needs two things; an <strong>IP</strong> address and a <strong>port</strong> number.</p><p>Think of the IP address as the location of the server on the internet, its home address if an analogy helps.</p><p>Once you have an IP address and you&apos;ve made your way to where the server is at, you need only to knock on the door - except this is actually a massive apartment building. &#xA0;There are literally thousands of doors; you&apos;ve got some time to kill so you count them all and find there are exactly 65,535. &#xA0;How do you know which one to knock on? &#xA0;Here is where the port number comes in to play, this number represents the door behind which the server is waiting and listening for a knock.</p><p>When you combine an IP address and port number into a single item - an &quot;object&quot; - you have a <strong>socket</strong>. &#xA0;With this socket in hand, the client is ready to connect with the server.</p><h3 id="the-server">The Server</h3><p>This is going to be much shorter then the client section, really the client has done all the work. &#xA0;The server is just waiting at home for someone to come knocking. &#xA0;When a client finds the server (using its IP address), and knocks on the right door (using the port number), the server responds by accepting the connection - basically opening the door - and then handing over what was requested.</p><h3 id="the-weeds">The Weeds</h3><p>If that made sense to you then you probably have enough understanding to make it as far as I&apos;ve made it in the course. &#xA0;We&apos;ll see how much more complicated the networking gets as the course progresses, so far though the presenter really has taken care to explain what&apos;s been happening - mostly this post is just adding some context.</p><p>This last bit isn&apos;t strictly necessary to understand the current Python module, but if you want a little something extra here it is.</p><p>This module has an assignment to follow along as the presenter writes a simple port scanner, and there are some Python commands and syntax I can explain. &#xA0;The presenter goes over some of this, but a little repetition while learning never hurts. &#xA0;Here we go:</p><p>- <strong>socket.gethostbyname():</strong> This function accepts a value, either an IP address or a hostname ( www.google.com would be an example of a hostname ). &#xA0;If an IP address is passed in then it returns that same string, if a hostname is passed in then it finds that host&apos;s IP address and returns that value.</p><p>- <strong>socket.socket( socket.AF_INET, socket.SOCK_STREAM ):</strong> This one is a bit of a mouth-full. &#xA0;What&apos;s happening here is a new socket object is being created. &#xA0;We can see this object has the parameters of socket.AF_INET and socket.SOCK_STREAM.</p><p>This first parameter, socket.AF_INET, is telling this newly created socket that it needs to be ready to take in an IPv4 IP address.</p><p>The second parameter, socket.SOC_STREAM, tells the socket that its second value will be an integer representing a port number.</p><p>- <strong> socket.connect_ex( </strong><em><strong>address </strong></em><strong>):</strong> This function is used by the client to connect to the server. &#xA0;The <em>address</em> parameter is actually a tuple that contains both the IP address of the sever, as well as the port number it&apos;s listening on. &#xA0;Lastly, if a connection attempt is successful then this function will return a zero. &#xA0;If anything other than a zero gets returned, the connection has failed and the returned number identifies the particular error.</p><h3 id="closing"><strong>Closing</strong></h3><p>That should be plenty to make sure you can follow along with the Python module, at least as far as the Port Scanner assignment - which is as far as I&apos;ve made it. &#xA0;Hopefully this has been helpful to anyone else taking the course. &#xA0;If...more likely when...this course wades further into the weeds of networking I&apos;ll make another post.</p><h3 id="references">References</h3><p><a href="https://docs.python.org/3/library/socket.html">Python 3.11.3 Documentation</a> - Additional details on socket objects and the functions used.</p><p><a href="https://www.geeksforgeeks.org/client-server-model/">Client-Server Model</a> - GeeksforGeeks for information about the client-server model.</p><p><a href="https://www.digitalocean.com/community/tutorials/python-get-ip-address-from-hostname">Python - Get IP Address from Hostname</a> - DigitalOcean for a deeper dive into the gethostbyname function.</p>]]></content:encoded></item><item><title><![CDATA[TCM Academy]]></title><description><![CDATA[<p>Howdy everyone,</p><p>I started a new course this week from the TCM Security Academy; <a href="https://academy.tcm-sec.com/p/practical-ethical-hacking-the-complete-course">Practical Ethical Hacking</a>. &#xA0;I learned about the course from a <a href="https://youtu.be/Zfz3ZN2dTDM">recent episode</a> on David Bombal&apos;s YouTube channel, it one of a trilogy of courses recommended by <a href="https://rana-khalil.gitbook.io/hack-the-box-oscp-preparation/">Rana Khalil</a> - David&apos;s guest</p>]]></description><link>https://rootaccess.net/tcm-academy/</link><guid isPermaLink="false">645d6658500fca04dcad91db</guid><dc:creator><![CDATA[John Cardeccia]]></dc:creator><pubDate>Thu, 11 May 2023 22:48:39 GMT</pubDate><media:content url="https://rootaccess.net/content/images/2023/05/convert.png" medium="image"/><content:encoded><![CDATA[<img src="https://rootaccess.net/content/images/2023/05/convert.png" alt="TCM Academy"><p>Howdy everyone,</p><p>I started a new course this week from the TCM Security Academy; <a href="https://academy.tcm-sec.com/p/practical-ethical-hacking-the-complete-course">Practical Ethical Hacking</a>. &#xA0;I learned about the course from a <a href="https://youtu.be/Zfz3ZN2dTDM">recent episode</a> on David Bombal&apos;s YouTube channel, it one of a trilogy of courses recommended by <a href="https://rana-khalil.gitbook.io/hack-the-box-oscp-preparation/">Rana Khalil</a> - David&apos;s guest for the episode. &#xA0;I&apos;m really enjoying the course and I plan to complete all three.</p><p>The course recommends some prior exposure to networking concepts - fortunately I just finished a networking course this semester - and so far there haven&apos;t been any concepts that required my diving down an internet rabbit hole...and I can&apos;t decide if I&apos;m a little sad about that or not. &#xA0;I&apos;m about 15% through the material, meaning that could easily (or hopefully?) change. &#xA0;As it stands, the course has been a high level look at networking, set up for virtual machines, and quite a bit of Linux and Python review. &#xA0;The course doesn&apos;t throw the student into the deep end. &#xA0;The videos walk the student through everything step by step, explaining not just the &quot;how&quot; but the &quot;why&quot;.</p><p>There has been only one single hangup so far, it was with syntax during the bash scripting segment. &#xA0;There was a &quot;for&quot; loop constructed as:</p><p>&#x2003;&#x2003;&#x2003;&#x2003;&#x2003;&#x2003;&#x2003;&quot; for ip in &apos;seq 1 254&apos;; do &quot;</p><p>This didn&apos;t work for me, when running the script the loop wasn&apos;t counting from 1 to 254 and was simply assigning the string &quot;seq 1 254&quot; to the &quot;ip&quot; variable. &#xA0;After some trial, some error, and some Googling, I made a small correction and it worked.</p><p>&#x2003;&#x2003;&#x2003;&#x2003;&#x2003;&#x2003;&quot; for ip in $(seq 1 254); &quot;</p><p>I&apos;m still not sure why the presenter&apos;s syntax didn&apos;t work for me. &#xA0;Perhaps it has something to do with the version of Kali Linux that they are running compared to my own?</p><p>Hopefully the next post will have something more exciting - I&apos;m coming up on the section about Reconnaissance and I cannot wait!</p><p>Oh, before I sign off on this much-too-long blog post - if anyone hasn&apos;t checked out David Bombal&apos;s YouTube channel then stop reading and go there now. &#xA0;It&apos;s an incredible source of both information and inspiration. &#xA0;It&apos;s linked up in the first paragraph of this post.</p>]]></content:encoded></item><item><title><![CDATA[Howdy World!]]></title><description><![CDATA[<p>It&apos;s said that the best way to learn something is to teach it - and I want to learn penetration testing. &#xA0;I won&apos;t exactly be teaching, but that&apos;s the general idea. &#xA0;I&apos;ll be making posts about the courses, videos, and</p>]]></description><link>https://rootaccess.net/howdy-world/</link><guid isPermaLink="false">6453e57421ee292f515e6f0f</guid><dc:creator><![CDATA[John Cardeccia]]></dc:creator><pubDate>Thu, 04 May 2023 17:03:48 GMT</pubDate><media:content url="https://rootaccess.net/content/images/2023/05/alexander-shatov-DHl49oyrn7Y-unsplash.png" medium="image"/><content:encoded><![CDATA[<img src="https://rootaccess.net/content/images/2023/05/alexander-shatov-DHl49oyrn7Y-unsplash.png" alt="Howdy World!"><p>It&apos;s said that the best way to learn something is to teach it - and I want to learn penetration testing. &#xA0;I won&apos;t exactly be teaching, but that&apos;s the general idea. &#xA0;I&apos;ll be making posts about the courses, videos, and books I&apos;ve been watching and reading, and what it is I&apos;ve been learning.</p><p>My hope is that by writing about it, by thinking about the material repeatedly, it will help me to learn and understand it, and just maybe someone else on the internet will be able to pick up a few things here along with me.</p><p>This was merely my obligatory introductory post, but to anyone that happened to stumble onto this post, maybe I&apos;ll see you again shortly!</p>]]></content:encoded></item></channel></rss>