<?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"><channel><title><![CDATA[Secure By Habit]]></title><description><![CDATA[Secure By Habit]]></description><link>https://securebyhabit.com</link><image><url>https://cdn.hashnode.com/uploads/logos/69f41a07909e64ad076864f8/45383d0b-c098-412b-acd9-289936358309.png</url><title>Secure By Habit</title><link>https://securebyhabit.com</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 17:40:05 GMT</lastBuildDate><atom:link href="https://securebyhabit.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Week 5: Short Break & Python]]></title><description><![CDATA[I started the week by working on the "Apply Discount Function" lab. I was so confused at first because I couldn't use a parameter outside of the custom function then I figured I have to use conditiona]]></description><link>https://securebyhabit.com/week-5-short-break-python</link><guid isPermaLink="true">https://securebyhabit.com/week-5-short-break-python</guid><dc:creator><![CDATA[Mariana]]></dc:creator><pubDate>Mon, 08 Jun 2026 01:19:40 GMT</pubDate><content:encoded><![CDATA[<p>I started the week by working on the "Apply Discount Function" lab. I was so confused at first because I couldn't use a parameter outside of the custom function then I figured I have to use conditionals inside the function. I did that but I also forgot how to check for the type. I incorrectly used the type() function but after some searching I remembered about the isinstance function. Here is how to use that isinstance function:</p>
<p>if not isinstance(price, (int or float)):<br />print('The price should be a number')</p>
<p>It checks if the parameter is an int or float before stating it isn't a number. At some point I realized I don't need to include the 'or' inside the parenthesis. I removed and replaced it with a comma. I couldn't figure out why my code still wasn't accepted so I searched around for an explanation and watched a few videos. Eventually I realized I had placed discount = discount/100 at the very beginning of the custom function so I moved it to the end. Here is my final code that passed:</p>
<p>def apply_discount(price,discount):</p>
<p>    if not isinstance(price, (int, float)):</p>
<p>       return 'The price should be a number'</p>
<p>    elif not isinstance(discount, (int, float)):  </p>
<p>        return 'The discount should be a number'</p>
<p>    elif price &lt;= 0:</p>
<p>        return 'The price should be greater than 0'</p>
<p>    elif discount &lt; 0 or discount &gt; 100:</p>
<p>        return 'The discount should be between 0 and 100'</p>
<p>    else:</p>
<p>        discount = discount/100</p>
<p>        return price - (price * discount)</p>
<p>I learned a lot in that workshop. Then I moved on to 'Build a Caesar Cipher.' I've been wanting to decode a cipher! So building one will be a good start.</p>
<p>I completed the first five steps, but then I couldn't make time to continue. I was pretty confused when I started building cause I forgot about string slicing. I had to check my notes over and over to find what I was missing. Eventually it clicked so my notes were definitely helpful. Next week I'll finish out the Python basics and start the <a href="https://tryhackme.com/room/networkservices">Network Services THM module</a>. Hopefully I can also make the packet sniffer, but I might have to study a bit more Python.</p>
]]></content:encoded></item><item><title><![CDATA[Week 4: Python Foundations]]></title><description><![CDATA[This week I focused on learning Python; it's gonna take me at least another two weeks to get through the whole course. I'm close to finishing the basics; I just need to do the last workshop, lab, revi]]></description><link>https://securebyhabit.com/week-4-python-foundations</link><guid isPermaLink="true">https://securebyhabit.com/week-4-python-foundations</guid><dc:creator><![CDATA[Mariana]]></dc:creator><pubDate>Sat, 30 May 2026 00:45:29 GMT</pubDate><content:encoded><![CDATA[<p>This week I focused on learning Python; it's gonna take me at least another two weeks to get through the whole <a href="https://www.freecodecamp.org/learn/python-v9/">course</a>. I'm close to finishing the basics; I just need to do the last workshop, lab, review, and quiz. There are 7 more THM modules I want to go over. Next week, I'll finish out the Python basics to see if I can make the packet sniffer and start the <a href="https://tryhackme.com/room/networkservices">Network Services THM module</a>. Anyways, here are my Python notes so far:</p>
<p>Integers and floats don't only store numeric data, they also store math. Integers and floats can be positive or negative. To add two integers, simply assign a number to a variable then add two variables like so:</p>
<p>int_1 = 20</p>
<p>int_2 = 20</p>
<p>sum_ints = int_1 + int_2</p>
<p>print('Integer Addition:', sum_ints)</p>
<p>In other words, you assign the addition of two variables to another variable, just use the plus operator. And use the minus operator when subtracting:</p>
<p>int_1 = 20</p>
<p>int_2 = 20</p>
<p>diff_ints = int_1 - int_2</p>
<p>print('Integer Subtraction:', diff_ints)</p>
<p>To multiply, use the asterisk operator. To divide, use the forward slash (/) operator. The same is done for floats. Also, if an integer and float are combined, a float is printed.</p>
<p>Then there's the modulo operator %, which returns the remainder when a value on the left is divided by the value on the right. Next, they explained that the two forward slashes (//) divide two numbers and return the greatest integer that's less than or equal to the result. So if it's a float, it still returns a float but only the greatest part, like 12.0 // 5.4 = 2 instead of 2.2222</p>
<p>To get the exponentiation, use the double asterisk (**) operator. Also, long infinite numbers are rounded, so there might be minor errors at the end. To round to a specific number of decimals, use round(int_1, x). The x is the number of decimals to request. For example:</p>
<p>int_1 = 3.567</p>
<p>rounded_int_1 = round(int_1, 1)</p>
<p>print(rounded_int_1) # 3.6</p>
<p>abs() = absolute value of a number</p>
<p>pow() = rasies number to power of another</p>
<p>Augmented assignments are when an operation is applied to a different value from the variable, and the result is stored in the same variable. In other words, it's to add without repeating the variable name. For example:</p>
<p>variable = value is the same as variable = variable  value</p>
<p>my_var = 10</p>
<p>my_var += 5 (instead of my_var = my_var +5)</p>
<p>print(my_var) (prints 15)</p>
<p>Any operator can be used like that; also, if a string is used and then a (* = ) then it repeats the string however many times it is multiplied by.</p>
<p>Then I worked on building a bill splitter. I got confused at the halfway mark because I couldn't figure out how to print a float with a string. I went over last week's notes and read that a string can't concatenate with a number but that a number can be turned into a string by using str(). And it worked! Then I tried the next step with str(), but it wouldn't accept the answer so I had to use the f'Here's a string: {variable}' option.</p>
<p>Conditional statements have comparison operators, which compares values and returns a boolean value.</p>
<p>== checks if two values are equal</p>
<p>!= checks if two values aren't equal</p>
<p>&gt; checks if the left value is greater than the right</p>
<p>&lt; checks if the left value is less than the right</p>
<p>&gt;= checks if the left value is greater than or equal to the right</p>
<p>&lt;= checks if the left value is less than or equal to the right</p>
<p>Then there are the if statements, which have a condition that must be true for the code to run. The condition can be set to 'pass' as a placeholder. Indentations determine code blocks to signal what belongs where. Four spaces are normally recommended for indentations, but any amount can be used as long as they're used consistently.</p>
<p>There's also the else statement, which prints something else if the first statement is false. Example:</p>
<p>If condition: pass</p>
<p>else pass</p>
<p>Nothing else can be placed between if and else. To further extend the statement, a elif (else if) can be used after else.</p>
<p>Nested conditional statements help compare multiple values at once. For example, it can check two conditions before printing something.</p>
<p>Also, every value in Python has a built-in Boolean value for logical contexts. For example, None, False, Int 0, Float 0.0, and empty strings "" are considered falsy. All other values that are not zero numbers or empty strings are truthy. To check the bool value, simply use (bool(value)).</p>
<p>There are three Boolean operators in Python: 'and', 'or', and 'not'. These operators allow the combination of multiple expressions to create more complex decisions.</p>
<p>The 'and' operator is a short-circuit operator, which checks values left to right and only returns a truthy value if both conditions are true. Otherwise, it returns a falsy value. For example, is_citizen = True and age = 25 are both truthy values, so print(is_citizen and age) would print the true value of 25.</p>
<p>The 'or' operator, also a short-circuit, returns a truthy value as long as one of the values is true. For example, age = 9 and is_employed = false, then print(age or is_employed) would return 9.</p>
<p>The 'not' operator changes values to their opposite value so a false value would become true.</p>
<p>Then I built a movie ticket booking calculator. I forgot to place a colon after the if condition, but it was fixed easily. At some point I had to write an 'or' conditional but couldn't join a string to a bool until I used == instead of just the = sign. Also learned that parentheses can be used to group conditions and control the order they are followed.</p>
<p>Afterward, I was tasked with building a weather planner. Initially, I didn't use an elif branch cause I didn't really understand them. After reading the lesson on conditionals again, I understood that elif works by testing any number of conditions before arriving at a conclusion if all the conditions aren't satisfied. I also learned I can place regular if - else statements within an elif. And that if nothing is printing, then the code is following the lack of else statements. I had a lot of trouble because I forgot to add the last else condition to this block:</p>
<p>elif distance_mi &gt; 1 and distance_mi &lt;= 6:</p>
<p>if has_bike == True and is_raining != True:</p>
<p>print('True')</p>
<p>else:</p>
<p>print('False')</p>
<p>I thought it would just assume to print the opposite, but it is a string so to the computer there is no opposite. Anyways, here's the full code I wrote:</p>
<p>distance_mi = 2</p>
<p>is_raining = True</p>
<p>has_bike = False</p>
<p>has_car = False</p>
<p>has_ride_share_app = False</p>
<p>if distance_mi == 0:</p>
<p>print('False')</p>
<p>elif distance_mi &lt;= 1 and is_raining != True:</p>
<p>print('True')</p>
<p>elif distance_mi &gt; 1 and distance_mi &lt;= 6:</p>
<p>if has_bike == True and is_raining != True:</p>
<p>print('True')</p>
<p>else:</p>
<p>print('False')</p>
<p>elif distance_mi &gt; 6:</p>
<p>if has_car or has_ride_share_app:</p>
<p>print('True')</p>
<p>else:</p>
<p>print('False')</p>
<p>else:</p>
<p>print('False')</p>
<p>I'm very happy my code eventually passed. At first I didn't even think it was missing that else conditional and pressed check code out of habit, but it worked!</p>
<p>Then I went over the lesson on functions, which are reusable pieces of code like the print() function. And input() prompts the user for input. For example, age = ('What is your age?') will ask a user to input a response. Custom functions can also be written by using the keyword def, the name of the function, parentheses, and a colon, like so:</p>
<p>def greeting ():</p>
<p>print('Hi everyone! Today is a wonderful day to learn some coding!')</p>
<p>greeting() would then print the whole string.</p>
<p>There are also custom functions with parameters. For example, def sum (a,b): print(a + b). The a and b are parameters, which are placeholders for a value that will change. Those values, the ones you would assign to the parameters a or b, are called arguments. So an argument could be 3 or 4, etc.</p>
<p>The return keyword is used to exit the function and return a value. For example, if naming a custom sum something specific like my_sum = sum(4,4) then sum (a,b) has to say return a + b instead of print(a+b) in order for it to properly calculate the sum. Otherwise, it prints None.</p>
<p>Scope basically states the lifetime of a variable. The LEGB rule helps determine the scope of a variable:</p>
<p>Local Scope: variables defined in the functions or classes. In other words, the variable can only be accessed within that function or class. For example:</p>
<p>def my_function():</p>
<p>my_var = 10</p>
<p>print(my_var)</p>
<p>Enclosing Scope: variables defined in enclosing or nested functions can only be accessed from said nested function. The keyword nonlocal can make a non-local variable. For example, add the nonlocal keyword before the variable inside a nested function:</p>
<p>def inner_func():</p>
<p>nonlocal res</p>
<p>res = 'How are you?'</p>
<p>Global Scope: variables defined at the top level of the module or file. It means a variable can be accessed from anywhere. Local variables inside a function can also become global by using the global keyword. The keyword can also be used to modify a variable. For example, if the variable was set to 10 at the beginning and later wants to be changed inside a function, then just use global like so:</p>
<p>global my_var</p>
<p>my_var = 20</p>
<p>Built-in Scope: reserved names in Python for predefined functions, modules, keywords, and objects. Such as str(), type(), isinstance(), etc.</p>
]]></content:encoded></item><item><title><![CDATA[Week 3: Networking Tools and Learning Python]]></title><description><![CDATA[This week I went over the last three tools from the Introductory Networking THM module. The first tool I explored was called Traceroute. It maps the path a request takes when heading to a target machi]]></description><link>https://securebyhabit.com/week-3-networking-tools-and-learning-python</link><guid isPermaLink="true">https://securebyhabit.com/week-3-networking-tools-and-learning-python</guid><dc:creator><![CDATA[Mariana]]></dc:creator><pubDate>Sat, 23 May 2026 23:46:10 GMT</pubDate><content:encoded><![CDATA[<p>This week I went over the last three tools from the <a href="https://tryhackme.com/room/introtonetworking">Introductory Networking</a> THM module. The first tool I explored was called Traceroute. It maps the path a request takes when heading to a target machine since it has to pass by many different servers.</p>
<ul>
<li><p>This is what is typed into the terminal: traceroute</p>
</li>
<li><p>The Windows traceroute utility (tracert) operates using the same ICMP protocol that ping utilizes; the Unix equivalent operates with UDP</p>
</li>
<li><p>This is what is typed into the terminal to use TCP SYN requests when tracing the route: traceroute -T</p>
</li>
</ul>
<p>The room also explained Domain Names. A domain name represents an IP address and domain registrars lease said domain names out. <a href="https://www.whois.com/whois/">Whois</a> can show who owns a domain.</p>
<p>Then it explained the Dig tool, which essentially allows a user to manually query recursive DNS servers to find information about a domain. This is what is typed into the terminal: dig @</p>
<p>Here's an explanation of what a request does to a domain:</p>
<ol>
<li><p>The computer checks the local Hosts Files to see if an explicit IP to domain map has been created (this is mostly done with older systems and is less commonly used)</p>
</li>
<li><p>The computer then checks local DNS cache if host file has nothing</p>
</li>
<li><p>If still nothing is found, the computer sends a request to the recursive DNS server, which the router on the network automatically knows since the ISP has their own recursive servers that it provides to the computer. But if the the IP address is not in the cache then it goes to the root name server.</p>
</li>
<li><p>There are 13 main root name DNS that keep track of DNS servers in the next level which are the Top Level Domain servers.</p>
</li>
<li><p>The Top Level Domain servers TLD are split into extensions. For example, if looking for xyz.com then TLD server with .com domains would be searched instead of .co, then it moves onto the next level which is the Authoritative name servers</p>
</li>
<li><p>The Authoritative name servers store DNS records for the domains directly</p>
</li>
</ol>
<p>The Dig tool is good for network troubleshooting. Once used, the ANSWER tag states the IP address and a lot of other information. The TTL (Time to Live) states when a record stops being valid, so that the computer doesn't rely on the cache, and it is in the second column next to the domain name, measured in seconds.</p>
<p>I then started the <a href="https://tryhackme.com/r/room/networkservices">Network Services</a> THM module and the FreeCodeCamp <a href="https://www.freecodecamp.org/learn">Python</a> course. I thought I could get the Python basics down quickly to start my next project: A Packet Sniffer! I might need more time to complete the Python course before building a packet sniffer, but it's been fun so far. I didn't expect to build such simple projects within the course itself. The lessons are also small enough to get through within an hour or less. The workshops are really my favorite part.</p>
<p>I learned that Python 2 should not be used for any new code since it's at the end of its life. The course did explain how to install Python, but I installed Python some time ago. I remember having an issue with it because I hadn't clicked 'add pthon.exe to path' when installing it.</p>
<p>Variables are declared by using the equal sign (=) assignment operator. For example:</p>
<ul>
<li><p>name = 'Jane'</p>
</li>
<li><p>age = 25</p>
</li>
</ul>
<p>The series of characters used to represent text is a string and single or double quotes are used around the string, such as 'Jane'.</p>
<ul>
<li><p>variables can only start with a letter or _ underscore, no numbers</p>
</li>
<li><p>variable names can only have alphanumeric characters upper/lower case, 0-9 and underscores</p>
</li>
<li><p>variable names are case sensitive (age Age AGE are all different variables)</p>
</li>
<li><p>variable names can't be reserved keywords such as: if, class, or def</p>
</li>
<li><p>snakecase: variable names in lowercase with separate words separated by underscore, example: this_is_a_variable_name = 'SecureByHabit'</p>
</li>
</ul>
<p>The course explained that the names of variables should be descriptive, such as "user_age" instead of simply "age", in order to communicate the purpose of said variable. Then it mentioned comments start with a pound symbol (#). So if there's a need for a multi-line comment, just add a pound symbol at the front.</p>
<p>The Print Function was also explained; it outputs data to the terminal, such as print('thisisastring'). It also showcased that spaces are added when separate quotation marks with commas outside each ending quotation mark are used. For example:</p>
<ul>
<li><p>print('the,numbers,are,1,2,3') would output: the,numbers,are,1,2,3</p>
</li>
<li><p>print('the','numbers','are','1','2','3') would output: the numbers are 1 2 3</p>
</li>
</ul>
<p>Then it explained that each data type describes the kind of value a variable holds, which makes it faster and easier to use Python. Python, like JavaScript, is dynamically typed based on what is assigned to it. Python automatically understands that a string uses single or double quotation marks and that a number is an integer. Unlike static languages, like C#, Java, and C++, which require typing out the data type, such as string name = 'Jane' or int age = 25. BUT python sometimes has type errors that can only be detected when the program runs, so unexpected bugs pop up. On the bright side, since Python runs code line by line, it stops once it finds a line with an error. Some languages, in contrast, compile before running so they catch errors before running the program.</p>
<p>There are 10 Data Types:</p>
<ul>
<li><p>Integer: whole number without decimals such as 10 or -5</p>
</li>
<li><p>Float: number with a decimal point like 4.41 or -0.4</p>
</li>
<li><p>String: sequence of characters enclosed in a single or double quotation marks</p>
</li>
<li><p>Boolean: true or false type, written as True or False, class typed as bool</p>
</li>
<li><p>Set: unordered collection of unique elements, like {7, 5.6, 'hello'}</p>
</li>
<li><p>Dictionary: collection of key value pairs enclosed in curly braces like {'name': 'Jane','age':28}, class typed as dict</p>
</li>
<li><p>Tuple: immutable ordered collection enclosed in parentheses like ('apple',4.5,7)</p>
</li>
<li><p>Range: sequence of numbers often used in loops, such as range(9)</p>
</li>
<li><p>List: ordered collection of elements that supports different data types</p>
</li>
<li><p>None: special value represents the absence of a value, class type is NoneType</p>
</li>
</ul>
<p>To get the data type of a value use the type() function. The built in isinstance() function checks if a variable matches a specific data type, then returns a boolean. The isinstance() can check if a number is an int or float by printing a bool: print(isinstance(score, int)). After this explanation, I built a report card by assigning values, printing said values, and printing their types! I like that the workshops immediately let me test the material they explained.</p>
<p>The next module is called Strings &amp; String Immutability. It started by explaining that a multiline string can use triple double-quotes or single-quotes like so:</p>
<ul>
<li>my_str_3 = """Multiline string"""</li>
</ul>
<p>And if a string includes a quotation mark, use the opposite type so it shows up, such as, 'She said, "Hello!"' Or use a slash, like so: "She said, \"Hello!\""</p>
<p>They also stated that, to check if a string contains one or more characters, an in operator can be used to check. For example: my_str = 'Hello world' then print('Hello' in my_str) returns True because Hello is present in the string.</p>
<p>It also explained that indexing is a process to get the length of a string and to work with individual characters.</p>
<ul>
<li><p>len() gives length, example: print(len(my_str)) and will output 11</p>
</li>
<li><p>Each character has a position called an index, which is zero based. Meaning it starts with 0 and the second character would be 1, etc. Square brackets are used to access a character by its index. For example: print(my_str[0]) and it'll print H. Negative indexing allows the use of a negative number to get the last characters in a string. For example: -1 would be d and -2 l.</p>
</li>
</ul>
<p>Then it mentioned that all data in Python are objects and some are immutable, while others are mutable. Immutable data types can't be modified or altered once declared, but can be reassigned, but can't change the original object by altering elements</p>
<ul>
<li><p>strings, integers, float, boolean, tuple and range are immutable in python</p>
</li>
<li><p>reassigning entails pointing the variable to a different string like so:</p>
<ul>
<li><p>greeting = 'hi'</p>
</li>
<li><p>greeting = 'hello'</p>
</li>
<li><p>print(greeting) and it'll print hello since its been reassigned</p>
</li>
</ul>
</li>
</ul>
<p>The next module is String Concatenation and String Interpolation:</p>
<ul>
<li><p>String Concatenation: combines multiple strings with plus sign (+) operator</p>
<ul>
<li><p>Str_plus_str = my_str + ' ' + my_str_1</p>
</li>
<li><p>print(str_plus_str)</p>
</li>
</ul>
</li>
</ul>
<p>I had the hardest time with this particular module when applying the information to the workshop project. I highly recommend trying that project. Anyways, a string can't concatenate with a number. However, a number can be converted to a string by using str(), for example: name_and_age = name + str(age) The += combination can also be used, it concatenates and assigns in one step. String interpolation is the process of inserting variables and expressions into a string.</p>
<p>F-strings are formatted string literals, allowing the handling of interpolation with a compact and readable syntax. F-strings start with an f before quotes and allows the embedment of variables or expressions inside curly braces {}. For example:</p>
<ul>
<li>name_and_age = f'My name is {name} and I am {age} years old'</li>
</ul>
<p>There's no need to use a str() function cause variables convert into a string during the interpolation process, just remember to use the single quotation marks and the curly braces only go around the variables that are to be embedded.</p>
<p>The last module I explored is titled String Slicing. String slicing allows the extraction of a portion of a string with only a specific part of it: string[start:stop]. For example:</p>
<ul>
<li>print(my_str[1:4]) and it'll print ell</li>
</ul>
<p>The stop is non-inclusive, meaning it stops right before the stop index so in the example above, it only printed out 1-3 of Hello. Remember that H is 0. Also, the start or stop can be omitted and it'll stop at the end or start at the beginning. For example:</p>
<ul>
<li>print(my_str[:7]) returns Hello w (the space is counted)</li>
</ul>
<p>Slicing doesnt modify the original string. And if everything is omitted then it prints the whole thing</p>
<ul>
<li>my_str[:]</li>
</ul>
<p>The step parameter specifies the increment between each index in the slice. For example:</p>
<ul>
<li>my_str = 'Hello world' print(my_str[0:11:2]) and it prints Hlowrd</li>
</ul>
<p>A string can also be reversed by using -1 as a step. For example:</p>
<ul>
<li>print(my_str[::-1]) and it prints dlrow olleh</li>
</ul>
<p>Then it listed the Common String Methods:</p>
<ul>
<li><p>upper(): converts all characters to upper case .upper</p>
</li>
<li><p>lower(): converts all characters to lower case .lower</p>
</li>
<li><p>strip(): new string with specified leading and trailing characters removed, or any white spaces that are leading/trailing</p>
</li>
<li><p>replace(old, new): returns a new string that replaces all old occurrences with new ones, example:</p>
<ul>
<li>my_str.replace(hello,hi) will now print hi world instead of hello world</li>
</ul>
</li>
<li><p>split(separator): splits a string on specified separator into list of strings but if nothing is specified then it splits on whitespaces, example:</p>
<ul>
<li>my_str.split() prints ['hello', 'world'] from 'hello world'</li>
</ul>
</li>
<li><p>join(iterable): joins elements of an iterable into a string with a separator, example:</p>
<ul>
<li>if my_list = ['hello', 'world'] turns into hello world when using ' '.join(my_list)</li>
</ul>
</li>
<li><p>startswith(prefix): returns boolean indicating if a string starts with the specified prefix, example:</p>
<ul>
<li>my_str.startswith('hello') and it'll say true cause it starts with hello</li>
</ul>
</li>
<li><p>endswith(suffix): returns boolean indicating if a string ends with the specified suffix</p>
</li>
<li><p>find(substring): returns index of the first occurrence of substring or -1 if it doesnt fine one, for example:</p>
<ul>
<li>my_str.find('world') would return 6 so it wont include the very index of the w letter</li>
</ul>
</li>
<li><p>count(substring): returns number of times a substring appears in string, for example:</p>
<ul>
<li>my_str.count('o') would give back a 2</li>
</ul>
</li>
<li><p>capitalize(): returns a new string with the first letter capitalized and the rest lowercase</p>
</li>
<li><p>isupper(): returns true if all letters in the string are uppercase and false if not</p>
</li>
<li><p>islower(): returns true if all letters in the string are lowercase and false if not</p>
</li>
<li><p>title(): returns new string with the first letter of each word capitalized ie Hello World</p>
</li>
</ul>
<p>I finished the week by building an employee profile generator! I was surprised I could do it; I was even a little ahead and had to backtrack for the submission to be complete for a few steps. Here are snippets of the Employee Profile Generator!</p>
<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/72f810ed-cdb9-4f61-a1c3-515c0332c50b.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/0ec16aca-4d3c-4225-af83-2fea6227b3b3.png" alt="" style="display:block;margin:0 auto" />]]></content:encoded></item><item><title><![CDATA[Week 2: Networking Basics & Ticketing System Project]]></title><description><![CDATA[I completed two THM modules on networking: What is Networking? and Introductory Networking. I probably should have started with those modules last week. Anyways, networking can be defined as a connect]]></description><link>https://securebyhabit.com/week-2-networking-basics-ticketing-system-project</link><guid isPermaLink="true">https://securebyhabit.com/week-2-networking-basics-ticketing-system-project</guid><dc:creator><![CDATA[Mariana]]></dc:creator><pubDate>Sat, 16 May 2026 01:28:32 GMT</pubDate><content:encoded><![CDATA[<p>I completed two THM modules on networking: <a href="https://tryhackme.com/room/whatisnetworking">What is Networking?</a> and <a href="https://tryhackme.com/room/introtonetworking">Introductory Networking</a>. I probably should have started with those modules last week. Anyways, networking can be defined as a connection of devices that communicate and share data or resources with each other. A network can only be public or private. The internet, for instance, is a giant public network made of multiple smaller private networks. Each device in a network has two identifying numbers:</p>
<ol>
<li><p>Internet Protocol (IP) address: identifies a host on a network for a period of time, devices have both a public and a private IP address</p>
<ul>
<li><p>Divided into 4 octets, example: 0.0.0.0</p>
</li>
<li><p>Each octet can span from 0-255, example: 255.255.255.255</p>
</li>
<li><p>Protocols allow different devices to communicate in the same language</p>
</li>
<li><p>Devices can use both public and private networks</p>
</li>
<li><p>Public IP addresses are given by an Internet Service Provider (ISP)</p>
</li>
<li><p>More devices connected = harder to get a public IP address under IPv4</p>
</li>
<li><p>The next version is IPv6, which looks like this: 2001:0bc8:85a3:0000:0000:8a2e:0370</p>
</li>
</ul>
</li>
<li><p>Media Access Control (MAC) address: each device has a microchip board, which is a physical network interface that is assigned a unique address at the factory that built it</p>
<ul>
<li><p>12-character hexadecimal, example: a4:c3:f0:85:ac:2d</p>
</li>
<li><p>First six: the company vendor that built it</p>
</li>
<li><p>Last 6: unique number made by the company vendor</p>
</li>
<li><p>MAC addresses can be faked or spoofed (a network device pretending to use another MAC address by manually changing the MAC address)</p>
</li>
<li><p>Spoofing makes a firewall think it is receiving communication from an admin when it is not</p>
</li>
<li><p>Public network places like stores can use MAC address control by paying extra</p>
</li>
</ul>
</li>
</ol>
<p>Two protocol models explain the theory of networking. The first is the Open Systems Interconnection (OSI) model, which isn't used in the real world but is best for teaching. The OSI model has 7 layers that illustrate the theory behind computer networking. The <a href="https://tryhackme.com/room/introtonetworking">Introductory Networking</a> module also listed the following mnemonic to memorize the 7 layers: Anxious Pale Shakespeare Treated Nervous Drunks Patiently. I haven't yet found another one that I like since this one is in order.</p>
<p><strong>Seven Layers: OSI Model</strong></p>
<p>The 7 layers in the OSI model basically explain the encapsulation process, which is a process where data is sent from one computer to another. Each layer adds control information to the front of the data, which is called a header.</p>
<p><strong>7th Layer:</strong> Is called the Application Layer and is the first to add a header to the data. It, as stated in the name, provides networking options (applications) to the programs on a computer so it can transmit the data. The File Transfer Protocol (FTP), for example, is used here over a TCP/IP network. Then the data is passed onto the next layer.</p>
<p><strong>6th Layer:</strong> Is called the Presentation Layer, which translates data into a standardized format that the receiving computer can understand. This layer is necessary because the application layer mostly uses a format that only the application can understand. The Presentation Layer also handles encryption and any other transformations of data. The information from the 6th layer is added as a header in front of the 7th layer header. Once that is complete, the data is transferred to the next layer.</p>
<p><strong>5th Layer:</strong> Is called the Session Layer, which checks to see if a connection with the other computer can be established. If the connection is established, it must maintain and synchronize the connections. Also, each session made is unique to that particular communication, which is also what allows multiple ongoing communications between different endpoints. Then the 5th layer adds a header to the front of the 6th and 7th headers of the data. Afterward, the data moves to the next layer.</p>
<p><strong>4th Layer:</strong> Is called the Transport Layer, which chooses how data is transmitted. It's basically where data is divided into pieces to make it easier to send a message successfully. At this point, data is referred to as segments or datagrams, depending on which protocol is used. There are 2 common protocols:</p>
<p><strong>TCP Transmission Control Protocol:</strong></p>
<ul>
<li><p>TCP is connection-based, which means a connection is established the whole time it is used for reliable transmission</p>
</li>
<li><p>acceptable speed is maintained, and any lost data is resent</p>
</li>
<li><p>TCP is accurate over speed: best for file transfer and webpages</p>
</li>
<li><p>Data is called a segment when using TCP</p>
</li>
</ul>
<p><strong>UDP User Datagram Protocol</strong></p>
<ul>
<li><p>UDP is when packets are given to a computer without a set pace; the computer has to be the one to keep up (which is why videos could become pixelated if the connection is bad)</p>
</li>
<li><p>UDP is speed over accuracy, best for video streaming</p>
</li>
<li><p>Data is referred to as datagrams when using UDP</p>
</li>
</ul>
<p>The 4th layer then adds a header to the front of the 5th layer before it moves on to the next layer.</p>
<p><strong>3rd Layer:</strong> Is called the Network Layer, which locates the destination of the request. It takes the IP address and figures out the best route to take. Logical addressing is when it uses IP addresses since it is software-controlled. IP addresses are easy to organize and find, the IPV4 is currently the most common. At this stage, the data is called a packet. The 3rd layer adds a header to the front of the packet before moving on to the next layer.</p>
<p><strong>2nd Layer:</strong> Is called the Data Link Layer, which focuses on finding the physical address of the transmission. When it receives a packet with an IP address, it adds the MAC address (every network-enabled computer has a network interface card (NIC) that has a unique MAC). The Data Link layer also checks if the data was corrupted during transmission, which could still happen in the physical layer, which is next. The data is referred to as frames in the 2nd layer. Before the data moves on, the Data Link layer adds a header to the front of it and a trailer to the end of the data. The trailer verifies the data hasn't been corrupted. The only way to tamper with the data would be to break the trailer. Finally, the frames are sent to the first layer.</p>
<p><strong>1st Layer:</strong> Is called the Physical Layer, which is when binary data is converted into signals and transmitted across a network. The data is now referred to as bits.</p>
<p>The whole process is reversed when the second computer receives the bits, it removes information layer by layer, which is called de-encapsulation. It starts with the physical layer, then unravels it until it reaches the data. It's the same OSI model in each computer, but it isn't as straightforward in real life. The OSI model is merely used to explain the theory of networking. The older, real-world networking protocol is the TCP/IP Model.</p>
<p>Quick side note, before the TCP/IP and OSI models, there wasn't an agreed-upon model to follow. The DoD provided the standard in 1982 to solve the inconsistencies. Then the ISO (International Organization for Standardization) introduced the OSI model to help guide learners, but the TCP/IP model is the standard used in modern networking.</p>
<p><strong>TCP/IP Model</strong></p>
<p>The TCP/IP Model still follows the same encapsulation and decapsulation process as the OSI Model. However, there are 4 layers in the ICP/IP Model:</p>
<ul>
<li><p>Application: is basically the application, presentation, and session layers from the OSI model</p>
</li>
<li><p>Transport</p>
</li>
<li><p>Internet: is the network layer of the OSI model</p>
</li>
<li><p>Network Interface: was broken into data link and physical layers, like with the OSI model, but not officially defined in RFC1122, but it's the same thing</p>
</li>
</ul>
<p>TCP is a connection-based protocol; there needs to be a stable connection between two computers, and the process to establish that connection is the three-way handshake.</p>
<p>A three-way handshake is when a computer sends a special request containing a SYN bit, short for synchronize, to a remote server. The server responds with the same SYN attached to an ACK bit, which is short for acknowledgement. Then the computer will send back an ACK bit. This establishes that the data can be reliably sent, and anything lost or corrupted can be resent.</p>
<p>I also tested out the networking tool Ping, which uses the Internet Control Message Protocol (ICMP) to check the connection on devices by using an echo packet that replies once it is received. Ping works on the network layer of the OSI model, which is the Internet layer of the TCP/IP model. I typed ping [target URL address] -4 into the command line so that it would show me the IP address of a server hosting a website in IPV4. I can also type in an IP address, and it'll list the seconds per packet along with the average time it takes to establish a connection.</p>
<p>Last but not least, I finally got around to making a <a href="https://youtu.be/g1AZ-EtD6Nw?si=d4Nob8A4WuB9Koe3">Ticketing System</a>!</p>
<p>A ticketing system tracks, manages, and resolves user issues. Each issue is a ticket, and they can be organized to decide which to prioritize. The video mentioned multiple different ticketing systems and which organization commonly used each, and then it explained the components of a ticketing system.</p>
<p>Components of a Ticketing System:</p>
<ol>
<li><p>ID: unique identifier to track progress, past issues, and maintain records (often numeric)</p>
</li>
<li><p>Requester: the user who submits the ticket</p>
</li>
<li><p>Category: organized labels to determine the issue</p>
<ul>
<li><p>Hardware: laptop not booting, monitor issues</p>
</li>
<li><p>Software: application crashes and can't install</p>
</li>
<li><p>Network: connectivity issues</p>
</li>
<li><p>Security: account lockouts and phishing attempts</p>
</li>
<li><p>Access request: new employee or permissions</p>
</li>
</ul>
</li>
<li><p>Priority Level: not everything is equally urgent, decide what is handled first</p>
<ul>
<li><p>Critical P1: the entire company is affected (email is down)</p>
</li>
<li><p>High P2: department-wide issue (finance team's payroll system is inaccessible)</p>
</li>
<li><p>Medium P3: individual user impacted (a slow laptop)</p>
</li>
<li><p>Low: minor inconvenience (request for a new mouse)</p>
</li>
</ul>
</li>
<li><p>Assigned Tech: who handles it based on expertise and shift schedule</p>
</li>
<li><p>Status:</p>
<ul>
<li><p>new: just created</p>
</li>
<li><p>in progress: working on it</p>
</li>
<li><p>pending user response: asking for more info from the user</p>
</li>
<li><p>escalated: ticket moved to a higher level</p>
</li>
<li><p>resolved: issue fixed and pending user confirmation</p>
</li>
<li><p>closed: when the user has confirmed it is solved and the ticket is archived</p>
</li>
</ul>
</li>
<li><p>Proper Logging</p>
</li>
</ol>
<ul>
<li>Gather essential details: user information like name, dep, email, and contact number, device name, category, priority, ask questions, then assign it, add notes before escalating</li>
</ul>
<p>Life cycle of a ticket</p>
<ol>
<li><p>User submits a ticket</p>
</li>
<li><p>The ticket gets categorized and assigned to a tech</p>
</li>
<li><p>Tech troubleshoots and documents findings</p>
</li>
<li><p>The issue is resolved and escalated if needed</p>
</li>
<li><p>User is notified and marked closed once confirmed</p>
</li>
<li><p>Post follow-up is optional</p>
</li>
</ol>
<p>SLA Ticketing Practices (the standard)</p>
<ul>
<li><p>A formal contract between IT support teams and users that defines expected response and resolution times</p>
</li>
<li><p>Response time, resolution time, ticket prioritization, escalation process, service availability, penalties, and breach consequences</p>
</li>
<li><p>Example: critical issue, then respond within 15 min, resolve in 2 hrs, breach happens when IT fails</p>
</li>
<li><p>SLA ensures timely support, manages user expectations, prevents ticket backlog, and supports performance tracking of IT teams</p>
</li>
</ul>
<p>Workflow</p>
<ol>
<li><p>Always acknowledge tickets promptly, and confirm receipt</p>
</li>
<li><p>Follow SLA guidelines</p>
</li>
<li><p>Communicate clearly</p>
</li>
<li><p>Document Everything</p>
</li>
<li><p>Escalate when necessary</p>
</li>
<li><p>Close tickets properly</p>
</li>
</ol>
<p>I made an account on <a href="https://www.spiceworks.com/">https://www.spiceworks.com/</a> and then worked through each activity in the video. The first activity focused on filling a ticket with all of the necessary information.</p>
<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/21ce2247-dd89-4990-857d-9f6e8ebdabb7.png" alt="Screenshot 2026-05-13 201532.png" style="display:block;margin:0 auto" />

<p>Then I had to close the ticket properly by first asking if the fix was sufficient. I also wrote internal notes before pressing the close button.</p>
<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/589e59e0-dec0-4488-bec3-3e6e8fd15601.png" alt="Screenshot 2026-05-14 201827.png" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/bfea8c42-d2e7-46c7-8719-f66cc6c0595e.png" alt="Screenshot 2026-05-14 201908.png" style="display:block;margin:0 auto" />

<p>Then I learned about the escalation process. SpiceWorks doesn't have an escalation option, so I just wrote what would be a message to the next team and selected internal notes. In that situation, I would also have to notify the person asking for access that the ticket has been escalated.</p>
<img src="https://cdn.hashnode.com/uploads/covers/69f41a07909e64ad076864f8/a115d002-1788-4a97-a147-6a7c484685d6.png" alt="Screenshot 2026-05-14 202638.png" style="display:block;margin:0 auto" />

<p>Overall, it was incredibly simple to set up and play around with. Next week, I'm planning on exploring a couple more networking tools and continuing the THM modules. I'll also start learning Python because there's another project I'll do in the fourth week.</p>
]]></content:encoded></item><item><title><![CDATA[First Step: Readjust Learning Plan]]></title><description><![CDATA[Last year, I decided to finally start studying cybersecurity. I sat down and came up with a plan using the various resources I accumulated from random videos. I also wanted to learn web development, s]]></description><link>https://securebyhabit.com/first-step-readjust-learning-plan</link><guid isPermaLink="true">https://securebyhabit.com/first-step-readjust-learning-plan</guid><dc:creator><![CDATA[Mariana]]></dc:creator><pubDate>Wed, 06 May 2026 05:06:49 GMT</pubDate><content:encoded><![CDATA[<p>Last year, I decided to finally start studying cybersecurity. I sat down and came up with a plan using the various resources I accumulated from random videos. I also wanted to learn web development, so I decided to make a blog focused on my cybersecurity learning journey. I figured it wouldn't be that hard to learn both, and the blog would hold me accountable. I paid for the hosting and domain, decided to use WP, and gathered a few images...but then I never published anything. I realized I was trying to learn too much at once, but still I often reminded myself I already paid for a domain so might as well keep trying.</p>
<p>Over the course of maybe seven months, I played a few <a href="https://overthewire.org/wargames/">Over the Wire games</a> (it's fun, highly recommend), finished ISC2 modules (didn't take the test), watched a Wireshark tutorial and analyzed basic traffic, learned about VirtualBox, and did a handful of TryHackMe modules.</p>
<p>After that, I completely neglected my cybersecurity studies. Not because I didn't want to learn. I just never made time to study. I promised myself I would try again the next day and the next...</p>
<p>And now, I'm here to try again. I plan to actually follow a routine this time: I'll post once a week on a topic I focused on.</p>
<p>Last week, I focused on a <a href="https://youtube.com/playlist?list=PLIFyRwBY_4bQUE4IB5c4VPRyDoLgOdExE&amp;si=UGemm4gKNV95vaLQ">subnetting YT playlist</a>, it was interesting! I also started the Network Fundamentals module on THM, but didn't get very far. Now I'll summarize everything I learned from the subnetting playlist to review my notes and see if this helps me teach it to myself. I'm wondering if I'll need to rewatch a few of the videos. Also, I recommend drawing blocks out to sketch the ideas being explained below.</p>
<p>Anyways, we'll start by defining subnetting, which is a network divided into subnetworks. Each subnetwork can be measured by using a CIDR Notation, such as /24. Each CIDR has a set number of IP addresses. For example, /24 is a standard network that has 256 IP addresses. That means IP addresses between .0 through .255. Remember it always starts at .0!</p>
<p>Then, to subnet just divide into 2 equal /25 networks. That means there are still 256 IP addresses but now there's two sections. The first spans from .0 through .127 and the second includes .128 through .255.</p>
<p>The subnetting can be divided even more: 4 sections use /26, eight sections use /27. They can also be mixed and matched: one /25, two /27, and one /26 completes the 256 IP addresses.</p>
<p>So, seven pieces of information can be obtained from subnetting:</p>
<ol>
<li><p>Network ID: very first IP address in each sub-net. For example, 10.0.0.0 uses .0 as the first IP address or if using a /25 network with 10.0.0.128 then .128 is the first address.</p>
</li>
<li><p>Broadcast IP (BC IP): very last IP address. This address allows a user to speak to any or all IP addresses in a subnet. For example, in the first part of a /25 network .127 is the last address so the BC IP is 10.0.0.127. In the second block of a /25 network, .255 is the last address so the BC IP for that section is 10.0.0.255.</p>
</li>
</ol>
<p>Side Note: These first two can't be assigned to any users by the way, since they already have a function: identification and broadcasting! That means even if there are a total of 128 addresses, only 126 are usable, and even if there are 256, then only 254 are usable. Always subtract two!</p>
<ol>
<li><p>First Host IP: IP address immediately <strong>after Network ID</strong>. Example: if the first one is 10.0.0.0 then first host IP is 10.0.0.1</p>
</li>
<li><p>Last Host IP: IP address immediately <strong>before broadcast IP</strong>. Example: if the last IP is 10.0.0.255 then the last host IP is 10.0.0.254</p>
</li>
<li><p>Next Network: Network ID of the next subnet, which is always right after BC IP. Example: if it's a /27 that's next then it would be 10.0.0.28.</p>
</li>
<li><p>of IP addresses: Total number of addresses in each block. Initial one /24 has 256 addresses, from there divide. So a /25 has 128, /26 has 64, /27 has 32 addresses</p>
</li>
<li><p>CIDR/Subnet Mask: identify the size of a subnet and convert between the two. Basically subtract how many available addresses there are from the total. For example, /25 has a subnet mask of 255.255.255.128 because it has 128 available addresses and if you subtract that from 256 then you still get 128. So for /26 the subnet mask is 255.255.255.192 because there are 64 available addresses and if you subtract it from 256 then you have 192.</p>
</li>
</ol>
<p>Then the <a href="https://youtube.com/playlist?list=PLIFyRwBY_4bQUE4IB5c4VPRyDoLgOdExE&amp;si=UGemm4gKNV95vaLQ">subnetting YT playlist</a> taught me a cheat sheet to quickly solve problems! There are three steps and it's definitely helpful. Basically, each row lists the relevant combination:</p>
<p>Group Size: 128 64 32 16 8 4 2 1</p>
<p>Subnet Mask: 128 192 224 240 248 252 254 255</p>
<p>CIDR: /25 /26 /27 /28 /29 /30 /31 /32</p>
<p>So when given an IP address with a certain CIDR, you just look at the list to find a starting point. For example, if the CIDR is /28 then the subnet mask is 255.255.255.240 and the total group size is 16. Each IP address will have a target IP. In the first problem, it was .55 and to get there, you count by the group size. For example, the start is always .0, then .16, .32, .48, and .64. You stop once you pass the target IP address; you always have to pass it, even if you land right on the target IP address.</p>
<p>The number before the target IP address is the network ID, which is .48 in this case. The first host IP is one more than the network ID so add one, making the Network ID .49. The next network is always the address that passed the target, which is .64. The BC IP is right before the next network ID so subtract one, which makes the BC IP .63. And the last host IP is one less then the BC IP so subtract one, making it .62.</p>
<p>Also, .256 doesn't exist, which means the next octet has to be used. For example, if starting with 10.2.2.192 and the group size is 64, then the next one becomes 10.2.3.0. If the target isn't reached by then, you keep going, which means the next one is 10.2.3.64.</p>
<p>Anyways, I watched all the practice videos and worked on the problems before they revealed the answers. I happily got them right. It gets so easy once you get the hang of it! Then I tried out <a href="https://subnetipv4.com/">https://subnetipv4.com/</a> to practice some more. I realized they featured different types of problems, so I went back to the playlist to watch more videos.</p>
<p>Three tips were shown to make solving problems quicker. Such as starting with larger numbers if the target IP is a large number, or starting with a higher number and subtracting by group size. Also, every group size lands at 128 at some point so technically the start can also be .128 instead of .0. And last but not least, every group size lands on its own subnet value of the same column or every column to the left. For example, /30 with .197 is a large number, but /30 has 240 as a subnet mask, and the closest number to 197 that's to the left of that is 192. That means the start can be 192.</p>
<p><strong>Also, the cheat sheet can be extended to include the</strong> <strong>2nd and 1st octet:</strong></p>
<p>128 64 32 16 8 4 2 1</p>
<p>128 192 224 240 248 252 254 255</p>
<p>/25 /26 /27 /28 /29 /30 /31 /32</p>
<p>/17 /18 /19 /20 /21 /22 /23 /24 (this is 3rd octet, ex: target is .77. in 10.2.77.188 /19)</p>
<p>/9 /10 /11 /12 /13 /14 /15 /16 (this is 2nd octet)</p>
<p>/1 /2 /3 /4 /5 /6 /7 /8 (this is 1st octet)</p>
<p>Also, for 3rd, 2nd, and 1st octects, the ends become .255. For example, 10.4.95.255. Then to find the Last Host IP, always subtract from the end so if the end is .255 then the last host is .254. Oh and to find the total number of IP addresses, use the following formula: (2^(32-CIDR)).</p>
<p>In one video they also explained that the next network IP can be N/A if it reaches the very last network and that 0.0.0.0 /0 network includes all 4.2 billion addresses. It can be split into 2 of /1 or 4 of /2. I also watched the video on FLSM: Fixed-Length Subnet Mask. Basically, each CIDR doubles the number of networks available and that can be true even if you start with /22 or /0. For example, /0 would be one network but /1 would be 2 and /22 could be one but /23 would have 2. The faster way to solve FLSM questions would be subtracting the CIDR closest to the target total IP addresses from the starting CIDR and using 2^N. For example, /26 - /21 = 5 and 2^5 = 32 subnets when you start at /21 and want 51 IP addresses. /26 is the closest with a 64 address group size. Then there was an explanation about VLSM, variable length subnet masks, where essentially you need to determine how many IP addresses you need and then allocate them from largest to smallest to maximize space.</p>
<p>Overall, I found subnetting very interesting and plan to practice using <a href="https://subnetipv4.com/">https://subnetipv4.com/</a> this week. I'm also going to finish the THM modules and play some more OTW games. I plan to build a simple Ticketing System based on a video I found too. I can't wait to write my next post!</p>
]]></content:encoded></item></channel></rss>