Trying this out
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 31s

This commit is contained in:
2026-09-16 13:01:29 -06:00
parent 0ee41d3890
commit 4c197be8eb
104 changed files with 309 additions and 5706 deletions
@@ -1,107 +0,0 @@
---
title: About Me
nav_order: 2
---
# About Me
Sup guy, I'm Nathan
![Me and the robot]({% link assets/images/me_and_bot.jpg %})
That's me ^^^ do you like my Stardew Valley hat? I got it for Christmas
___
## Projects
- ### Personal NAS
- A while back my friends and I decided to make a combined server that would be able to hold a couple terabytes of data, including movies, games, and (non-sensitive) back-up data that could be accessed from our home networks.
- Currently I am still working on making the [custom SIEM](https://github.com/Pizza2d1/SIEMTesting) for it (which is still VERY scrappy) so that I can log the files and folders that are being added to it
- Future plans: Make it so that there is only access to the network from their home network IP's, and maybe work on a website that can be accessed for easy file downloads and so I can practice securing a web server at a basic level
- ### This Website
- I learned that github will host a website for free for you if you provide it with a valid web repository, so I started with a very basic HTML webpage and have since started using the [just-the-docs](https://github.com/just-the-docs/just-the-docs) official configuration website as a template for the current website that you are on right now
- I'm still adding some of my class notes and notes from when I was programming from my Obsidian files, which will take a while to do manually so I am making a bash script that will allow me to do it automatically (the only time programming will be faster than the actual process)
- Later on I will work on adding download links to some of my notes so that they can be put straight into another person's Obsidian vault, along with adding more easter eggs for funsies
- ### pizzapaper
- A pretty basic wallpaper switching program that I made as a way to start learning bash and how it worked, since I had just barely started to get confortable with linux and wanted to start customizing my laptop so that it would be better.
- I don't have a lot that I am working on for it right now since it's pretty good for now, the most I would change is adding a proper GUI in the same style as something like [waypaper](https://github.com/anufrievroman/waypaper) (no relation, I didn't know about waypaper before working on this).
- My future plans for this project is mostly just making it so that it can work on all linux machines, as currently it only working with GNOME dessktop environments, which won't work when I convert to arch (btw)
<!-- My autobiography
**Nathan Young**
================
Hobbies
-------
When I'm at home I like to play videogames with my friends over the internet, and when I'm not doing that I am either spending time with my dog or practicing with my yoyo
![Computer Man](https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/fbcf7697-009e-43c0-8d2e-4bc0460531c5/d1rli8v-478a716c-d622-470d-a80b-eb689f7e00d6.gif?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcL2ZiY2Y3Njk3LTAwOWUtNDNjMC04ZDJlLTRiYzA0NjA1MzFjNVwvZDFybGk4di00NzhhNzE2Yy1kNjIyLTQ3MGQtYTgwYi1lYjY4OWY3ZTAwZDYuZ2lmIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.I6kFWwYdBLNta0SfgZkgJ8OvHQKul3frlK537bWWXVk){: width="200" }
My family
---------
I have a family of eight, 2 sisters, 2 brothers, and 2 parents, and one goofy dog
![doggo](https://lh3.googleusercontent.com/pw/ABLVV84uPVKL6lgkxcPjIePd2fq1_HRcGqONJ_maok8FIT0XHFibdR5y14CYtnoIuftfUqksvpd70HDEH3n5wUBjTWe4iMDldBzjh1kpkCHSBT8VTO_5eX2_BShE6xdwUTWChx0tjn9O1KKgCKyOgxzz_gsA=w1082-h1436-s-no-gm?authuser=0){: width="200" }
My father and two brothers are all software developers, and both of my sisters want to go into either art or psychology
Favorite video games
--------------------
1. Factorio
- It's just such a good game that has been optimized by the devs so much that it can be played on any device and played by anybody, whether you want to fight biters, build a massive base, or even set off atomic bombs, you can do a lot in the game, the factory must grow
1. Ultrakill
- It's a fun and fast game that my friends like to play and speedrun in order to beat each other's times, it's like doom except it doesn't hold your hand as much as the newer doom games, and it has so. many. memes. made out of it
1. Minecraft
- I need to put this here because it was just such a monumental part of my life and how I met a lot of my friends
1. Terraria
- Such an interesting game with so many little things about it that make it special, like learning that you have an item that only spawns in 5% of worlds later in the game, or having such fun and bizzare boss fights. Not to mention the MASSIVE modding community that improve the game in so many ways and creates to much more stuff for the players to do
My favorite foods
-----------------
* Chicken Enchilada Casserole
* Double patty cheeseburger
* Salmon
* Chicken Alfredo -->
@@ -1,117 +0,0 @@
---
title: Application Attacks
parent: Cyberforensics
grand_parent: Class Notes
---
# Application Attacks
Cybersecurity Forensics Lesson 2.4.11 and 2.4.12
___
## Application Attacks Part 1
- Aimed at applications installed on systems with the intent to exploit vulnerabilities in the application or in the underlying system itself
- Common application attacks: - Replay
- Privilege Escalation - Directory Traversal
### Replay Attacks
- Uses a program to capture network packets when a victim is logging into an account
- These captured packets can be “replayed” or resent from the attacker to the site potentially giving them access to the account
- Requires many factors to work such as - Capturing the correct packets containing the info needed
- Packets that have been split up will need to be reassembled to achieve the same behavior as the original request
### Replay Attack Capturing Methods
- ARP Poisoning - Exploit the Address Resolution Protocol which provides mapping IP addresses to physical devices by using a compromised server
- Instead of being sent to the authentic site and being mapped properly, it will be sent to the attacker
- Tapping - Tapping or sniffing network traffic can pick up on the data being sent
- Malware - Some malicious programs have methods built in to collect packets
### Replay Attack Prep
- Before the actual replay attack occurs, the attacker would need to modify the data to ensure the packet contains the correct sending IP address and any other details that would make the attack appear legitimate.
- Once everything is in order they can carry out the attack
### Session Replay
- A session is the time that a user is authenticated and interacts with a web application
- A session replay attack occurs when an attacker has captured the session ID and any associated information and data allowing them to act as the user who has already logged in, essentially bypassing the login portion all together
### Pass the Hash
- Normally when a user logs into a system, the password is hashed, and the hash is then compared to the stored hash instead of the password itself being stored in plaintext
- In a pass the hash attack, the attacker has captured or used some method to gain that hash and is able to use it to gain access without using the actual password
### Defending Against Replay Attacks
- Using best practices and being safe while on the internet can assist in defending against these attacks.
- A nonce, a numerical value associated with the packet and validated when sent, can also aid in mitigation
- A common nonce used is a combination of the date and time - Since this value would constantly change, if a replay of the same packet occurs, then it would be discarded once the nonce was checked
### Privilege Escalation
- An exploit that allows a malicious actor to gain access to rights, information, or data they would normally not be able to have
- HTTP is stateless, meaning that when a user is logged in their device continuously communicates with the site or web application in a request-response cycle so the user can remain logged in while interacting with it
- By manipulating retransmitted data, an attacker could gain privileges
### Privilege Escalation Types
- Vertical Escalation - What is typically thought of in privilege escalation, where the attacker gains access to something higher, such as administrative rights
- Horizontal Escalation - Gaining access to information or data at the same level but perhaps with a different account
- In the case of an application, the web server account could be manipulated allowing an attacker to switch over to a normal user account on the system
- A web server account would normally be very limited, but a regular user account could have much more access
### Privilege Escalation Defense
- Install security updates, patches, and anti-virus software - Use address space layout randomization (ASLR), which is a memory protection process used to prevent exploits of memory corruption
- To prevent HTTP exploits - Only send session IDs to the client and keep critical info on the server
- Use digital signatures to secure data to the client - Encrypt the data sent to the client
### Directory Traversal
- Attempting to move from one folder to others within a system to access secure files or edits files and folders on the system
- Example: - You access an image on a website which is called by “filename=images/panda.jpg” and the image may have an absolute path to the file on the server as “/var/www/html/images/panda.jpg.” By manipulating the path using basic navigational commands, an unsecure system could be compromised. If the system were Linux based, typing in “filename=../../../etc/shadow” may give an attacker access to the password hashes.
## Application Attacks Part 2
- Aimed at applications installed on systems with the intent to exploit vulnerabilities in the application or in the underlying system itself
- Common application attacks: - Injection
- Buffer Overflow - Forgery
### Application Injection
- Take advantage of improper handling of user input by the application, allowing attackers to insert and execute unauthorized commands or code
- SQL Injection (SQLi): - Injection of malicious SQL (Structured Query Language) code into input fields or parameters of an application to manipulate the application's database queries and potentially gain unauthorized access to, modify, or delete data
- Cross-Site Scripting (XSS): - Malicious scripts are injected into web applications, and these scripts are then executed by the victim's browser, allowing attackers to steal user data, hijack sessions, or perform other malicious actions
### Application Injection cont’d
- Cross-Site Request Forgery (CSRF): - Fooling a user's browser into making an unwanted request to a web application on which the user is authenticated, allowing unauthorized actions such as changing account settings or making transactions.
- Command Injection: - Malicious commands are injected into input fields that are processed by the application as system commands, potentially leading to unauthorized access or data manipulation.
- LDAP Injection: - Targets Lightweight Directory Access Protocol (LDAP) queries, manipulating LDAP queries to gain unauthorized access to directory services or retrieve sensitive information.
- XPath Injection: - Malicious XPath expressions are injected into input fields that use XPath queries for XML data processing, enabling modification to XPath queries to extract sensitive information or manipulate XML data.
### Application Injection Mitigation
- Implement secure coding practices - Have input checks or validation
- Set parameters for queries, also called sanitizing inputs - Firewalls and additional tools can help detect and prevent intrusions
- Regular security and coding checks can address vulnerabilities
### Buffer Overflow
- Buffer overflow attacks happen when data overflows a buffer capacity.
- Like pouring water into a pitcher beyond its capacity, causing a spill.
- In code, it results from inserting more data into a variable than it can hold, potentially leading to overwriting adjacent memory addresses.
- Attackers can inject malicious code into the overflowed buffer, which has the potential of being executed in the adjacent memory The original data has been overwritten due to a buffer overflow in the name
### Request Forgery
- Cross-site request forgery (XSRF or CSRF) is an impersonation of a user performing an action on the website
- First thing, the user must be logged into the secure site they are wanting to access
- The attacker sets up a malicious link or site that contains a false request for the website the user is logged into
- The user accesses the malicious link or site, triggering a request to the secure site
- Since the user is already logged in, the request does not need validation, and the exchange occurs
### Request Forgery Types
- CSRF is a client-side request forgery leading to a compromise in the client’s data such as
- Unwanted bank transactions - Changes in credentials
- Other account manipulations - Server-side request forgeries occur when the request is meant to extract information or data from the server such as
- Accessing files - Altering the server’s behavior
### Request Forgery In Real Life
TikTok (2020): Attackers exploited a vulnerability that allowed them to send messages containing malware to TikTok users. This malware enabled CSRF attacks, causing other user accounts to submit requests on behalf of the attackers. TikTok patched the vulnerability within three weeks.
### How did they do it?
Attackers exploited a combination of vulnerabilities, including a reflected XSS (Cross-Site Scripting) flaw and a CSRF vulnerability. The XSS flaw allowed attackers to inject malicious code into a URL parameter that wasn't properly sanitized. By combining this with the CSRF vulnerability, attackers created a JavaScript payload that triggered the CSRF issue and led to a one-click account takeover
### Request Forgery In Real Life
YouTube (2008): Princeton researchers discovered a CSRF vulnerability on YouTube that allowed attackers to perform nearly all actions on behalf of any user. This included adding videos to favorites, modifying friend/family lists, sending messages to a user’s contacts, and flagging inappropriate content. The vulnerability was quickly fixed.
### ING Direct (2008):
ING Direct, a banking website, had a CSRF vulnerability that allowed attackers to transfer money from users’ accounts, even though users were authenticated with SSL.
### Directory Traversal
- Attempting to move from one folder to others within a system to access secure files or edits files and folders on the system
- Example: - You access an image on a website which is called by “filename=images/panda.jpg” and the image may have an absolute path to the file on the server as “/var/www/html/images/panda.jpg.” By manipulating the path using basic navigational commands, an unsecure system could be compromised. If the system were Linux based, typing in “filename=../../../etc/shadow” may give an attacker access to the password hashes.
@@ -1,73 +0,0 @@
---
title: Application Security
parent: Cyberforensics
grand_parent: Class Notes
---
# Application Security
Cybersecurity Forensics Lesson 4.1.4
___
### Application Security
- Measures and practices to protect applications from security threats.
- **Key Aspects**:
1. Input Validation
2. Secure Cookies
3. Static Code Analysis
4. Code Signing
- **Importance**: Enhancing resilience against cyber threats throughout the development lifecycle.
### Input Validation
- Checking and validating user inputs to prevent vulnerabilities.
- **Importance**: Mitigating risks of SQL injection, cross-site scripting (XSS), and input-based attacks.
- **Implementation**: Enforce strict validation rules and sanitize user inputs.
### Secure Cookies
- Enhancing data security by transmitting cookies over HTTPS.
- **Importance**: Preventing interception of sensitive data.
- **Implementation**: Mark cookies as “secure” to ensure encrypted transmission.
### Static Code Analysis
- Reviewing source code for security vulnerabilities without execution.
- **Importance**: Identifying code errors and weaknesses during development.
- **Implementation**: Use automated tools for comprehensive code analysis.
### Code Signing
- Digitally signing software code to confirm integrity and authenticity.
- **Importance**: Verifying source and preventing tampering.
- **Implementation**: Employ code signing in software distribution processes.
### Sandboxing
- Isolating running programs to prevent harm or unauthorized access.
- The term is derived from the idea of a child’s sandbox where play is constrained to a confined area.
- **Implementation**: Restricting access to system resources, networks, and data.
- **Importance**:
1. Preventing malicious actions
2. Limiting impact of security breaches
3. Controlling resource usage
4. Restricting network access
5. Protecting file system integrity
### Monitoring
- Observing and tracking system, network, and application performance and security.
- **Goals**: Detecting issues, ensuring availability, responding to security threats.
- Components: Data collection, analysis, alerting, and performance tracking.
### Security Monitoring
- **Importance**: Detecting and responding to security threats.
- Activities: Log analysis, anomaly detection, incident response.
- **Goal**: Timely identification and mitigation of security incidents.
### Performance Monitoring
- **Importance**: Optimizing resource utilization and identifying bottlenecks.
- Metrics: CPU usage, memory consumption, disk I/O, network latency.
- **Goal**: Enhancing system performance and scalability.
### Availability Monitoring
- **Importance**: Ensuring systems and services are available and responsive.
- Metrics: Uptime, response time, service availability.
- **Goal**: Maintaining service continuity and minimizing downtime.
### Log Analysis
- **Importance**: Troubleshooting, error identification, event sequence understanding.
- **Usage**: Analyzing logs for patterns, trends, and anomalies.
- **Goal**: Facilitating proactive management and resource planning.
@@ -1,30 +0,0 @@
---
title: Application Vulnerabilities
parent: Cyberforensics
grand_parent: Class Notes
---
# Application Vulnerabilities
Cybersecurity Forensics Lesson 2.3.1
___
### Memory Injection
- Technique used to insert or manipulate code within a running process.
- Can be used maliciously
- Code execution in security attacks
- Can be used positively
- Debugging, customization, or enhancing program functionality
### Buffer Overflow
- Technical attack that is caused by poor coding and software development.
- Buffer overflow attacks happen when data overflows a buffer capacity.
- Like pouring water into a pitcher beyond its capacity, causing a spill.
- In code it results from inserting more data into a variable than it can hold, potentially leading to overwriting adjacent memory addresses.
### Integer Overflow
- Involve overflowing buffers with excessive data, potentially overwriting adjacent memory.
- Integer overflow attacks occur when numeric variables exceed their maximum value. Leading to unintended results like looping back to zero or causing system failures.
### Race Conditions
- Occurs in code when the execution path depends on the timing of data writes to shared memory, registers, or variables rather than their values.
- Caused by poor coding practices where shared memory isn’t locked before multiple processes attempt to write to it.
### Malicious Update
- Appears as a legitimate software update but contains harmful code or functionalities.
- Can be distributed through compromised servers or fake notifications, posing risks like unauthorized access, data theft,or system compromise.
- Users should verify updates from official sources to mitigate these risks.
@@ -1,20 +0,0 @@
---
title: Brute Force Attacks
parent: CyberForensics
grand_parent: Class Notes
back_button: true
---
# Brute Force Attacks
Cybersecurity Forensics Lesson 2.4.14
___
## What is a Brute Force Attack?
A brute force attack is a form of password attack where the attack attempts to guess a password by trying many passwords in the attempt to guess the correct password
### Tools
A common tool that is used to execute Brute Force attacks is called "John the Ripper" or JTR, which uses tools for both plaintext and hashed passwords so that they can be decrypted and stored by the attacker
## How to Defend Against a Brute Force Attack?
• Strong Passwords, longer is better than complex
• Lockout after __ failed attempts
• Two-Factor Authentication
@@ -1,63 +0,0 @@
---
title: CIA Triad and AAA
parent: CyberForensics
grand_parent: Class Notes
---
# CIA Triad and AAA
Cybersecurity Forensics Lesson 1.2.1
___
### Define the CIA Triad and explain why it is important in information security.
- Confidentiality
- Integrity
- Availability
Provides a template of what needs to be done to ensure proper cybersecurity, for things such as data protection and transmission protection
- Access and privacy controls are designed to ensure only authorized users can access confidential information
- They include the principles of identification, authentication, and authorization
- Examples of authentication controls to protect include passwords, biometrics, PINs
### Give two examples of confidentiality controls and two examples of integrity controls.
Confidentiality controls:
- Requiring username+password to access sensitive data
- Making sure that people who are not employees are unable to configure system settings
Integrity controls:
- Keeping back-ups of your data so that it can be checked in case it was modified in any way
- Use proper databases that won't accidentally wipe data, use trusted vendors
### Explain the importance of non-repudiation in digital forensics and provide one method to achieve it.
- Non-repudiation allows for there to be undeniable proof of somethings rather that following a he-said-she-said. Can be accomplished with things such as cameras or logging systems
### Describe the AAA framework and its components.
- **Authentication** - Making sure that the person has the right amount of access
- **Authorization** - Giving only the amount of power that is needed for their tasks
- **Accounting** - Keeping records of what happened to provide evidence
### List three methods of authenticating people and three methods of authenticating systems.
- **Credential-Based**; Username and password, API keys
- **Token-Based**; Hardware or software tokens
- **Biometric**; Fingerprinting or behavioral metrics
- **Mutual**; Client and server authentication
- **Zero-Trust Architecture**; Assumes no system is trustworthy
### Briefly explain the five authorization models mentioned in the lesson.
###### The set of rules and policies that govern who can access and what actions can they perform within a system
Determined by several factors:
• System complexity
• Data sensitivity
• Compliance requirements
• Management
• Flexibility
## Authorization Model Types
### Access Control Lists (ACL)
- Assigns permissions directly to people or groups
- Simple with smaller numbers, but can become complex with larger systems
### Role-Based Access Control (RBAC)
- Assigns permissions based on roles and users are assigned these roles
- Examples include administrators, guests, editors, etc.
### Attribute-Based Access Control (ABAC)
- Assigns permissions based on attributes such as department, location, device type, time, etc.
- Well-suited for complex systems with dynamic needs
### Rule-Based Access Control (RuBAC)
- Rules define access conditions, often expressed as if-then statements
- Allows specific security requirements
- Very similar to ACLs
### Mandatory Access Control (MAC)
- Enforces restrictions based on security labels to users and resources
- Centrally controlled and often used in high-security environments
- High protection but less flexible for user needs
@@ -1,112 +0,0 @@
---
title: Common Attack Surfaces
parent: CyberForensics
grand_parent: Class Notes
---
# Command Attack Surfaces
Cybersecurity Forensics Lesson 2.2.1
___
### Threat Vectors
- The path a malicious user takes to gain unauthorized access to a network, system, or data
- Includes:
- Messages, files, removable devices, software, and much more Fake Google sign-in page
### Message-based
- Exploits vulnerabilities in communication methods such as email, text or SMS, social media, and instant messaging
- Usually contain a malicious link or attachment
### Images and Files
- Image-based: Exploits vulnerabilities in image processing, display, or how they are shared
- Takes advantage of the inherent trust people have with visual content
- File-based: Uses malicious code or scripting embedded within files that seem harmless
- Awareness of file sources, scanning files using updated anti-malware applications, and disabling macros can assist with this vector
### Voice Call-based
- Uses phone systems and general human behavior to gain personal information about a target
- Often involves the malicious actor pretending to be someone in need of information
- Verifying the caller’s identity, looking up unknown numbers, and being aware of pressure tactics should be used.
### Removable Device-based
- Devices such as flash-drives, external drives, discs, memory cards, etc. can all serve as a pathway for a malicious attack to infiltrate a system.
### Vulnerable Software
- Software itself can have unknown weaknesses or have pathways that allow an attacker to exploit
- Two types
- Client-based – The user must install the software, usually unintentional or deceived
- Agentless – Do not require a user to install and can be zero-day attacks or exploit in popular or outdated software
- Heartbleed is an example of a Zero- day software vulnerability
### Unsupported Systems and Applications
- Unsupported software means it is no longer receiving patches and updates from the original vender.
- This can cause:
- Vulnerabilities remaining unchecked
- Easy and repeated exploits due to no changes being made
- Upgrade immediately if possible
- Isolate from other systems and sensitive data if needed
### Network-based Vectors
- Exploit weaknesses in network or network-connected devices allowing an unauthorized user to:
- Access and steal data
- Disrupt operations
- Perform malicious actions on any system within the network
- Can be divided into
- Wired
- Wireless, including Bluetooth
### Wired Attacks
- Though they would seem secure when compared to wireless networks, wired networks can also be victims to malicious users.
- Devices can be connected and act as legitimate network devices
- ARP Spoofing has an attacker clone the MAC Address of a network device allowing them to capture and redirect traffic
- DNS poisoning use compromised DNS servers to send users to sites or devices that are often masquerading as real ones
### Wireless Attacks
- Exploits in wireless networks offer unique vulnerabilities and, in many cases, require the malicious user to mimic the wireless network(s) present
- Rogue access points involve creating a fake access point that copy a real one in hopes of intercepting data
- Other ways involve interrupting services on networks in hopes of forcing users to a rogue access point
### Bluetooth Attacks
- Unsecured or poorly protected Bluetooth devices can lead to several issues including:
- Unsolicited messages
- Malicious files
- Loss of personal or sensitive data
- In some cases, a malicious user may be able to take full control of the device.
- Using strong passwords, turning off Bluetooth when not needed, and updating software can help to mitigate these attacks
### Open Ports and Services
- Ports provide an entryway for certain processes to function within a system and network.
- Think of them as lanes on a highway but for network and data traffic
- While some ports and services are crucial to the functionality of a system, ports and services that only used temporarily should be closed/ turned off to prevent entry from a malicious user.
### Weak and Default Credentials
- Often seen as the bane of any cybersecurity professional, weak or default passwords being used can lead to a host of problems.
- These are usually found as
- Default credentials for software, hardware, or devices
- Guest devices or services that are connected to internal networks
- Weak passwords being used for accounts with higher privileges
- Protection against these usually involves checking and changing default settings and hardening of anything that is public facing
- “admin” is often used as the default username and password of many devices.
### Supply Chain Attacks
- Aimed at the third-party companies needed for an organization to function day to day
- Often have access to organizations through physical or virtual means
- Often hit at three different levels or areas
- Managed Service Providers
- Vendors
- Suppliers
- Can lead to a cascading effect that hits several businesses
### Managed Service Providers (MSPs)
- Typically provide services such as tech support or monitoring, cloud backups, or subscription services
- Can have several organizations as clients which is often kept on a shared infrastructure, meaning one breach can lead to several organizations being compromised
### Vendors and Suppliers
- Vendors tend to provide a finished product to an organization which could lead to security threats due to:
- Errors or flaws in software or hardware
- The vendor not being trustworthy and it being malware
- Suppliers usually provide raw materials, components, or finished products to larger manufacturers leading to potentially the same issues as above for vendors, but effecting a much larger group
### Supply Chain Attack Mitigation
- Organizations should always perform intensive security reviews of companies before entering in a contract.
- Define expectations and security responsibilities for the company being hired for the product or service
- Be mindful of the access to internal information and systems given to outside companies
@@ -1,32 +0,0 @@
---
title: Configuration Files
parent: CyberForensics
grand_parent: Class Notes
---
# Configuration Files
Cybersecurity Linux Lesson 1.7.1
___
## Updating Configuration Files
Updating configuration files involves making changes to the settings and parameters that define how a particular software or system operates
- Configuration files are typically in plain text and contain instructions or configurations for different aspects of the software
## Procedures
- Before changes are made, create a backup of the current configuration file
- Use a text editor, like nano, to review the current settings
- Make the requested modifications
- The corresponding service may need to be restarted for changes to text effect
- Test the new configurations, monitor for issues, and document for future reference
## RPM-based Systems
- When updating packages in RPM-based systems, when a configuration file has been modified and includes an update, the new version may be saved with a `.rpmnew` extension to avoid overwriting user changes
- The original file may be saved with a `.rpmsave` extension
## Repository Configuration Files
- Files that contain settings and configurations specific to a version control system repository
- Configuration files include:
- `/etc/apt.conf` in Debian-based systems
- `/etc/yum.conf` in RPM-based systems
- `/etc/dnf/dnf.conf` in Fedora and CentOS systems
- The `/etc/yum.repos.d` directory contains individual repository configuration files with each file corresponding to a specific repository and including settings for package sources
- The `/etc/apt/sources.list.d` directory contains additional configuration files for software repositories
@@ -1,32 +0,0 @@
---
title: Dictionary Attacks
parent: Brute Force Attacks
ancestor: Notes
grand_parent: Class Notes
---
# Dictionary Attacks
Cybersecurity Forensics Lesson 2.4.14
___
A dictionary attack is a form of password attack where the attacker uses a pre- determined list of passwords, or dictionary, to attempt to crack a password.
### How to use
This kind of attacks is very similar to brute force attacking but instead uses more common passwords, making it faster and more likely to get a hit than running every single combination of letters. This can be done with "John the Ripper" tool that comes with most Kali distributions
## How to Defend Against a Dictionary Attack
- Do not use generic passwords or old passwords
- Dictionary attacks use commonly-used passwords
- Dictionary attacks often contain old passwords that make have been compromised in the past
- Strong Passwords
- Increasingly longer delay between failed attempts
- Lockout after __ failed attempts
- Two-Factor Authentication
#### Real Dictionaries
- Real dictionary attacks use millions and billions of passwords.
- The dictionary file sizes are enormous because of all the possible combinations they contain.
- Where do these passwords come from?
- When a cyber attack occurs, the culprits will sometimes leak usernames and passwords online. These are added into a continuously growing list of known passwords and circulated online.
- A simple Google search will provide plenty of examples that can be
@@ -1,49 +0,0 @@
---
title: DoS and DDoS Attacks
parent: CyberForensics
grand_parent: Class Notes
---
# DoS and DDoS Attacks
Cybersecurity Forensics Lesson 2.4.8
___
### Denial of Service (DoS)
- Disrupt the availability of services or information by
- Rendering them inaccessible
- Preventing communication
- Creating distractions
- Impact network availability by overwhelming servers with traffic causing them to become unresponsive or slow down significantly.
### Distributed Denial of Service (DDoS)
- Attacks involve multiple sources attacking a target simultaneously.
- Actual computers
- Servers
- IoT devices
- More challenging to mitigate due to the distributed nature of the attack, making them more effective in overwhelming network resources.
### Amplified DDoS Attacks
- Leverage servers or systems that generate a significantly larger response to a small request.
- Commonly exploited protocols for amplification include
- <span style="color:rgb(255, 0, 0)">DNS</span> (Domain System Name)
- <span style="color:rgb(255, 0, 0)">NTP</span> (Network Time Protocol)
- <span style="color:rgb(255, 0, 0)">SNMP</span> (Simple Network Management Protocol)
### Reflected DDoS Attacks
- Involve exploiting servers or systems to reflect attack traffic towards the target.
- Attackers send requests with spoofed source IP addresses to these servers, making it appear as if the target is the source of the requests.
- The servers then respond to the target with amplified traffic, reflecting the attack back to the intended victim.
### DDoS Attacks and Targets
- <span style="color:rgb(255, 0, 0)">Network DDoS</span> attacks
- Target entire networks
- <span style="color:rgb(255, 0, 0)">Application DDoS</span> attacks
- Target specific applications
- <span style="color:rgb(255, 0, 0)">Operational technology (OT) DDoS</span> attacks
- Target physical machines connected to the network disrupting their operations.
### Defense strategies against DDoS attacks
- Properly configuring public-facing servers
- Monitoring connections
- Ensuring proper load balancing and adequate bandwidth
- Implementing security monitoring using IDS/IPS
- Restricting the use of insecure protocols like ICMP and UDP.
@@ -1,41 +0,0 @@
---
title: Hardware and Virtualization
parent: CyberForensics
grand_parent: Class Notes
---
# Hardware and Virtualization
Cybersecurity Forensics Lesson 2.3.3
___
### Hardware
- Hardware vulnerabilities encompass weaknesses or flaws in the physical components of computer systems that could be exploited by attackers.
- Firmware vulnerabilities refer to security flaws in embedded software within hardware components.
- End-of-life hardware lacks support, updates, and patches from manufacturers, leaving systems vulnerable to new security threats. Attackers target systems with end-of-life hardware knowing that discovered vulnerabilities won’t be patched.
### Legacy hardware
- Older hardware lacking modern security features. - Susceptible to known vulnerabilities and incompatible with newer security measures.
- Attackers target legacy hardware due to its vulnerabilities and limited security capabilities.
### Mitigating hardware vulnerabilities
- Keep firmware up-to-date - Replacing end-of-life hardware
- Securely disposing of decommissioned devices - Conducting regular security audits
- Implementing additional security measures for legacy hardware
### Virtualization Vulnerabilities
- Refer to security weaknesses and risks associated with the use of virtualization technologies.
- VM escape
- A vulnerability where an attacker gains unauthorized access from within a virtual machine to the host system or other VMs. It poses a risk by allowing attackers to compromise the security of the entire physical host or other co-located VMs.
- Resource reuse
- Involve insecure handling of virtualized resources. Mitigation implementing strong isolation mechanisms between VMs, robust access controls, and careful management of shared resources.
### Resource reuse vulnerabilities
- Involve insecure handling of virtualized resources, leading to unauthorized access or information leakage between VMs.
- Mitigation involves implementing strong isolation mechanisms between VMs, robust access controls, and careful management of shared resources.
### Cloud-specific vulnerabilities
- Refer to the security weaknesses or risks that are unique to cloud computing environments.
- Inadequate identity management
- Data breaches
- Insecure APIs - Shared technology issues
- Insufficient network security - Compliance and legal risks
- Lack of visibility and control
-43
View File
@@ -1,43 +0,0 @@
---
title: CyberForensics
parent: Class Notes
has_toc: false
---
# CyberForensics
## Unit 1
### 1.7.1: [Configuration Files]({% link src/class_notes/cyber_forensics/configuration_files.md %})
### 1.2.1: [CIA Triad and AAA]({% link src/class_notes/cyber_forensics/cia_triad_and_aaa.md %})
### 1.2.3: [Physical Security]({% link src/class_notes/cyber_forensics/physical_security.md %})
## Unit 2
### 2.1.1: [Threat Actors]({% link src/class_notes/cyber_forensics/threat_actors.md %})
### 2.2.1: [Command Attack Surfaces]({% link src/class_notes/cyber_forensics/common_attack_surfaces.md %})
### 2.2.2: [Principles of Social Engineering]({% link src/class_notes/cyber_forensics/social_engineering.md %})
### 2.2.3: [Phishing and Spam]({% link src/class_notes/cyber_forensics/phishing_and_spam.md %})
### 2.2.5: [Watering Hole and Typosquatting]({% link src/class_notes/cyber_forensics/watering_holes_and_typosquatting.md %})
### 2.3.1: [Application Vulnerabiliies]({% link src/class_notes/cyber_forensics/application_vulnerabilities.md %})
### 2.3.3: [Hardware and Virtualization Vulnerabilities]({% link src/class_notes/cyber_forensics/hardware_and_virtualization_vulnerabilities.md %})
### 2.3.4: [Supply Chain, Zero Day, and Cryptographic vulnerablilities]({% link src/class_notes/cyber_forensics/supply_chain_zero-day_and_cryptographic_vulnerabilities.md %})
### 2.4.11: [Application Attacks]({% link src/class_notes/cyber_forensics/application_attacks.md %})
### 2.4.14: [Password Attacks]({% link src/class_notes/cyber_forensics/password_attacks.md %})
- [Brute Force Attacks]({% link src/class_notes/cyber_forensics/brute_force_attacks.md %})
- [Rainbow Tables]({% link src/class_notes/cyber_forensics/rainbow_tables.md %})
- [Dictionary Attacks]({% link src/class_notes/cyber_forensics/dictionary_attacks.md %})
### 2.4.2: [Ransomware]({% link src/class_notes/cyber_forensics/ransomware.md %})
### 2.4.3: [Trojans, Backdoors, and Rats]({% link src/class_notes/cyber_forensics/trojans_backdoors_and_rats.md %})
### 2.4.5: [Keyloggers]({% link src/class_notes/cyber_forensics/keyloggers.md %})
### 2.4.6: [Logic Bombs and Rootkits]({% link src/class_notes/cyber_forensics/logic_bombs_and_rootkits.md %})
### 2.4.10: [DoS and DDoS Attacks]({% link src/class_notes/cyber_forensics/dos_and_ddos_attacks.md %})
## Unit 4
### 4.1.3: [Mobile Solutions]({% link src/class_notes/cyber_forensics/mobile_solutions.md %})
### 4.1.4: [Application Security]({% link src/class_notes/cyber_forensics/application_security.md %})
### 4.5.2: [OS and Monitoring]({% link src/class_notes/cyber_forensics/os_and_monitoring.md %})
## Unit 5
### 5.6.2: [Security Awareness]({% link src/class_notes/cyber_forensics/security_awareness.md %})
<!-- # Chronologically Ordered Notes:
W.I.P. -->
@@ -1,39 +0,0 @@
---
title: Keyloggers
parent: CyberForensics
grand_parent: Class Notes
---
# Keyloggers
Cybersecurity Forensics Lesson 2.4.6
___
### Keyloggers
- Keystrokes contain valuable information
- Passwords, usernames, messages, credit card information
- Save all keyboard input
- Sent to malicious actor
- Circumvents encryption protections
- Keystrokes are not encrypted
- Can log other data:
- Screenshots
- Clipboard
- Instant messages
- Search history
### Legitimate Uses for Keyloggers
- Concerned parents can keep tabs on children’s computer activity.
- Law Enforcement
- The FBI used keyloggers on machines given to Russian cybercriminals to capture their usernames and passwords when they accessed their computers in Russia with the provided machines.
### Preventing Keyloggers
- Usually installed with malware
- Use anti-virus/anti-malware
- Keep your signatures updated
- Be careful with passwords
- Use one-time passwords or multi-factor authentication when possible
- Consider using a password manager to avoid typing all together!
- Physical protection
- Consider using a different keyboard layout – like Dvorak or Colemak
- Block unauthorized communication
- Block the exfiltration attempt
- Firewall rules/monitoring
@@ -1,63 +0,0 @@
---
title: Logic Bombs and Rootkits
parent: CyberForensics
grand_parent: Class Notes
---
# Logic Bombs and Rootkits
Cybersecurity Forensics Lesson 2.4.6
___
### Logic Bombs
- A piece of code that waits for a particular set of conditions to be met, referred to as triggers
- Triggers could be
- Number of transactions
- Certain system events
- User interaction
- Date/time (Referred to as a Time Bomb in this case)
- Once triggered, the program executes
- Often these are installed by an insider threat, such as a disgruntled employee and are setup before leaving and triggered by their removal in the system.
### Roger’s Logic Bomb
- In 2002, Roger Duronio successfully deployed a logic bomb against his now former employer, UBS Wealth Management, over a disagreement in his annual bonus leading to two thousand servers crashing and nearly 400 offices being hit.
- An estimated $3.1 million in damages was done and Roger got a new 9x9 home for 8 years as he served his time for computer fraud
### Defending Against a Logic Bomb
- Due to their nature, logic bombs are incredibly difficult to identify and are not even active until the triggers have been met.
- Using strong anti-virus software, keeping systems updated, and monitoring system tasks can assist with catching a malicious script or program hidden away.
- Regular backups are crucial for restoring anything lost and in the case of Roger, helped by providing the logs of him accessing the system and setting up the logic bomb.
### Rootkits
- Gives the user “root” access
- root = admin account on Linux/UNIX
- kit = the necessary software components that implement the tool
- Alters system files
- Done to hide evidence of its existence
- Firmware rootkits rewrite part of the BIOS to start before the OS
- Bootkits replace a system’s bootloader for the same purpose
- Kernel rootkits replace some of the OS kernel to start at the same time as the OS
- Driver rootkits pretend to be a trusted driver the OS communicates with – drive shimming
### A Rootkit for Everyone
- <u>NTRootkits</u>
- One of the first rootkits to target the Windows Operating System
- <u>Machiavelli</u>
- The first rootkit to target Mac OS X, found in 2009
- <u>Stuxnet</u>
- First known rootkit for industrial control systems (ICS)
### More on Stuxnet
- One of the most famous rootkits, found in 2010
- Contains three parts:
- A worm that executes all routines related to the main payload of the attack
- A link file that automatically executes propagated copies of the worm
- A rootkit component responsible for hiding all malicious files and processes to prevent detection.
- Targets supervisory control and data acquisition (SCADA) systems
- Is believed responsible for damage to Iran’s nuclear program
### Defense Against Rootkits
- Keep your system current with:
- The latest patches (software updates) against known vulnerabilities
- Application updates
- Security software updates
- If available, enable Secure Boot
- Detects tampering with bootloaders, key operating files, and unauthorized changes in firmware by validating digital signatures.
@@ -1,44 +0,0 @@
---
title: Mobile Solutions
parent: CyberForensics
grand_parent: Class Notes
---
# Mobile Solutions
Cybersecurity Forensics Lesson 4.1.3
___
### Mobile Solutions
- Technologies and strategies for managing, deploying, and connecting mobile devices.
- Key Component: Mobile Device Management (MDM)
- Tasks: Device provisioning, security management, usage monitoring.
### Deployment Models
1. Bring Your Own Device (BYOD)
- Employees use personal devices for work.
- Pros: Flexibility
- Cons: Security Concerns
2. Corporate-Owned, Personally Enabled (COPE)
- Company-provided devices for work and personal tasks.
- Pros: Control over device and security
- Cons: Limited personal freedom
3. Choose Your Own Device (CYOD)
- Employees choose from approved device options.
- Pros: Balance between flexibility and control.
- Cons: Limited device options.
### Connection Methods
1. Cellular
- Devices connect using cellular data networks (3G, 4G, 5G).
- Importance: Crucial for remote work and on-the-go connectivity.
2. Wi-Fi
- Devices connect to local networks for faster, stable internet access.
- Usage: Common in offices and public places.
3. Bluetooth
- Short-range wireless technology for device communication.
- Usage: File sharing, connecting peripherals.
### Comprehensive Mobile Solutions
- Integration: Deployment models and connection methods work together.
- Addressing Challenges: Security concerns, device management, connectivity.
- Opportunities: Flexibility, productivity, remote work capabilities.
- Importance: Creating a seamless and efficient mobile environment in corporate settings.
@@ -1,56 +0,0 @@
---
title: OS and Monitoring
parent: CyberForensics
grand_parent: Class Notes
---
Cybersecurity Forensics Lesson 4.5.2
___
# OS and Monitoring
### Operating System Security
- Measures and practices implemented to protect the operating system and its components from unauthorized access, attacks, and potential security threats.
- Involves the implementation of security controls, policies, and mechanisms to ensure confidentiality, integrity, and availability of the OS.
- Two components commonly associated with OS security:
- Group Policy
- SELinux
### Group Policy
- A feature in Microsoft Windows OS for defining and enforcing security settings and configurations.
- Enables centralized management of security policies, application settings, and other configurations in Active Directory.
- Group Policy settings control user access, password policies, software installation, and security-related configurations.
- Contributes to a more secure OS environment by enforcing consistent policies across the network.
### SELinux
- A security extension in the Linux kernel for mandatory access controls (MAC).
- Surpasses traditional discretionary access controls (DAC) by enforcing policies.
- SELinux policies define rules for interactions between users, processes, and files.
- These policies enhance the overall security of the Linux OS.
### Security Measures – File Integrity Monitoring (FIM)
- Monitors and detects changes to files and file systems. - Ensures integrity of critical systems and application files.
- Helps detect and respond to security incidents like unauthorized access or malware infections.
### Data Loss Prevention (DLP)
- Prevents unauthorized access, sharing, or leakage of sensitive data.
- Monitors and controls data transfers within the organization. - Includes content discovery, encryption, and polices to protect sensitive data.
### Network Access Control (NAC)
- Regulates and restricts network access based on predefined policies.
- Allows only authorized devices and users to connect to the network.
- Assesses device health and compliance before granting access.
### Endpoint Detection and Response (EDR)
Extended Detection and Response (XDR)
- Detects, investigates, and responds to security incidents at the endpoint level.
- EDR monitors and analyzes endpoint activities for signs of malicious behavior.
- XDR integrates data from multiple security layers for a comprehensive threat view.
### User Behavior Analytics (UBA)
- Analyzes patterns of user behavior to identify anomalies and security threats.
- Detects insider threats, compromised accounts, and other security incidents.
- Monitors user activities and provides alerts for further investigation
### Combining Measures for Cybersecurity
- FIM ensures file integrity. - DLP prevents data loss.
- NAC controls network access. - EDR/XDR detects and responds to endpoint threats.
- UBA analyzes behavior for security insights. - Combined, these measures contribute to a robust cybersecurity posture.
@@ -1,48 +0,0 @@
---
title: Password Attacks
parent: CyberForensics
grand_parent: Class Notes
---
# Password Attacks
Cybersecurity Forensics Lesson 2.4.14
___
## Looking at the kali password:
Here is a very basic example of a password which is stored in the `/etc/shadow` directory
`kali:\$y\$j9T$ufXTBpN1QpgwlgqRFmb/B0\$/.y0ybAF4iNQXniErsDWf9QSl2HZH7LnBeRHB4ZiQa9`
Breakdown of above text:
`username:\$hash number\$salt\$hashed password:`
| Kali has the following data: | |
| --- | --- |
| username | kali |
| Hash Algorithm | '\$y\$' (or yescrypt) |
| Salt: | ‘j9T$ufXTBpN1QpgwlgqRFmb/B0’ |
| Hash: | ‘/.y0ybAF4iNQXniErsDWf9QSl2HZH7LnBeRHB4ZiQa9’ |
| Plaintext password: | ‘kali’ |
## How to Defend Against a [[Brute Force Attacks|Brute Force Attack]]
- Strong Passwords, longer is better than complex
- Lockout after __ failed attempts
- Two-Factor Authentication
## How to Defend against [[Rainbow Tables|Rainbow Table Attacks]]
- Salt those passwords!
- A salt is string of characters added to a password before it is hashed
- Using a unique salt for each user makes using a rainbow table more
difficult
- The rainbow table has to be recomputed for each user.
- If a password is found, which part is the hash and which is the password?
- Key Stretching
- “Hashing the hash”
- Hashed values are hashed multiple times to increase the computation time required to hash each password
## How to Defend Against a [[Dictionary Attacks|Dictionary Attack]]
- Do not use generic passwords or old passwords
- Dictionary attacks use commonly-used passwords
- Dictionary attacks often contain old passwords that make have been compromised in the past
- Strong Passwords
- Increasingly longer delay between failed attempts
- Lockout after __ failed attempts
- Two-Factor Authentication
@@ -1,31 +0,0 @@
---
title: Phishing and Spam
parent: CyberForensics
grand_parent: Class Notes
---
# Phishing and Spam
Cybersecurity Forensics Lesson 2.2.3
___
### Phishing
• An attempt to gain sensitive information through fraudulent means such as a link or soliciting a response via email, text, or other messaging
• Usernames
• Passwords
• Credit card details
• Bank credentials
• And more
• Categorized as a type of social engineering that takes advantage of human behaviors
### Advancements in Phishing
• Phishing has evolved from the older emails promises large sums of money to include new tactics such as:
• <u>Voice phishing</u> or vishing which can be done with a real voice, digitally altered voice, or AI
• Eliciting personal information in a covert way, perhaps even to use in follow attempts
• Pretending to be legitimate organizations such as the IRS, warranty companies, or companies known for giving away prizes
• <u>SMS phishing</u> or smishing via text since messaging has become ingrained in society
### Types of Phishing
• Phishing not only occurs through different types of media, such as text, email, etc., but also varies on who it targets.
• <u>Spam</u> targets massive amounts of users with the hope that a fraction of them will fall victim.
• <u>Spear phishing</u> is directed at a specific target that has usually been under recon from the malicious actor.
• <u>Whaling</u> is phishing directed at high profile targets such as a CEO or high-ranking officials.
• <u>Clone phishing</u> is using a legitimate email address to send a cloned email that contains a malicious link or attachment.
@@ -1,60 +0,0 @@
---
title: Physical Security
parent: Cyberforensics
grand_parents: Class Notes
---
# Physical Security
Cybersecurity Forensics Lesson 1.2.3
___
### Physical Security Controls
- Bollards
- Access Control Vestibule
- Fences and Signs
- Video Surveillance
- Security Guard
- Access Badge
- Lighting
- Sensors
### Bollards
- Restricts access to a particular area
- Channels people through a specific point but prohibits cars or trucks.
- Other examples include moats, concrete barriers, and gravel pits.
### Access Control Vestibule
- Helps to enforce a “one scan, one entry guideline” for access to a restricted area.
- Small space with two sets of interlocking doors installed in a way that the one set of doors must be closed before the other set can open.
- Also known as sally port, air lock, or mantrap
### Fences and Signs
- A fence is a barrier, railing, or other upright structure that clearly defines the perimeter of the area.
- Signs can deter some people, but for other malicious users, they can be a case of “x marks the spot”.
### Video Surveillance
- Closed Circuit Television (CCTV) is video surveillance you can use to see what is happening within your facility.
- Ensure to use camera with the right properties including focal length, field depth, and lighting requirements.
### Security Guard
- Allow or disallow people through a security checkpoint.
- Robot sentries
- Receptionists
- Two-person integrity
### Access Badge
- Logs movement through a central security system.
- Correlates logs between the physical world and digital world
### Lighting
- Proper internal and external lighting are critical elements of physical security.
- Dimly lit areas make it easier for intruders to easily execute illicit operations.
### Sensors
- Infrared
- Motion detection and night vision camera and can alert for possible movement within a given area.
- Pressure
- Can detect pressure near a door or atmospheric pressure in a room.
- Microwave
- Can automatically turn on lights in a room due to motion but also set off alarms from motion.
- Ultrasonic
- Can be used for proximity and distance.
@@ -1,73 +0,0 @@
---
title: Rainbow Tables
parent: CyberForensics
grand_parent: Class Notes
---
# Rainbow Tables
Cybersecurity Forensics Lesson 2.4.14
___
## What is a Hash?
- A hashing algorithm is an algorithm that converts input data (or a
message) of varying size to a hash output of a fixed size
- A hash is a one-way function, impossible to revert.
- Generally, the longer the fixed output the less possibility of collisions
(two inputs producing the same output), thus the more secure the
hashing algorithm
SomeBigLongValue ---> 33ce0634
tinyval ---> 0c430308
NggYuNgLYDngraaDY ---> 3803062f
## What is a Rainbow Table?
- Pre-calculated series of hashes using known hashing algorithms
- Commonly used for cracking passwords
- Find the matching hash string of text
- Look up the input text that gave the result
- Voila! There’s the password/input string
- Rainbow tables are application-specific
- Built for each different application or OS
- No one table for all uses
## How does a Rainbow Table work?
- Get the first X characters of a hash
- Hash these characters
- Get the first X characters of that hash
- Hash these characters
- Do this repeatedly...
- This creates a "chain"
- Each chain can be referred to as a color "<span style="color:rgb(255, 0, 0)">red</span>" (first hash), "<span style="color:rgb(255, 152, 0)">orange</span>" (second hash), "<span style="color:rgb(255, 255, 0)">yellow</span>" (third hash), etc.
- After obtaining enough chains, they create a table
- A table of all the colors... like a rainbow. Hence a "rainbow table".
- Only store the plaintext and final hash value for each chain
- All values in between plaintext and final hash can be re-computed as needed
- To use the table, take the first X characters of the target hashed password and look for a match in the table.
- If a match is not found, take the first X characters, hash, and search again
- If a match is found, you know the plaintext at the front of that chain is part of the target password – this narrows the search by X characters.
- Take the next X characters and start the process again
- It is a narrowing down of the thousand and millions of possibilities
## Rainbow Tables vs. Brute Force
- ###### Advantages of a Rainbow Table
- No need to match the whole string, looking for parts
- Not trying all values, only searching a table (fast)
- Can be done offline
- System does not know attempts are being made to crack the password of its users!
- ###### Advantages of a Brute Force
- Does not need to store the large Rainbow Table dataset
- Which can be large! Can be gigs of text or even terabytes
- Works for all passwords, just takes time (lots and lots and lots of time)
## How to Defend against Rainbow Table Attacks
• Salt those passwords!
• A salt is string of characters added to a password before it is hashed
• Using a unique salt for each user makes using a rainbow table more
difficult
• The rainbow table has to be recomputed for each user.
• If a password is found, which part is the hash and which is the password?
• Key Stretching
• “Hashing the hash”
• Hashed values are hashed multiple times to increase the computation time required to hash each password
@@ -1,31 +0,0 @@
---
title: Ransomware
parent: CyberForensics
grand_parent: Class Notes
---
# Ransomware
Cybersecurity Forensics Lesson 4.2
___
### Ransomware
- Malware that encrypts, or locks, a victim’s access to files and/or the system and demands a ransom to regain access
- Often, the demand is met with an ultimatum of the ransom increasing and/ or the data being deleted after a certain period.
- Attackers use ransomware to target data that is valuable
- Personal data such as finances, photos, and documents
- Corporate data such as company financials, proprietary or trade secrets, customer data
### Types of Ransomware
- Cryptomalware encrypts files, folders, or hard drives but the operating system itself may still be available.
- Cryptomalware can also mean ransomware that asks for cryptocurrency for payment.
- Lockers or locker-ransomware can lock a user out of their device completely, preventing them from accessing anything on the device.
- Scareware alerts a user of an issue and demands payment to fix it. This threat is often accompanied by pop-ups and other issues on the device
- Doxware, exortionware, or leakware threatens to release the stolen data if the ransom is not paid.
- Often used against public officials and celebrities with threats to release private or sensitive information
### To Pay or Not to Pay?
- Ransomware is profitable for malicious actors simply because so many people pay the ransom to recover their files, which may or may not be returned in either case.
- Preventing an attack from occurring or eliminating the need to pay for the return of the data is the best defense.
- This can be done with:
- Training on potential threats
- Backing up data, preferably offsite or cloud-based
- Keeping systems and backups updated so there is little to no loss between the attack and recovery
@@ -1,47 +0,0 @@
---
title: Security Awareness
parent: CyberForensics
grand_parent: Class Notes
---
# Security Awareness
Cybersecurity Forensics Lesson 5.6.2
___
### Anomalous Behavior Recognition
• The knowledge and ability to recognize unusual behavior that might signal a security threat
• Things to look for:
• Abnormal system activities
• Login patterns
• Data access
• Requires an environment where employees feel safe and inspired to share any suspicious behavior
### Cultivating Awareness
• Staff should be knowledgeable and able to recognize behaviors associated with risks:
• Unexpected
• Unintentional
• Risky
• Create clear guidelines on acceptable use policies.
• Have ongoing, interactive learning on data handling, security, and safe browsing policies.
### User Guidance and Training
• Develop engaging and comprehensive security handbooks to outline policies and procedures and ensure they are fully accessible to employees.
• Promote situational awareness regarding evolving security threats and current trends.
• Educate employees on Insider threats and how not all threats are from outside sources but can be from employees within an organization using the “if you see something, say something” philosophy.
### Key Topics to Outline
• Strong password management practices including training on creating strong passwords and introduce multi-factor authentication.
• Note risks associated with removable media and cables, particularly the use of unauthorized media and integrate this into regular security checks.
• Include training on social engineering tactics through engaging simulations or sharing real-world examples.
• Build operational security, such as communications and data handling practices into daily activities.
• Be aware of how these topics can be covered not just for local employees, but for hybrid/remote workers as well.
### Reporting and Monitoring
• Setup mechanism for reporting and monitoring security incidents that can be streamlined and ensure swift and accurate handling of concerns.
• Conduct intensive analysis and reviews of security logs to identify concerns.
### Development and Execution
• Implement security awareness seamlessly throughout the entire employee lifecycle by:
• <u>Integrating</u> security into the employee onboarding process.
• <u>Reinforcing</u> awareness through regular training to create a continuous learning environment.
• <u>Developing</u> dynamic programs that correspond with the ever-changing landscape of cybersecurity.
• <u>Providing</u> continuous education, clear policies, and proactive monitoring can contribute to a resilient security environment.
@@ -1,48 +0,0 @@
---
title: Social Engineering
parent: CyberForensics
grand_parent: Class Notes
---
# Social Engineering
Cybersecurity Forensics Lesson 2.2.2
___
### Social Engineering
• Using social interactions, such as relationships, persuasion, and body language, to gain access to secretive or personal information or persuade someone to perform an action.
• Can be a single person or a group working together
• Can be performed in-person or though technical means such as texting, email, and social media
### Principles of Social Engineering
• <span style="color:rgb(255, 0, 0)">Authority</span>
• The malicious actor acts as an authority figure to gain information
• _“Don’t you know who I am?!”_
• _“This is the police!”_
• <span style="color:rgb(255, 0, 0)">Intimidation</span>
• Exploits fear, usually with the idea that there are repercussions if you do not comply, or if you don’t help, bad things happen.
• <span style="color:rgb(255, 0, 0)">Consensus/Social proof</span>
• Make it seem routine or as if everyone is performing the action
• _“This isn’t the first time we’ve done this.”_
• _“Jose in IT did this for me last time.”_
### Principles of Social Engineering
• <span style="color:rgb(255, 0, 0)">Scarcity</span>
• Limited time to decide or a limited opportunity to get a prize or have a task completed
• <span style="color:rgb(255, 0, 0)">Urgency</span>
• You must act now with no time to think about the outcome
• <span style="color:rgb(255, 0, 0)">Familiarity/Liking</span>
• Someone you know, we have common friends
• _“John put me in touch with you”_
• <span style="color:rgb(255, 0, 0)">Trust</span>
• Someone who is safe or is simply performing their duty
• _“I’m from IT. I’m being helpful. Let me help you.”_
### Defending Against Social Engineering
• Look for the principles discussed or warning signs:
• Authority
• Intimidation
• Consensus/ Social Proof
• Scarcity
• Urgency
• Familiarity/ Liking
• Trust
• Recognizing key words and phrases such as “Act now”, “Supplies are limited”, “You were chosen as a winner” etc. are all potential clues to a social engineering attack.
@@ -1,133 +0,0 @@
---
title: Supply Chain Vulnerabilities
parent: CyberForensics
grand_parent: Class Notes
---
# Supply Chain Vulnerabilities
Cybersecurity Forensics Lesson 2.3.4
___
### Supply Chain Vulnerabilities
- Weaknesses or risks associated with products and services supplied by third- parties
- Can be exploited leading to a compromise to the entire organization
- Key vulnerability points:
- Service
- Hardware
- Software
### Service Provider Vulnerabilities
- Many organizations contract out various IT services such as cloud computing, management services, and security.
- An exploited service may lead to unauthorized access to customer data, disruptions in service, or more
- Being meticulous in selecting a service provider, performing security checks, and having strong contractual agreements can assist in limiting these
### Hardware Provider Vulnerabilities
- Responsible for manufacturing and supplying the physical components of computer systems such as routers, servers, etc.
- Weaknesses can compromise an entire system - Attackers could install malware, access and manipulate data, or gain unauthorized access to other system components
- Mitigation includes validating the integrity of the components, working with trusted vendors, and conducting security assessments of the hardware.
### Software Provider Vulnerabilities
- Develop and distribute applications, operating systems, and other software
- Vulnerabilities in these systems can lead to unauthorized access, insertion of malicious code, or compromising data
- Mitigation includes regular security updates, installing patches, using reputable vendors, performing security checks, and monitoring for vulnerabilities
### Combating Supply Chain Vulnerabilities
- Because of how supply chains are woven together, creating a complex system, approaching risk management needs to have a comprehensive approach including:
- Vendor Risk Management:
- Assessing the security of suppliers, service providers, and others in the supply chain
- Continuous Monitoring:
- Ongoing monitoring for security issues, updates, alerts, and changes
- Incident Response Planning:
- Develop and regularly test response plans that address potential supply chain issues
- Security Standards and Certification:
- Encourage or require suppliers recognize security standards and obtain relevant certifications
### Cryptographic Vulnerabilities
- Refer to weaknesses in the design, implementation, or use of cryptographic systems that could be exploited by attackers
- Cryptography is highly utilized in securing information particularly against unauthorized access, data breaches, and any other compromise in integrity
### Key Management and Weak Algorithms
- Key Management
- Weaknesses can arise during generation, distribution, or storage of keys
- If cryptographic keys are compromised, data could be decrypted and accessed
- Weak Algorithms
- Using outdated or insecure algorithms allow attackers to possibly break the encryption, decrypt information, or perform other attacks
### Randomness and Side-channel Attacks
- Random Number Generation Weakness
- Insecure or predictable number generation can make the encryption process weaker and susceptible to brute force attacks
- Side-channel Attacks
- Exploited information leaked from the execution of cryptographic algorithms such as timing, power consumption, or electromagnetic readings can give insight to cryptographic keys and compromise their integrity
### Padding Oracle and Key Length/ Entropy
- Padding Oracle Attacks - Padding schemes used in protocols like SSL and TLS can be exploited through the error handling process
- Key Length and Entropy Issues - Using shorter keys or inadequate entropy in generating keys makes them more susceptible to brute-force attacks
### Backdoors and Post-Quantum Concerns
- Cryptographic Backdoors
- The deliberate or unintentional inclusion of vulnerabilities in cryptographic systems allowing access to systems and compromises the integrity of the encrypted data
- Post-quantum Cryptography Concerns
- Future quantum computing could outclass current cryptographic algorithms, reemphasizing the need for post-quantum cryptographic standards
### Mitigating Cryptographic Vulnerabilities
- Implementing secure practices and staying informed of emerging threats
- Use well established cryptographic algorithms - Maintain strong key management practices
- Implement proper number generation techniques - Monitor for side-channel attacks and implement countermeasures
- Stayed informed of best practices and standards
### Misconfiguration Vulnerabilities
- Security weaknesses that arise from errors or oversights in software, systems, networks, and/or applications
- Can lead to a multitude of security risks including exploits to the system and data compromising
- Can result from:
- Human error
- Lack of awareness
- Inadequate security practices
### Types of Misconfiguration Vulnerabilities
- Using default settings, such as factory credentials, can allow attackers to gain access to systems
- Weak credentials expose systems to brute force attacks
- Leaving ports or service open/ running can provide an attack surface for malicious users
- Inadequate access control can allow unauthorized access
- Failure to update software, configure devices, establish proper firewall rules, and more can all lead to vulnerabilities
### Handling Misconfiguration Vulnerabilities
- Adopt a robust security plan that includes: - Regular security audits
- Ensure default settings have been changed and/ or are secure
- Implement access control properly and have a password policy in place
- Keep all software, systems, applications, etc. updated
- Provide security training and awareness for employees
- Address any potential issues from assessments and monitoring to enhance the security of an organization
### Mobile Vulnerabilities
- Security risks associated with smartphones, tablets, and other mobile devices and compromising the data stored or transmitted by the device
- Two common types of mobile vulnerabilities
- Side-loading
- Jailbreaking or Rooting
### Mobile: Side-loading
- Installing applications on a mobile device from a source other than the official app stores – e.g. Google Play Store, Apple App Store
- These unofficial apps may be malicious and contain code that compromises the security of the device
- The solution is only downloading apps from trusted sources
### Mobile: Jailbreaking and Rooting
- Removing software restrictions from the manufacturer or operating system to gain escalated privileges and access to system files
- Jailbreaking (Apple iOS) and Rooting (Android) tends to give users more customization and control over devices, it does bypass built-in security features and prevents it from receiving automatic security updates
- Keeping native settings and operating systems is key to keeping the integrity of the device
### Zero-day Vulnerabilities
- Security vulnerabilities in software, hardware, or firmware that are unknown to the vendor or developer and therefore have not been patched or addressed
- Designated as zero-day because once exploited or discovered, there are zero days for the developer to release a patch.
### Zero-day Nightmares
- Because the vulnerability is unknown by vendors, there several issues to contend with
- No patches or fixes available to address it
- Being unknown, there is a high chance there is no way to detect it or block attacks using the exploit
- Often heavily planned by larger hacking groups, state actors, or other malicious entities to launch coordinated attacks to steal information and compromise systems
- The time between discovery and patching is crucial as well as how fast applying the update can be performed as systems are vulnerable during this process
### Alleviating Zero-day Attacks
- Since zero-day attacks take advantage of unknown weaknesses, it is important to be proactive in defending against them such as:
- Employ strong security practices across the board
- Segmenting networks to prevent entire systems from being exposed
- Implementing the principle of least privilege
- Use of intrusion detection systems
- Stay informed of emerging vulnerabilities and threats
- Regularly update, and in the case of zero-day attacks stay informed of release times for patches addressing such vulnerabilities
@@ -1,49 +0,0 @@
---
title: Threat Actors
parent: CyberForensics
grand_parent: Class Notes
---
# Threat Actors
Cybersecurity Forensics Lesson 2.1.1
___
### What are threat actors?
- Groups of people who pose a threat to the security of software
### What are script kiddies, and what is their typical skill level?
- The term "Script kiddie" is usually a negative label used by more sophisticated hackers to belittle one another or dismiss someone for not being knowledgeable
### How do hacktivists differ from other threat actor groups, and what motivates them?
- Medium skilled professionals who perform exploits and attacks for a cause
- Driven by their political, commercial, or economic message
- End goal is to spread their message to a wider audience to raise awareness for their cause
### What distinguishes organized crime groups in terms of their motivations and activities?
- The are fueled by money and the desire to gain power to continue their influence
- Organized criminals, or criminal syndicates, use exploits to continue their organized crime business
### Describe the characteristics of nation states and advanced persistent threats (APTs) in the context of cybersecurity.
- Also known as state actors or advanced persistent threats
- Very advanced government or military organisations
- Argued that Stuxnet malware was carried out by a nation state because of its sophistication
### What defines insider threats, and why are they considered particularly dangerous?
- Work within an organization to expose business secrets and data
- Usually carry out low-level attacks
- May act out of vengeance or spite due to an even that happened to them at work that they feel is unfair
### What is the difference between black hat (unauthorized user), white hat (authorized user), and grey hat (semi-authorized) hackers?
- Black Hat; Malicious users who intend to cause damage and harm to their targets
- White Hat; Find vulnerabilities and exploits in a system with the intent to patch them
- Grey Hat: Breaking the law but usually nor with malicious purposes
### Explain the concept of shadow IT and its potential impact on organizations.
- Part of a larger organization that do not follow the IT department rules and attempt to work around them
- Find a way to work around security utilize locked features without the IT Departments consent
### Attributes of Actors
- Internal - Trusted insiders that have permission to be in the organizations network
- External - Do not have access or special privileges to the network
- Resources and Funding - How well the threat actor can support their attack
- Capability - One of the most important factors to determine of a threat actor's attack is successful
- Level of sophistication - Highly sophisticated threat actors are more likely to be successful
@@ -1,38 +0,0 @@
---
title: Trojans, Backdoors, and RATs
parent: CyberForensics
grand_parent: Class Notes
---
# Trojans, Backdoors, and RATs
Cybersecurity Forensics Lesson 2.4.3
___
### <span style="color:rgb(255, 0, 0)">Trojans</span>
- Software that is downloaded, installed, and seems harmless but does have a malicious intent
- Reference to the Greek story of the siege of Troy
- Unlike typical viruses, trojans cannot self- replicate nor propagate without user interaction
- In most cases a user falls victim to a social engineering scheme and downloads the software thinking it is a harmless attachment or something they need or want.
### <span style="color:rgb(255, 0, 0)">Backdoors</span>
- The ability to access a system or data by bypassing the security controls
- Avoids the normal login process
- Can occur through various means:
- Malware might install a backdoor to get back into the system
- Software may contain accidental backdoors meant originally to perform maintenance
- There could be an exploit that allow an intruder to gain access through a backdoor
### <span style="color:rgb(255, 0, 0)">Remote Access Trojans (RAT) </span>
- A type of trojan that combines the use of a backdoor allowing a malicious actor to have administrative and remote control of the host
- Allows a hacker to connect remotely and examine files, log keystrokes, find passwords, take screenshots, or use the connection to download additional malware
### Other Forms of Trojans
- Downloader Trojans can imitate pre-existing software that may need an update or serve to update pre-existing malware already installed on the device.
- DDoS Trojans infect a victim's computers then perform DDoS attacks in hopes of disrupting network services
- SMS Trojans can infect mobile devices and send and intercept messages
### Trojan Defense
- Never download or run unknown or untrusted software
- Verify signatures or hashes from developers prior to installing software
- Keep anti-virus software updated
- Back-up important files in the event a trojan is installed
- Be mindful of opening attachments, even from known senders
@@ -1,49 +0,0 @@
---
title: Watering Hole and Typosquatting Attacks
parent: CyberForensics
grand_parent: Class Notes
---
# Watering Hole and Typosquatting Attacks
Cybersecurity Forensics Lesson 2.2.5
___
## Watering Hole Attacks
- Taken from the same behavior observed from animals in the wild do when they return to the same areas for water and nutrition every time
- A watering hole is a metaphor for a place that users go to seeking information or resources online.
- This is typically paired with a popular site that has been compromised or a fake site setup to mimic a legit site.
- In either case the site serving as the watering hole usually contains malware and is activated from a user visiting the page.
- The frequency of visits to the page allows little effort on the part of the malicious user but has potential for a high reward
## Defending Against Watering Hole Attacks
- Many times, little to nothing can be done about the watering hold itself; however, being proactive in your defenses is key to protecting yourself.
- Keeping anti-malware/ anti-virus software updated
- Being attentive to what is downloaded, noticing things like downloads occurring without any input from the end-user
- Take note of changes in your devices and how well it functions as less optimal performance might be a sign of something malicious
## Typosquatting
- Involves slightly changing the URL, such as seen in day-to-day typos, to resemble a well-known website.
- There are signs to look for such as:
- Spelling
- Domain listed such as .com vs .net
- Security checks such as http vs. https
- Google owns a few domains that are common typos for Google as shown in the table to prevent things such as typosquatting
| Google owned domains with common typos |
| ------------- |
| Gooogle.com |
| Gogle.com |
| Gogole.com |
| Googl.com |
### Hijacking Hijinks
- Client hijacking involves concealing malicious links to malware and sites, so they appear to be legitimate to the casual user.
- Clickjacking involves hiding a link or object containing a link above the object the user would normally click on, such as an image.
- URL hijacking involves slight changes to URLs to mimic the original, such as typos, which is where the term typosquatting comes from.
### Session Hijacking
- Cookies are small bits of information that save authentication data and other website preferences.
- Session hijacking occurs when an attacker steals the cookie used to authenticate a user on a website.
- Once stolen, the unauthorized user can login to sites with the victim’s cookie
@@ -1,45 +0,0 @@
---
title: Account Configuration and Management
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Account Creation and Management
Cybersecurity Linux Lesson 2.2.2
___
### Account Creation and Configuration
Creation of a user leads to several actions and configurations to create a secure environment tailored to the user’s needs.
• Typically, a Linux system will run a series of shell commands in Bash upon startup.
• The system’s shell acts as an interpreter between the user and the operating system, reading startup configs and inputs.
### Account Authentication
Prior to Bash running setup and configuration commands a user must be authenticated on the system
• The `passwd` command is used when adding a user and setting up their password
• The command can also be used to view password statues, set expirations, and more
### Password Directives
• Along with the `passwd` command, the `chage` command can be used to change the expiration details of a user such as the age , expiration warning parameters, and the account expiration date
• The `/etc/login.defs` file is associated with an account when created and sets password directives
### Failed Login Attempts
• The `pam_tally2` and `faillock` utilities allow viewing and managing failed login attempts such as locking an account after so many attempts
### Data Associated with Authentication
• System users and accounts created by applications are stored in the `/etc/passwd` file
• Information includes:
• Username
• User and group ID
• Home directories
• Default shell used `
• The `/etc/group` file will store similar data, but with groups instead
• In the past, passwords were also stored in the `/etc/passwd` file; however, that has changed to now being stored in the `/etc/shadow` file, or the `/etc/gshadow` for group information
• The password will not appear in plaintext, but is instead shown in a salted, hashed format
### Environment Configuration
• The `/etc/profile` file is read when a user logs in and sets up the initial environment, such as system paths, shell prompts, aliases, and other functions
• `/etc/skel` is a directory that contains files and directories that are copied when an account is created
• When the account is created, these provide the user with a pre-configured, or default, environment
### Bash Configuration
• `.bash_profile` is initially executed upon logging in to setup the behavior and environment for the Bash shell
• The `.bashrc` file has the same purpose but is applied immediately and only requires relaunching the terminal
@@ -1,90 +0,0 @@
---
title: Account Creation and Deletion
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Account Creation and Deletion
Cybersecurity Linux Lesson 2.2.1
___
### Creating User Accounts
To create a new user account, we use the command `useradd` followed by the username.
Format:
```bash
sudo useradd <options> <new username>
```
For example:
```bash
sudo useradd john
```
### Adding More Information
You can change or add info to a user account with the `usermod` command. Format:
```bash
sudo usermod <options> <username>
```
For example:
```bash
sudo usermod –c “John Smith” john
```
This will set the user’s comment, which is often a full name, to John Smith.
Or
```bash
sudo usermod –g Sales john
```
This will add the john account into the Sales group.
### Adding Groups
The `groupadd` command in Linux is used to create a new user group on the system.
Format:
```bash
sudo groupadd <options> <new group name>
```
For example:
```bash
sudo groupadd mygroup
```
Groups can be used to manage users with similar permissions or rights.
### Modifying Groups
Groups can by modified with the `groupmod` command.
Format:
```bash
sudo groupmod <options> <group name>
```
For example:
```bash
sudo groupmod –n supergroup mygroup
```
This would change the name of an existing group from "mygroup" to “supergroup”.
### Deleting User Accounts and Groups
To delete a user account, use the `userdel` command followed by the username. For example:
```bash
sudo userdel john
```
To delete the account plus their directories use the `–r` option:
```bash
sudo userdel -r john
```
Similarly groupdel deletes entire groups.
```bash
sudo groupdel mygroup
```
### Check User Information
There are commands you can use to quickly check system information about a user.
The `id` command displays the user's unique ID, their groups and other user account properties. Use the following command:
```bash
id john
```
The `who` command displays list of logged-in users.
The `w` command provides detailed information about logged in users including the time they logged-in and the processes they are running
@@ -1,84 +0,0 @@
---
title: Compression and Archiving
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Compression and Archiving
Cybersecurity Linux Lesson 1.2.2
___
### File Compressing and Archiving
• Compressing and archiving are fundamental processes for Linux users
• Optimize disk space utilization
• Size of data is reduced allowing for efficient storage and faster transmission
• Ensure safety and integrity of data
• Safeguard against loss or deletion
• Allow restoration in the event of a hardware failure or malicious attack
### System Images
• Clones of the operating system and configuration
• Do not recover directories or files but allow a fast bootup for a system
### Backup and Backup Types
Backups, occasionally referred to as archives, aid in restoring data that has been compromised
<u>Full Backup:</u>
• Copies everything on the system
• Useful for recovering corrupted or lost files
• Very time consuming
• Takes up a ton of space
<u>Incremental Backup: </u>
• Copies everything on the system only if it has been modified
since the last backup by cross checking timestamps
• Takes less time that a full backup
• Each backup takes up less storage
• Recovery can be very time consuming due to having multiple
components to pull from
<u>Differential Backup:</u>
• Like an incremental backup in that it only backs up what has been modified but differs in that it goes by the timestamp of the most recent full backup
• Occurs less often that an incremental backup
• Stronger chance that data could be lost
### Snapshots
• Creates a full backup that is read-only
• Takes a “snapshot” of the directory and files’ metadata and how things are stored
• The read-only aspect makes the snapshot much faster than traditional backups
• Snapshots of the metadata can occur multiple times a day
### Archiving
• Like backups in that a copy is typically made
• Usually limited in size or specific to a set of data
• Often used with sensitive data, or data that must be kept for long periods of time such as financials but may not need accessing on a regular basis
### Archiving – cpio Utility
• Stands for copy in and out
• Can be run within a directory to archive those specific files
• `cpio` maintains the directory’s references and outputs the data plus the files and directories contained into one archive file
### Archiving – tar Archiver
• Stands for tape archiver
• Similar to `cpio` but has the option to compress the files as well
• Uncompressed data is referred to as a tar archive file
• Compressed data is referred to as a tarball
### File Compression – gzip, bzip2, and xz
• All of the utilities compress files using the zip and unzip mechanism
• The commands are the name of the utility with the file name as seen with `gzip file1`
• `bzip` compresses files more than `gzip` but takes longer
• `xz` can compress at a higher rate but also offers options to change the rate
### Backing Up Entire Drives with dd
• The `dd` utility allows a user to copy the contents of a disk or partition onto a new drive or partition
• Requires some additional steps such as ensuring the drive(s) being copied and the one(s) being copied to are not mounted, which may involve booting from an external source
| Tool | Common Uses | Pros | Cons |
| --- | --- | --- | --- |
| gzip | Compressing single files | Fast and simple | Lower compression ratio |
| bzip2 | Compressing larger files | Higher compression | Slower speed |
| xz | Highest compression | Maximum compression for large files | Even slower, requires more memory |
| zip | Cross-platform compression | User-friendly, works across different operating systems | Less efficient compression |
| tar | Archiving multiple files and directories | Easy management | Needs additional tools for compression |
| cpio | Archiving with directory maintenance | Versatile for backups | More complex to use |
| dd | Disk cloning and imaging | Accurate cloning of disk partitions | Risky: Requires careful handling |
@@ -1,71 +0,0 @@
---
title: File and Directory Management
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# File Directory Management
Cybersecurity Linux Lesson 1.2.5
___
Users will learn to navigate and manage the files
and directories contained within the Linux
system
- Linux systems have a resourceful CLI that contains multiple file and directory operations
- These allow
• Creation
• Deletion
• Moving
• Copying
• And other manipulations of files and directories
### Navigating a Linux System
Several commands assist users in knowing where they are and what files are located there while traversing the file directory:
#### **<span style="color:rgb(255, 0, 0)">pwd</span>** (print working directory):
Shows the users current location while
working in the directory
#### **<span style="color:rgb(255, 0, 0)">ls</span>** (list):
Shows the files and directories located in the current
working directory.
Like many command in Linux systems, list has additional options that can be added to include more information
• `ls –a` shows hidden files/directories
• `ls -l` shows the long format
• `ls –R` shows recursive files/directories
The list command has many additional options that can be explored
#### **<span style="color:rgb(255, 0, 0)">tree</span>**
The tree command will print a visual map of the current working directory as well as any subdirectories
• `tree -d` will only list directories
• As with the list command, `tree` offers other options that can be explored as well using the command `tree -- help`
#### **<span style="color:rgb(255, 0, 0)">cd</span>**
The change directory command allows users to navigate around
• `cd <Directory Name>` moves the user to the listed directory
• Using the absolute or relative path moves you to that directory without going step by step as seen in the command `cd Documents/Sub_Directory`
• `cd ..` moves the user up one directory
• `cd` by itself will return the user to the home directory (~/)
#### **<span style="color:rgb(255, 0, 0)">mkdir</span>**
The make directory command allows users to create new directories within the terminal
• `mkdir <Directory_Name>` will create a directory within the current working directory
• `mkdir /Documents/Test` will create a directory within the Documents folder
• The command can be used with relative or absolute paths
#### **<span style="color:rgb(255, 0, 0)">touch</span>**
The touch command allows users to create new files within the terminal
• `touch <File1>` will create a file within the current working directory
• `touch <File2> <File3>` will create two files within the current working directory and can be extended as needed to include more files
• `touch /Documents/File4` will create a file within the Documents folder
#### <span style="color:rgb(255, 0, 0)">**cat**</span>
The cat, or concatenate command allows users to view files within the terminal
• `cat <File>` will print the contents of the file into the terminal
#### **<span style="color:rgb(255, 0, 0)">mv</span>**
The move command can move files or directories wherever specified
• `mv <file/directory_name> <new_location>` will move the file to the designated location
• When used without a designated new location the move command can be used to rename a file or directory in the current working directory if a new name is added instead such as seen with `mv <file> <new_file_name>`
#### **<span style="color:rgb(255, 0, 0)">cp</span>**
The copy command can copy files or directories wherever specified
• `cp <file/directory_name> <new_location>` will copy the file/directory to the designated location
• When copying a directory, the `–r` option must be included to include the files within the directory unless it is empty
#### **<span style="color:rgb(255, 0, 0)">rm</span>**
The remove command is used to delete files or directories
• `rm <file_name>` deletes a file or directory
• The remove command will only remove a directory if the `–r` option is added
• Adding `–i` as an option will add a check before each file to verify deletion
• `rmdir <directory_name>` can also be used to delete empty directories
@@ -1,150 +0,0 @@
---
title: File Editing
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# File Editing
Cybersecurity Linux Lesson 1.2.1
___
### Text Editing
- Text editing is an important skill when using a Linux system
- Whether changing a configuration file or writing a script, having a grasp on more than one text editor in Linux will be valuable
- The text editors shown in this lesson are:
- nano
- vi(m)
- These text editors require different levels of skill, but both have solid features
### Nano Editor
- Nano is the more user-friendly of the two editors
- In a terminal, type nano and the name of the file to create to start using this editor
- Similar to other word-processing applications in that you can immediately begin typing without commands
- Comes with its own shortcuts and lists them on the bottom of the editor so that you don’t have to remember them
### Nano Shortcuts
| Shortcut | Alternative Keys | Description |
| -------- | --- | ------------------------------------- |
| Ctrl + G | F1 | Get Help, displays a help text box |
| Ctrl + X | F2 | Close the current buffer / Exit from nano (Nano then asks if you want to save with a Y or N option) |
| Ctrl + O | F3 | Write the current buffer (or marked region) to disk / Save |
| Ctrl + R | Ins | Insert another file into the current buffer (or into a new buffer) |
| Ctrl + W | F6 | Search forward for a string or regular expression |
| Ctrl + \ | M-R* | Replace a string or regular expression |
| Ctrl + K | F9 | Cut current line (or marked region) / Like Ctrl + X in word processing |
| Ctrl + U | F10 | Paste the contents of cutbuffer / Like Ctrl + V in word processing |
| Ctrl + J | F4 | Justify the current paragraph |
| Ctrl + T | F12 | Invoke the spell checker, if available |
| Ctrl + C | F11 | Display the position of the cursor |
| Ctrl + _ | M-G* | Go to line and column number |
Notice the alternative keys for Replace and Go To Line are M-R and M-G. The M represents Esc or Alt or the Meta key on your keyboard depending on how it is set up. On the CYBER.ORG Range, that M would stand for Alt. So, those commands would look like Alt + R and Alt + G.
### Vi or Vim Editor
- When you are ready for a more frustrating... uh, powerful text editing experience, vi(m) editor is the choice for you.
- As the previous line suggest, vi(m) editor is not novice friendly. But since you can’t get at something until you try it, let’s look at vi(m).
- Vi(m) is the more popular editor for scripting and programming.
- Just like with nano, to use this editor you type vi (or vim depending on the distribution) and then the name of the file.
###### The Three Modes Vi or Vim Editor
| Command Mode | Insert Mode | Ex Mode |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Sometimes called normal mode, this is how vi(m) looks when first opened. It will only accept commands. Some common commands will be listed on the next slide. | By pressing i on the keyboard, you’ll notice the word INSERT at the bottom of the screen. This means you are now able to enter text just in nano. Press Esc to switch back to command mode. | This mode is sometimes called colon commands because commands here are preceded by a colon (:) |
### Vi(m) Shortcuts
###### Command Mode
| Keystroke | Description |
| --- | --- |
| h | Move cursor left one character. |
| l | Move cursor right one character. |
| j | Move cursor down one line. |
| k | Move cursor up one line. |
| w | Move cursor forward one word to front of next |
| e | Move cursor to end of current word. |
| b | Move cursor backward one word. |
| ^ | Move cursor to beginning of line. |
| $ | Move cursor to end of line. |
| gg | Move cursor to file’s first line. |
| G |Move cursor to file’s last line. |
###### Ex Mode
| Keystroke | Description |
| --- | --- |
| :x | Write buffer to file and quit editor. |
| :wq | Write buffer to file and quit editor. |
| :wq! | Write buffer to file and quit editor. |
| :w | Write buffer to file and stay in editor. |
| :w! | Write buffer to file and stay in editor. |
| :q | Quit editor without writing buffer to file. |
| :q! | Quit editor without writing buffer to file. |
### Stream Editors
- Once files have been created, stream editors can change the way text looks on a standard output – the screen
- Stream editors can range from simple to complex and range from changing words in text to helping sort large text outputs into more manageable chunks
- The stream editors we will discuss are:
- `printf`
- `sed`
- `awk`
### printf
• `printf` will show on the screen (your standard output) whatever you input into the command using the formatting you ask of it.
• The printf command works like this: `printf FORMAT [ARGUMENT]`
• So, with the command `printf “%s\n” “Hello, World!”`, let’s take a look at what we are asking the command to do.
###### printf Format Options
| Format | Description |
| --- | --- |
| %c | Display the first ARGUMENT character. |
| %d | Display the first ARGUMENT as a decimal integer number. |
| %f | Display the ARGUMENT as a floating-point number. |
| %s | Display the ARGUMENT as a character string. |
| \% | Display a percentage sign. |
| \” | Display a double quotation mark. |
| \\ | Display a backslash. |
| \f | Include a form feed character. |
| \n | Include a newline character. |
| \r | Include a carriage return. |
| \t | Include a horizontal tab. |
Okay, so based on the chart, what will this command do?
It prints the string ‘Hello, World!’ and then puts the command line on a new line, of course!
### sed
• `sed` stands for stream editor
• `sed` can be used on text files with one pass as the text “streams” through this utility
• In that single pass, `sed` looks for patterns in the text as dictated by the user
• The command looks like: `sed [OPTIONS] [SCRIPT]... [FILENAME]`
• Much like the `printf` command, `sed` can very simply print text to the screen, but make changes according to requests
###### sed Commonly Used Options
• When using sed with a file, we’ll need some options.
• Here are the most common options.
• Option i (-i) will actually save the changes we make with sed to the file we are using so that we don’t have to go back and do that later.
| Short | Long | Description |
| --- | ----------------- | --- |
| -e script | --expression=script | Add commands in script to text processing. The script is written as part of the sed command. |
| -f script | --file=script | Add commands in script to text processing. The script is a file. |
| -r | --regexp-extended | Use extended regular expressions in script. |
| -i | --in-place | Edits file in place. |
### awk
• `sed` and `awk` have a lot in common in the way they can change text
• `awk` is more powerful since it is a programming language for completing formatted reports for large data sets
• A big difference is that `awk` treats each item separated by a space as a separate field
• The command looks like: `awk [OPTIONS] [PROGRAM]... [FILENAME]`
• `awk` comes in a variety of versions. When GNU project rewrote it, it became `gawk`. Either way you type it, many distribution will still put from `gawk`
###### awk Commonly Used Options
| Short | Long | Description |
| --- | ----------------- | --- |
| -F d | --field-separator d | Specify the delimiter that separates the data file’s fields |
| -f file | --file=file | Use program in file for text processing. |
| -s | --sandbox | Execute awk program in sandbox mode. |
• Option F (-F) allows us to tell awk what the delimiter will be
that separates fields.
• If we wanted to print just the users in the /etc/shadow file for
instance, we would want to indicate that the delimiter of that
file is the : (colon) between each field.
@@ -1,23 +0,0 @@
---
title: Cybersecurity Linux
parent: Class Notes
---
# Cybersecurity Linux Fundamentals
___
### [Account Configuration and Management]({% link src/class_notes/cybersecurity_linux/account_configuration_and_management.md %})
### [Account Creation and Deletion]({% link src/class_notes/cybersecurity_linux/account_creation_and_deletion.md %})
### [Compressing and Archiving]({% link src/class_notes/cybersecurity_linux/compressing_and_archiving.md %})
### [File and Directory Management]({% link src/class_notes/cybersecurity_linux/file_and_directory_management.md %})
### [Linux Directories]({% link src/class_notes/cybersecurity_linux/linux_directories.md %})
### [Metadata]({% link src/class_notes/cybersecurity_linux/metadata.md %})
### [Script Utilities and Variables]({% link src/class_notes/cybersecurity_linux/script_utils_and_variables.md %})
### [Shell Script Elements]({% link src/class_notes/cybersecurity_linux/shell_script_elements.md %})
@@ -1,62 +0,0 @@
---
title: Linux Directories
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Linux Directories
Cybersecurity Linux Lesson 1.1.1
___
## <span style="color:rgb(255, 0, 0)">/boot</span> (boot)
- The /boot (read as root, boot) directory contains all the files required for the system's boot process
- Includes the kernel of the system, RAM images, bootloader configuration files, etc.
## <span style="color:rgb(255, 0, 0)">/proc</span> (processes)
- The /proc directory contains information about processes, hardware configuration, and kernel parameters
- E.g. /proc/in.fo provides information about the system's CPU
## <span style="color:rgb(255, 0, 0)">/sys</span> (system info)
- The /sys directory holds information about the kernel parameters and device attributed
- E.g. /sys/gpio can manipulate the GPIO pins on embedded systems
## <span style="color:rgb(255, 0, 0)">/var</span> (variables)
- The /var directory contains all the files that change while the system is being used
- Mainly used for storing variables data that is generated by services and applications
- Logs are stored in /var/log
- Cached data is stored in /var/cache
## <span style="color:rgb(255, 0, 0)">/usr</span> (user's info)
- The /usr directory contains data and resources about system users
- /usr/bin contains commands, executables, utilities, and applications
- /usr/share contains fonts, images, documentations, etc
## <span style="color:rgb(255, 0, 0)">/lib</span> (libraries)
- The /lib directory contains libraries for the system typically needed for the early stages of the boot process
- Occassionally split in /lib32 and /lib 64 for 32-bit and 64-bit libraries, respectively
## <span style="color:rgb(255, 0, 0)">/dev</span> (hardware devices)
- The /dev directory contains device files that provide access to hardware devices on the system
- /dev/sda typically represents the first hard drive (or /dev/sda1 as first partition)
- /dev/ttyS0 is usually a serial port
- /dev/null and /dev/zero are used for input/output
## <span style="color:rgb(255, 0, 0)">/etc</span> (config files)
- The /etc directory contains configuration files and shell scripts for the system
- /etc/fstab is the file system table
## <span style="color:rgb(255, 0, 0)">/opt </span> (optional software)
- The /opt directory holds optional/add-on software packages
- Allows for easy management and helps prevent conflicts with system files
## <span style="color:rgb(255, 0, 0)">/bin</span> (binaries or commands)
- The /bin directory contains the essential executable files for the system to function
- Contains the fundamental commands for the system to function including ls, cp, mv, etc.
## <span style="color:rgb(255, 0, 0)">/sbin </span> (system binaries or commands)
- The /sbin directory is reserved for system administrators and contained essential system binaries
- Commands included within this directory are fdisk, reboot, and ifconfig
- These commands must be run as superuser
## <span style="color:rgb(255, 0, 0)">/home</span> (user directory folder)
- The /home directory is where system users home directories are located
- /home/student would be the home directory for a user, student
## <span style="color:rgb(255, 0, 0)">/root</span> (root directory folder)
- The /root directory is the home directory for the superuser/root account
- Contains config files, scripts, etc.
## <span style="color:rgb(255, 0, 0)">/media</span> (removable storage devices)
- The /media directory is used as a mount point for removable media devices such as USB drives, external hard drives, optical discs, etc.
## <span style="color:rgb(255, 0, 0)">/mnt</span> (mount point)
- The /mnt directory is a general-purpose mount point used for temporarily mounting filesystems or devices
- /mnt can be used for any kind of mount operation
## <span style="color:rgb(255, 0, 0)">/tmp</span> (temporary files)
- The /tmp directory is a location for storing temporary files and directories
- May be deleted by the system during reboots or to free up disk space
@@ -1,37 +0,0 @@
---
title: Metadata
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Metadata
Cybersecurity Linux Lesson 1.2.3
___
### Metadata
Users will learn how data is cataloged in most Linux
systems.
- Linux uses metadata to help us understand the differences between files of the same type
- Some examples include:
- The title, artist, and album of a song in an .mp3
- The creation data, file size, and resolution of a photo in a .jpg
- The GPS coordinates of a geotagged image.
- The hashtags associated with a social media post.
- The keywords used to describe a website.
### Metadata - Example
Picture yourself in a library looking for a book about dinosaurs, looking up and down every aisle until you finally find it.
• Instead, you could search the catalog for “dinosaurs”
• The catalog is database of information about books containing:
• Titles
• Authors
• Subjects
• And more
### Metadata - Commands
**<span style="color:rgb(255, 0, 0)">stat</span>**
• Prints out the status of Linux files, directories, and file systems
• Includes information regarding files, directories and file systems such as their sizes, blocks, inodes, permissions, and timestamps for modification
**<span style="color:rgb(255, 0, 0)">file</span>**
• Determines the file type, ignoring the extension used for file
• Different extensions can be used on a file either accidently or maliciously
@@ -1,45 +0,0 @@
---
title: Script Utilities and Variables
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Script Utilities and Variables
Cybersecurity Linux Lesson 3.1.3
___
### Common Script Utilities
- `awk` scans files for specific patterns and extracts information based on those patterns
- `sed` (stream editor) is designed for efficiently processing and transforming text streams
- Allows for search and replace, insertion, deletion, etc.
- `find` searches files and directories in a directory hierarchy
- `xargs` takes inputs from a pipe or file and converts it into arguments for a specified command
### Additional Common Script Utilities
- `grep` is used for searching patterns within text files
- `egrep`/`grep -E` supports extended regular expressions
- `tee` reads standard input and writes to both standard output and files simultaneously
- `wc` (Word Count) counts lines, words, and characters in a file or input stream
- `cut` extracts specific fields from each line of a file
### Remaining Common Script Utilities
- `tr` translates or deletes characters in a stream of data
- `head` displays the first few lines of a file
- `tail` displays the last few lines of a file
### Environment Variables and Paths
- `$PATH` specifies a colon-separated list of directories where the system looks for executable programs
- `$SHELL` points to the user's default shell
- `$?` Represents the exit status of the last executed command
- 0 typically indicates success while non-zeros indicate errors or specific exit statuses
### Environment Variables and Paths
- What does this command do:
`echo $PATH | tr ':' '\n' | awk -F/ '{ print $NF }' | uniq`
### Relative and Absolute Paths
- Relative paths describe the location of a file or directory in relation to the current working directory
- Useful for navigating within the file system without specifying the full path
- E.g. `./file`
- Absolute paths specify the complete path from the root directory to a file or directory
- Provides an unambiguous reference
- E.g. `/home/user/file`
@@ -1,83 +0,0 @@
---
title: Shell Script Elements
parent: Cybersecurity Linux
grand_parent: Class Notes
---
# Shell Script Elements
Cybersecurity Linux Lessons 3.1.1 and 3.1.2
___
# <u><span style="color:rgb(0, 176, 80)">Part 1</span></u>
### Loops
• A “while” loop executes a set of commands if a specified condition is true
• A “for” loop iterates over a sequence, like a range of numbers, and performs commands
• An “until” loop executes a set of commands if the specified condition is false
### Conditionals
Control structures that allow one to make decisions and execute different sets of commands based on true/false conditions
• An if statement executes a set of commands based on the evaluation of a condition
• Switch/Case provides multiple possible execution paths based on the value of an expression
### Shell Parameters
A feature in shell scripting that allows one to manipulate and expand the values of variables
• Extract substrings, perform pattern matching, etc.
• Globbing matches filenames with patterns
• Brace expressions generate arbitrary strings using curly braces
### Shell Comparisons
Essential for making decisions based on the values of variables or the success/failure of commands
• Using double parentheses, arithmetic operations can be performed
• Strings can be compared with operators like == (the same) or != (not the same)
### Boolean Logic
• Shell scripting doesn't have a native boolean type but still uses boolean logic
• Users can combine conditions using logical operators, && for AND, || for OR
### Shell Variables and Search and Replace
• Used to store and manipulate data
• Act as placeholders that can be referenced or modified within a script
• If a piece of text needs to have a part replaced, "search and replace" does that
### Regular Expressions
• Regex or regexp are powerful patterns used for matching character combinations with strings
• Wildly used for tasks like string manipulation, text parsing, and pattern matching
# <u><span style="color:rgb(0, 176, 80)">Part 2</span></u>
### Shell Script Elements
• The | (Pipe) connects the output of one command as the input to another command
• This helps chain commands together
• The example below generates a fortune and uses the tool cowsay to display the fortune
### Or, Oar, or Ore
• The || (OR) command executes the command following it ONLY IF the preceding command fails/returns an error
• Often used in control flow
• An alternative to an if-then-else command
### Redirection
• The > (Output Redirection) redirects the standard output to a file, overwriting it if the file already exists
• The >> (Also Output Redirection) appends the standard output to the end of a file, rather than overwrite it
• The < (Input Redirection) redirects the input from a file to a command
• The << (Here Document) allows multiple lines to be put into a command
### And, &, and &&
• The &> combines standard output and standard error to a specified file, overwriting the file if it already exists
• The && (AND) command executes the following following it ONLY IF the preceding command succeeds
- Understanding Boolean logic and truth tables makes understanding these operators a little easier
### Standard Standards
• STDOUT is the standard output stream where a program writes its regular output
• STDERR is the standard error stream where a program writes its error messages
### Exit Codes
• Also known as return codes or status codes
• Numeric values returned by a command or program to indicate the result of its execution
- 0 typically means success
- Nonzero values typically indicate an error or some kind of failure
• The OS or shell keeps track of the exit code so other scripts or processes can proceed
### Shell Built-In Commands
• Built into the shell itself
• More efficient because they don't require a separate process
• read reads input from a user or file
• echo prints text or variables to the standard output
• source execute commands from a file in the current shell environment
@@ -1,129 +0,0 @@
---
title: "CyberSecurity Net - Acronyms"
parent: Cybersecurity Networking
grand_parent: Class Notes
---
# Networking Acronyms
___
What are **OIDs**?
Object Identifiers are an identifier mechanism standardized by the International Telecommunications Union and ISO/IED for consistent naming.
What is the **VRRP**?
The Virtual Router Redundancy Protocol is a computer networking protocol that provides for automatic assignment of available Internet Protocol routers to participating hosts.
What is a **FHRP**?
A First-Hop Redundancy Protocol is a computer networking protocol designed to protect the default gateway used on a subnetwork by allowing two or more routers to provide backup for that address.
#cybersecurity/oid #cybersecurity/vrrp #cybersecurity/fhrp
### Network Address Assignment:
##### IP address:
Internet Protocol; A method of sending data across network devices based on logical addresses that are assigned to them
##### MAC address:
Details physical address of a network device, first 3 octets are manufacturing ID and the last 3 octets is the devices vendor ID (serial number), cannot be dynamically changed (like IP) but can be spoofed
##### DHCP:
Dynamic Host Configuration Protocol; Will automatically assign new network devices (like phones connecting to the wifi) a IP address so that the router can communicate with it
##### DNS:
Domain Name System; Used so that locating IP network locations could be done in a human-readable way using words rather than decimal IP addresses
##### ARP:
Address Resolution Protocol; Translates **IP** addresses **TO** their respective **MAC** addresses
IP >>> MAC
##### VLAN:
Virtual Local Area Network; Is used to separate the main LAN into different sub-networks that can be configured for different uses. Allows for communication from LAN to LANs in the network, but NOT from user to user in the network, users are more isolated. To limit collisions on the network, to increase security, and to increase performance by limiting the number of network resources the packets travel across.
##### PoE:
Power over Ethernet; A way for network devices to be powered AND connected to the network with a single twisted-pair cable. Is used to power IP phones, security cameras, and wireless APs.
IEEE standards: 802.3af, 802.3at, and 802.3bt; They are standards that describe how a powered device is detected and how power is given to a device from PoE and PoE+ technologies (different wattage amounts)
#cybersecurity/ip #cybersecurity/mac #cybersecurity/dhcp #cybersecurity/dns #cybersecurity/arp #cybersecurity/vlan #cybersecurity/poe
### Server Downtime Terms
##### RTO:
The amount of time to recover processes after a disruption
##### RPO:
A measurement of the maximum tolerable amount of data to lose
##### MTTR:
The average time taken to restore a system when it does fail
##### MTBF:
The average time until a system failure
##### MTTF:
The average time until a system has an irreparable failure
#cybersecurity/rto #cybersecurity/rpo #cybersecurity/mttr #cybersecurity/mtbf #cybersecurity/mttf
### Wifi Acronyms
##### SSID:
The WLAN (wifi) network name
##### IoT:
Internet of Things: refers to the idea that many different appliances use the power of the internet to be managed, for things such as:
Smart refrigerators, baby cameras, video doorbells, smartwatches, wireless thermostats, etc.
##### AP:
Access Point: Used to connect a wired network to a wireless network using radio waves
##### BSS:
The collection of stations that communicate together in an 802.11 network
##### ESS:
Interconnected WLANs integrated into LANs
#wifi #cybersecurity/ssid #cybersecurity/iot #cybersecurity/ap #cybersecurity/bss #cybersecurity/ess
### Company Agreements
##### CRC:
Cyclic Redundancy Checks are an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.
##### AUP:
An Acceptable Use Policy is a document identifying exactly what is and what is not appropriate activity on an organization’s network
##### DLP:
Data loss prevention is a strategy to keep private or proprietary data such as health data, personally identifiable information, financial statements, proprietary diagrams, and other private information from being shared through unauthorized access.
##### DA:
A legal contract that identifies what information is confidential and limits its use and dispersal of that information.
##### MOU:
A document detailing something both sides can agree to but may not be signed.
##### SLA:
An agreement between two parties that indicate the minimum level of services required.
#cybersecurity/crc #cybersecurity/aup #cybersecurity/dlp #cybersecurity/da #cybersecurity/mou #cybersecurity/sla
##### What’s the difference between the MDF and an IDF?
The Main Distribution Frame connects equipment to cables and subscriber carrier equipment. An Intermediate Distribution Frame serves as a distribution point for cables from MDF to individual cables connected to equipment in areas remote from these frames.
### Over-the-Network Management
##### RDP:
Remote Desktop Protocol
##### VNC:
Virtual Network Computing, is used to control network devices using the RFB protocol
##### RFB:
Remote Frame Buffer protocol is used for graphical control of user interfaces
#cybersecurity/rdp #cybersecurity/vnc #cybersecurity/rfb
### Network Routing:
##### RIP:
Routing Information Protocol; Uses hop count as a routing metric to determine the most efficient route between the source and its destination using the Bellman-Ford algorithm.
##### OSPF:
Open Shortest Path First; Works by finding the best path from the source to the destination router according to its own shortest path first algorithm (Dijkstra).
##### EIGRP:
Enhanced Interior Gateway Routing Protocol; Uses the concept of an autonomous system to describe the set of contiguous routers running the same protocols and sharing the same information.
##### BGP:
Border Gateway Protocol; Is the core routing protocol of the internet and uses an algorithm to determine the best route.
#cybersecurity/rip #cybersecurity/ospf #cybersecurity/eigrp #cybersecurity/bgp
### The unknowns
##### PAgP:
Port Aggregation Protocol; ***CISCO PROPRIETARY***, allows for the connection of multiple physical links to combine into a single logical link, is used to prevent collisions between devices by setting up a system of data diodes, where one ethernet cable to only transfer data one way, and another will send it back
##### LACP:
Link Aggregation Control Protocol; Works the same way as PAgP except it is not cisco proprietary, and can be used across different vendors
##### STP:
Spanning Tree Protocol; Is a link management protocol that provides path redundancy while avoiding looping in a network. STP uses the Spanning Tree Algorithm (STA) to create a topology database and search out and destroy redundant links.
##### NDP:
Neighbor Discovery Protocol; Operates at the link layer of the OSI model and is responsible for gathering necessary information for internet communication.
##### TTL:
Time To Live; Limits the lifespan of data within a computer or network by limiting the amount of hops a packet can take before the data is discarded.
##### SNMP:
Simple Network Management Protocol; Is used quite extensively to monitor and control network devices.
##### PDU:
Power Distribution Unit; Used for controlling electrical power in a data center, cannot be used for monitoring or remote management
##### TCP:
Transmission Control Protocol; A communications standard that enables application programs and computing devices to exchange messages over a network. Provides **lossless** data transmission
##### UDP:
User Datagram Protocol; A communications standard that enables application programs and computing devices to exchange messages over a network. Is used for higher speed data streams that do not require absolutely correct data. Provides a **lossy** data transmission
@@ -1,655 +0,0 @@
---
title: "CyberSecurity - Networking ALL"
parent: Cybersecurity Networking
grand_parent: Class Notes
---
# Networking Notes
___
## Vocab:
###### Multicast:
IPv6 protocol, a group can receive the packets but, in the end, only one device receives.
###### Unicast:
IPv4 and IPv6 protocol, sends the packets to one specific device.
###### Anycast:
IPv4 protocol, all the packets go to every device on the network.
###### Broadcast:
IPv4 and IPv6 protocol, sends the packets to a group of specific devices.
#cybersecurity/cast
###### Loopback addresses
What is the loopback address for IPv4 and IPv6, what does it allow a machine to do?
127.0.0.1 and 0:0:0:0:0:0:0:1; it allows a machine to send packets to itself for diagnostic purposes
#cybersecurity/loopback
Tunneling: Sending messages to an IPv6 network to all the nodes on the network.
Dual Stack: Allows devices to process IPv4 and IPv6 traffic simultaneously.
Shorthand notation: Allows for two networks/devices that use IPv6 to communicate over a network using IPv4.
Router advertisement: Uses the MAC address to create unique IP addresses that should not be used by other devices.
Stateless Address Auto-configuration: Allows an IPv6 address to be shortened since they can be very long to write out.
What is the purpose of a Domain Name System (DNS)?
The DNS, or Domain Name System, is the service that translates IP addresses to domain names.
How does DNS benefit end-users accessing websites?
Instead of users having to remember and type in the exact IP address of a web server, DNS converts it to a name so that a user can simply type in the URL; www.google.comis a lot easier to remember than 142.251.32.164.
### Clocks:
###### What is NTP?
Network Time Protocol has the important job of making sure all the clocks on the same network are synchronized.
##### What is a stratum?
A stratum is the level of accuracy of the clocks between systems
What are OIDs?
Object Identifiers are an identifier mechanism standardized by the International Telecommunications Union and ISO/IED for consistent naming.
Traffic Logs: Standard for sending/receiving notification messages.
Audit Logs: A document that records an event in an IT system.
Syslog: Displays an entry for the start and end of every session.
Hot Site: An exact replica of the original building
Warm Site: Not an exact replica, but also not an empty building
Cold Site: An empty building
What’s the difference between an active-active and an active-passive configuration?
An active-active configuration has every server active so the load balancer can spread across all servers.
An active-passive configuration only has some servers active, and the load balancer spreads across those active servers.
What is the VRRP?
The Virtual Router Redundancy Protocol is a computer networking protocol that provides for automatic assignment of available Internet Protocol routers to participating hosts.
What is a FHRP?
A First-Hop Redundancy Protocol is a computer networking protocol designed to protect the default gateway used on a subnetwork by allowing two or more routers to provide backup for that address.
### Server Downtime Acronyms
###### RTO:
The amount of time to recover processes after a disruption
###### RPO:
A measurement of the maximum tolerable amount of data to lose
###### MTTR:
The average time taken to restore a system when it does fail
###### MTBF:
The average time until a system failure
###### MTTF:
The average time until a system has an irreparable failure
## Cables
#### Twisted Pair Cables:
These cables have multiple wires that wrap around each other,
- ###### STP:
Shielded Twisted Pair; Has protection against EMI by having a foil wrap around the wires
- ###### UTP:
Unshielded Twisted Pair: Does not have protection, but is usually cheaper
#### Fiber-optic Cables:
Use optical fibers that carry light over far distances at light-speed, used for long-distance telecommunications and high-speed data in buildings
- ###### Single-mode:
Carries only one type of light-wave to transfer data (between 1310 nm - 1550 nm)
- ###### Multimode:
Carries multiple different light waves (red, green, and blue) to send more compact data
**What is an advantage of using fiber-optic cables over twisted-pair Ethernet cables?**
Fiber-optic cables transmit data at a higher speed, over a longer distance.
**What is a drawback of using fiber-optic cables over twisted-pair Ethernet cables?**
Fiber-optic cables are more expensive than twisted-pair cables, especially if the core of the cable is made of glass. They are also more difficult to install and repair than twisted-pair cables, and the equipment to install/repair is also more expensive.
What is the purpose of a patch panel?
The purpose of a patch panel is to make it easy to organize cables and make transitions when a device moves location.
What is a patch panel for fiber-optics known as?
Fiber distribution panel (FDP)
What are two benefits of having a patch panel? Scalability, easier maintenance, and they are inexpensive.
How do punchdown blocks create a connection?
They create connections by punching/pushing down wires into metal slots that strip the wire and complete a connection.
Name two common punchdown blocks?
66, 110, Krone, & Bix
Where does the word “Krone” come from?
The German word for crown
Management Plane: Controls the configuration of the user to device traffic
Application Layer: Contains the applications/programs used to set the network behavior
Control Layer: Translates and transmits all the data between these layers/devices
Infrastructure Layer: Networking devices that process or forward data on a network
What is DOCSIS?
The Data Over Cable Service Interface Specifications (DOCSIS) standard enables high-bandwidth data
transfer via existing coaxial cable systems that were originally used in the transmission of cable television
program signals
SSID: The WLAN network name
BSS: The collection of stations that communicate together in an 802.11 network
ESS: Interconnected WLANs integrated into LANs
What command can be used to determine the status of a router or switch?
Show Run
How are duplex and speed typically set?
To Auto
What are CRCs?
Cyclic Redundancy Checks are an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.
What does an encapsulation error message indicate?
The router has a layer 3 packet it is trying to forward but is missing some element from the layer 2 header that is needed for forwarding the packet to the next hop.
What is an AUP?
An Acceptable Use Policy is a document identifying exactly what is and what is not appropriate activity
on an organization’s network
What is DLP?
Data loss prevention is a strategy to keep private or proprietary data such as health data, personally
identifiable information, financial statements, proprietary diagrams, and other private information from
being shared through unauthorized access.
What’s the difference between the MDF and an IDF?
The main distribution frame connects equipment to cables and subscriber carrier equipment. An
intermediate distribution frame serves as a distribution point for cables from MDF to individual cables
connected to equipment in areas remote from these frames.
NDA: A legal contract that identifies what information is confidential and limits its use and dispersal of that information.
MOU: A document detailing something both sides can agree to but may not be signed.
SLA: An agreement between two parties that indicate the minimum level of services required.
#
What information should be included in a network and network device baseline?
A class A1 data center, Between 59°F to 89.6°F, Between 20% to 80% humidity
In a client-to-site VPN connection, what two connection types are there?
Full tunnel and split tunnel
What is the difference between the two connection types in a client-to-site VPN connection?
In a full tunnel, all communication coming from the client would have to first go to the company’s VPN
concentrator to be routed accordingly, even traffic not destined for the company network. In a split
tunnel, only the traffic destined for the company’s internal network is sent to the VPN concentrator, all
other traffic is sent in a seperate unencrypted tunnel directly to its destination
What is the name of the microsoft created protocol used to perform remote functions on a Windows
system?
Remote Desktop Protocol (RDP)
What protocol does VNC use for remote connections?
Remote Frame Buffer (RFB) protocol
What is the purpose of MAC filtering?
MAC filtering uses that unique MAC address to identify devices connecting to the network and will either
allow or deny access to the wireless AP
 What is a wireless sniffer?
It is a device that allows a malicious actor to read packets sent to the wireless AP
Whar are four examples of IoT devices?
Smart refrigerators, baby cameras, video doorbells, smartwatches, wireless thermostats, etc.
How can network administrators best protect the network when IoT devices are introduced?
Keeping a detailed log of each device and the location of these devices, updating the default password,
and updating the firmware/patches to best protect them.
#
A. Adversary-in-the-middle attack: Attacker positions themselves in between a user and their intended destination
B. DNS poisoning: Server has been altered and does not translate the proper IP address to a domain name
C. VLAN hopping: Malicious actor accessing ports that a typical system does not have access to
D. ARP spoofing: Device on a network lies about their MAC address
E. Rogue DHCP: Server impersonates a legitimate server, offering IP addresses and other network information
F. Rogue AP: Network device has been installed on a secure network without proper authorization
What is port tagging and how does it work? Port tagging is a standard method of frame tagging. This works by inserting a field into the frame to identify the VLAN. 802.1Q is the only option if we want to trunk between a Cisco switched link and another brand of switch.
How do PAgP and LACP differ? PAgP is proprietary, LACP is not so it can be used across multiple vendors.
#
What does it mean for something to be half-duplex? Full-duplex? Half-duplex means data can only be transmitted in one direction. Full-duplex can simultaneously transmit and receive information.
How does a system handle too much Ethernet traffic? Flow control via the pause frame, IEEE 802.3x, literally pauses network traffic to allow the system to “catch up”.
How can packets be captured? A physical tap (hardware) or a port mirror, a port redirection, or a switched port analyzer (SPAN) (software) can be used.
How can a user prevent packet capture and what are the two filtering methods? Port security can prevent unknown devices from forwarding packets and implement dynamic locking and static locking.
How does an Auto MDI-X work? An MDI-X works on newer network interfaces by detecting if the connection requires a crossover and automatically chooses the MDI or MDI-X configuration that appropriately matches the other end of the link.
Why do organizations use VLANs? To limit collisions on the network, to increase security, and to increase performance by limiting the number of network resources the packets travel across.
How do data VLANs and voice VLANs differ? A data VLAN is a VLAN that is configured to only carry user-generated traffic. A voice VLAN is configured to carry voice traffic from an IP phone.
What are the purposes of trunk ports and trunk links? Trunk ports can carry multiple VLANs at the same time. A trunk link is a 100 Mbps or 1 Gbps point-to-point link between two switches, a switch and a router, or a switch and a server.
What is the difference between an ARP table and a MAC address table? Trick question! They’re the same.
What are IEEE standards 802.3af and 802.3at? They are standards that describe how a powered device is detected and how power is given to a device from PoE and PoE+ technologies, respectively.
What is Spanning Tree Protocol and how does it work? STP is a link management protocol that provides path redundancy while avoiding looping in a network. STP uses the Spanning Tree Algorithm (STA) to create a topology database and search out and destroy redundant links.
What is NDP? Neighbor Discovery Protocol (NDP) operates at the link layer of the OSI model and is responsible for gathering necessary information for internet communication.
Routing Information Protocol (RIP) uses hop count as a routing metric to determine the most efficient route between the source and its destination using the Bellman-Ford algorithm.
Open Shortest Path First (OSPF) works by finding the best path from the source to the destination router according to its own shortest path first algorithm (Dijkstra).
Enhanced Interior Gateway Routing Protocol (EIGRP) uses the concept of an autonomous system to describe the set of contiguous routers running the same protocols and sharing the same information.
Border Gateway Protocol (BGP) is the core routing protocol of the internet and uses an algorithm to determine the best route.
What is the purpose of TTL? TTL limits the lifespan of data within a computer or network by limiting the amount of hops a packet can take before the data is discarded.
What is the purpose of SNMP? Simple Network Management Protocol (SNMP) is used quite extensively to monitor and control network devices.
What version(s) of SNMP encrypts, hashes and authenticates communications? SNMPv3
Match the following terms with their proper description.
Control Plane: Controls how data is sent from one place to another
Data Plane: Forwards the transmitted traffic
Management Plane: Configures, monitors, and provides management
What is the default VLAN for Cisco devices? VLAN1
What is the purpose of private VLANs? Private VLANs prevent users connected to the same network from communicating with one another.
What does port security protect the network against? Prevents unknown devices from connecting to a physical port, referred to as an interface, on a network switch.
#
Why is it important to update patches and firmware as soon as reasonably possible? Updating patches and firmware is important to protect devices against potential malicious attackers because some patch and firmware updates are there to fix security vulnerabilities.
When updating device drivers and firmware, if the device is not operating as it previously was or as it should, as a network administrator what should you do? Rollback the installation, a rollback simply means removing the new driver and going back to the previous driver to get the device back working the way it previously was.
What does implicit deny mean? Implicit denial means that all traffic is denied unless it is specifically allowed by a rule.
What does explicit deny mean? Explicit denial allows all traffic unless it has been specially denied.
![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd4KcOcWk4C-cY0T5hvcbmDXR34sMD9A0u4RIvxEmsOkkKb9RD1VOK7jcCuW4TDYLKoE-hXAWfvBlML2_pm5M1RPr3wb6KaxXaWqn1_hQdG0N1LSPemRJWmX6rIFUdPEQ9ZY6af?key=hebBuxzRZRvvm15YV1G2QJZr)
#
What authentication protocol uses TCP and is considered more reliable than RADIUS? TACACS+
Which of the following is NOT a factor in multi-factor authentication? Something you eat
What protocol was developed by MIT in the 1980s and is integrated into Windows systems? Kerberos
Which authentication method requires certificates on both server and client sides? EAP-TLS
What type of authentication stores credentials directly on the device? Local authentication
Which protocol is considered a "lightweight" version of DAP? LDAP
What is the primary advantage of Single Sign-On (SSO)? One authentication for multiple resources
Which company created EAP-FAST? Cisco
What is the length of a Pre-Shared Key (PSK)? 256-bit
In 802.1X authentication, what is the device requesting access called? Supplicant
Which protocol was originally designed for dial-up users but is now used widely? RADIUS
What does PEAP require for authentication? Server-side PKI certificate only
Which protocol uses "tickets" for authentication? Kerberos
What is the main purpose of 802.1X? Port-based Network Access Control
Which companies collaborated to create PEAP? Cisco, Microsoft, and RSA
What type of transmission protocol does RADIUS use? UDP
Which authentication method is commonly used in home or small office settings? PSK
What protocol secures LDAP transmissions? SSL/TLS
How many factors are required for multi-factor authentication? More then 3 
Which protocol was specifically created for Cisco Systems devices? XTACACS
What distinguishes penetration testing from vulnerability scanning? It actively exploits vulnerabilities
In what type of penetration test do the pentesters know nothing about the system they are attacking AND the IT team of the system being attacked doesn't know the attack is coming? Double blind test
What was the root cause of Target's 2013 data breach? Compromised HVAC vendor credentials
What is the first crucial step in penetration testing? Defining scope
What type of test occurs when pentesters know nothing about the system but administrators expect the attack? Blind test
What is the purpose of a posture assessment? Check device status before network connection
How much did Target's 2013 data breach cost the company? $252 million
What is NOT typically included in a penetration test report? Employee personal information
What type of assessment analyzes current processes for future security planning? Process assessment
Why is a contract important for penetration testing? To protect both parties legally
What happens if a device fails a posture assessment? Quarantine or denied access
Which type of test provides pentesters with extensive system information? Target test
What assessment type evaluates third-party security risks? Vendor assessment
What is a primary purpose of the rules of engagement? Define test limitations
What can be an initial step in penetration testing? Vulnerability scan
What might cause a device to fail a posture assessment? Missing updates
What is the main goal of penetration testing? Simulated attack
Why are vendor assessments important? Security risk evaluation
What type of test provides the most realistic attack scenario? Double-blind test
When should penetration testing be performed? Regularly
What is the primary function of a SIEM system? To analyze raw network data in real-time
Which of the following is NOT typically logged by SIEM tools? Employee salaries
How do SIEMs assist online retail companies? By processing payments
What triggers automatic alerts in SIEM systems? Predefined metrics like incidents per hour
What role do security analysts play in SIEM operations? Investigating alerts
Which data source does a SIEM system monitor? Multiple sources including all mentioned
What benefit does real-time monitoring provide? Immediate threat detection
How do SIEMs help with compliance? By generating required reports
What type of website data can SIEM tools analyze? Both error codes and sales data
What view do SIEM tools provide to administrators? Real-time network state
What is the primary purpose of a change management process? To ensure changes are approved and implemented safely
Which of the following is NOT a category of disaster according to the text? Financial disasters
What is typically the maximum valid period for passwords in most organizations? 90 days
Which plan is more comprehensive than a disaster recovery plan? Business continuity plan
What is the first step in an incident response plan? Define the incident
What does DLP stand for? Data Loss Prevention
What type of policy defines appropriate activity on an organization's network? Acceptable Use Policy
During offboarding, what typically happens to user accounts? They are deactivated
What is one way to secure remote access connections? Network Access Control
What should be done with hardware during offboarding? Formally turned in and documented
Which of these is a form of system hardening? Removing unnecessary applications
What must all users who utilize technology in an organization sign? An AUP
Security policies are considered what type of documents? Living documents
What should be included in password requirements? Length and special characters
Which diagram shows how devices communicate with each other and includes elements like subnets and routing protocols? Logical network diagram
What is the primary purpose of a site survey? To examine a location and gather data for planning
Which distribution frame connects equipment to cables and subscriber carrier equipment? MDF
What type of agreement is considered the least formal and specific? MOU
What document is essential for troubleshooting electrical circuits and shows color coding of wires? Wiring diagram
Which agreement specifies the minimum level of services required between two parties? SLA
What should be included in all network device baselines? CPU, RAM, storage, and utilization
What type of diagram should include WiFi coverage information? Floor plan
Which legal contract specifically identifies and protects confidential information? NDA
What frame serves as a distribution point for cables from MDF to individual equipment? IDF
What is the primary purpose of NIC teaming? To provide backup if one NIC fails
In a switch cluster, what protocol is used for management? Cluster Management Protocol
Which of the following is NOT an approved fire suppression replacement for halon? Water
What is the recommended humidity range for a class A1 data center according to ASHRAE? 20% to 80%
Which disaster recovery site type requires the least initial investment? Cold site
What does FHRP stand for? First-Hop Redundancy Protocol
In an active-passive configuration, what happens when an active server fails? A passive server activates
What is the primary function of a UPS? Power backup
Which measurement indicates the average time until an irreparable system failure? MTTF
What is the temperature range recommended for a class A1 data center? 59°F to 89.6°F
What is the main advantage of a hot disaster recovery site? Minimal downtime
What type of redundancy helps maintain connectivity if an internet provider fails? ISP redundancy
Which metric measures the maximum tolerable amount of data loss? RPO
What is the primary purpose of switch stacking? Run as single switch
When was halon manufacturing banned by the EPA? 1994
What is the main benefit of power distribution units (PDU)? Remote power control
Which redundancy protocol provides automatic assignment of available IP routers? VRRP
What is the primary advantage of a cold disaster recovery site? Low maintenance cost
What type of configuration uses all servers actively for load balancing? Active-active
Which backup type only saves server configuration and not data? System state
What is the primary goal of a Denial of Service (DoS) attack? To disrupt service availability
A botnet is best described as: A network of remotely controlled computers
What is DNS poisoning? Modifying DNS translations
In an AiTM attack, the attacker: Positions themselves between user and destination
What is tailgating in the context of security? Following authorized personnel inside
A rogue access point is: A wireless AP installed without permission
What is phishing primarily used to obtain? Sensitive information
MAC spoofing involves: Cloning the router's MAC address
What type of attack is ransomware? Malware attack
An evil twin attack uses: Same SSID as legitimate network
What is shoulder surfing? Looking over someone's shoulder
A deauthentication attack results in: Network disconnection
Which is a characteristic of a DDoS attack? Multiple systems attacking
Piggybacking differs from tailgating because: The authorized person knowingly allows access
Which metric measures the maximum tolerable amount of data loss? RPO
What is the primary purpose of switch stacking? Run as single switch
When was halon manufacturing banned by the EPA? 1994
What is the main benefit of power distribution units (PDU)? Remote power control
Which redundancy protocol provides automatic assignment of available IP routers? VRRP
What is the primary advantage of a cold disaster recovery site? Low maintenance cost
What type of configuration uses all servers actively for load balancing? Active-active
Which backup type only saves server configuration and not data? System state
What is the primary goal of a Denial of Service (DoS) attack? To disrupt service availability
A botnet is best described as: A network of remotely controlled computers
What is DNS poisoning? Modifying DNS translations
In an AiTM attack, the attacker: Positions themselves between user and destination
What is tailgating in the context of security? Following authorized personnel inside
A rogue access point is: A wireless AP installed without permission
What is phishing primarily used to obtain? Sensitive information
MAC spoofing involves: Cloning the router's MAC address
What type of attack is ransomware? Malware attack
An evil twin attack uses: Same SSID as legitimate network
What is shoulder surfing? Looking over someone's shoulder
A deauthentication attack results in: Network disconnection
Which is a characteristic of a DDoS attack? Multiple systems attacking
Piggybacking differs from tailgating because: The authorized person knowingly allows access
What is a dictionary attack? Testing common passwords
IP spoofing involves: Modifying packet source addresses
VLAN hopping allows attackers to: Access unauthorized VLANs
A rogue DHCP server attack can cause: Service disruption
The best defense against phishing is: User education
An access control vestibule is designed to: Prevent tailgating
Which version of SNMP provides encryption, hashing, and authentication for secure communications? SNMPv3
What is the primary purpose of control plane policing? To protect against DoS attacks
What is the main function of Router Advertisement (RA) Guard? To block malicious RA messages
## Common protocols/ports:
###### SNMP:
Simple Network Management Protocol; it collects and manipulates valuable network information.
Ports: **161** and **162**
###### SSH:
Secure Shell Protocol; Allows for a secure connection to network services over an unsecure network, mainly used with CLI functionality
Ports: **22**
### DNS commands:
###### A vs AAA:
Returns the domain name, reverse lookup.
###### CNAME
Alias for another domain name.
###### MX
IP addresses of the domain name.
###### SOA
Lists the server that contains the actual DNS information location.
###### PTR
How email addresses should be routed for the domain.
###### NS
Provides information about the administrator of the domain.
@@ -1,12 +0,0 @@
---
title: Cybersecurity Networking
parent: Class Notes
has_toc: false
---
# Cybersecurity Networking
___
### [All notes]({% link src/class_notes/cybersecurity_networking/all.md %})
### [Acronyms]({% link src/class_notes/cybersecurity_networking/acronyms.md %})
-20
View File
@@ -1,20 +0,0 @@
---
title: Class Notes
has_toc: false
---
### [Cyber Forensics]({% link src/class_notes/cyber_forensics/index.md %})
### [Cybersecurity Linux]({% link src/class_notes/cybersecurity_linux/index.md %})
### [Cybersecurity Networking]({% link src/class_notes/cybersecurity_networking/index.md %})
### [Political Science]({% link src/class_notes/political_science/index.md %})
### [Psychology]({% link src/class_notes/psychology/index.md %})
Download all class notes [here][1]
[1]:{{ site.url }}/download/class_notes.tar.gz
@@ -1,29 +0,0 @@
---
title: "POLS Current Events Essay"
parent: POLS
grand_parent: Class Notes
---
Nathan Young
Mr. Schilling
POLS 1100
9/13/24
# Current Events Essay: Inflation in the U.S.
#### Article 1:
[“Inflation has fallen. Why are groceries still so expensive?”](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/), By [Abha Bhattarai](https://www.washingtonpost.com/people/abha-bhattarai/?itid=ai_top_bhattaraias) and [Jeff Stein](https://www.washingtonpost.com/people/jeff-stein/?itid=ai_top_steinj), [The Washington Post](https://www.washingtonpost.com), Feb 2, 2024
The current state of inflation has been looking better for the grand majority of most prices, allowing more people to be confident in supporting the economy, but as the article states, it's not true for everywhere. Many Americans are still concerned about the massive price spike that groceries gained over the COVID-19 pandemic, and rightfully so as “[Grocery prices have jumped by 25 percent over the past four years](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=Grocery%20prices%20have%20jumped%20by%2025%20percent%20over%20the%20past%20four%20years)” (p.2). These costs are what most people have said they are concerned about, with “[more than two-thirds of voters say inflation has hit them hardest through higher food prices](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=more%20than%20two%2Dthirds%20of%20voters%20say%20inflation%20has%20hit%20them%20hardest%20through%20higher%20food%20prices)” (p.3), but many of these causes that have made inflation such a massive issue are able to be dealt with  by policy makers, with no control over the virus, supply chain disruptions, and the ability for companies to keep prices high. Luckily, not all products are still experiencing this cost spike, as [many food items such as eggs (-20%), lettuce (-17%), and tomatoes (-7%), reducing their costs](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=Egg%20prices%2C%20after%20soaring%2C%20fell%20by%20more%20than%2020%20percent%20last%20year.%20Lettuce%20prices%20fell%2017%20percent%2C%20and%20tomato%20prices%20fell%20by%20more%20than%207%20percent%2C%20among%20similar%20other%20drops.) after the many different events, such as the “[ongoing avian flu outbreak](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=ongoing%20avian%20flu%20outbreak%2C)” that gave eggs a massive spike that died down shortly, “[Droughts and extreme heat](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=Droughts%20and%20extreme%20heat)” making farming difficult, and “[Russia’s invasion of Ukraine](https://www.washingtonpost.com/business/2024/02/02/grocery-price-inflation-biden/#:~:text=Russia%E2%80%99s%20invasion%20of%20Ukraine)” that used up lots of wheat, corn, and vegetables.
#### Article 2:
“[Inflation is nearly back to normal. But high prices have changed Americans’ lives](https://www.cnn.com/2023/12/27/economy/inflation-2023-impacts-americans/index.html)”, By [Alicia Wallace](https://www.cnn.com/profiles/alicia-wallace), [CNN](https://www.cnn.com), Dec 27, 2023
The prices that Americans had to face in the early 20’s had made a large impact on how people saw money, with many people that were looking to save as much as they could and be able to receive aid in relief programs. But, with the very lucky case of the employment rates stabilizing quickly, “[inflation had moderated some — the Consumer Price Index had cooled to 6.5% in January 2023 from its 9.1% peak in June 2022](https://www.cnn.com/2023/12/27/economy/inflation-2023-impacts-americans/index.html#:~:text=inflation%20had%20moderated%20some%20%E2%80%94%20the%20Consumer%20Price%20Index%20had%20cooled%20to%206.5%25%20in%20January%202023%20from%20its%209.1%25%20peak%20in%20June%202022)”, giving people the ability to finally start supporting themselves again. Many relief centers were reaching all time highs with their members, including Minnesota Hunger Solutions with a “[record 7 million visitors](https://www.cnn.com/2023/12/27/economy/inflation-2023-impacts-americans/index.html#:~:text=record%207%20million%20visitors)” in 2023. These costs of living have hurt especially the lower-class, taking up over 30% of their paycheck and making them have to cut corners just to survive. Many people suffering in this period are being trapped in debt death spirals, becoming late on card payments and gaining fees for late payments, and eventually ending up unable to afford renting/mortgage payments and becoming homeless.
These two articles seem to focus on most of the same things, mainly how people are having a hard time affording essential human needs and how it was one of the effects of the COVID-19 virus. The first article was more recent and is able to focus on the actions that are taking place to help reduce the effects of inflation and the recent slowdown of the yearly inflation amount, while the second article focuses on the different people that were affected and how they had to push through to keep their jobs/homes while they were being drained of of their savings.
I believe that the effects of inflation is still a very prevalent thing that still becomes the breaking point on whether or not someone becomes homeless or not, it takes a lot away from people, and makes it almost impossible to be able to provide for themselves and be able to get specialized resources for help like hospitals and therapy. My brother and his wife are both working jobs, with both of them paying decently well, but they still feel as if there is a slim chance that they will be able to buy their own house in the near future. Many people I know have become very paranoid and are taking every chance they can get to make sure they don’t fall into poverty, taking advantage of cheaper CE classes in highschool, taking multiple jobs early on, and depending on their parents to live in their house until they finish college. The thing that annoys me quite a bit though is the fact that most of the people that are affected are already struggling with poverty, are war veterans, and just got unlucky with their choices. These people didn’t deserve to go through these things yet are required to in order to barely live, even with some of these increased pressure on impoverished people, many different urbanized places have decided to not help them and are actively trying to make it harder for them to get out of their difficult financial situation by making it [impossible for them to use city benches](https://nypost.com/2021/02/09/mta-replaces-subway-station-benches-after-trying-to-deter-homeless/) for sleeping, [tearing down their tents downtown](https://www.sltrib.com/news/2023/09/21/salt-lake-city-fences-off-another/), and making it difficult for them to get jobs with many people painting them as gross and barbaric when many of them were just people that came one check short and now have to worry about freezing in the winter.
The pandemic's impact was a large cause of inflation in the U.S. but it was also affecting other countries, causing major amounts of inflation to European and Asian countries in the early months of 2022, these caused many markets and trading opportunities to fail and made GDPs drop.
@@ -1,34 +0,0 @@
---
title: "POLS General Notes"
parent: POLS
grand_parent: Class Notes
---
___
#### Unitarian governments:
Had a single national government that had total power over the the smaller sub-governments, Great Britian's gov system
#### Confederacy:
A complete flip to the unitarian government that the colonists had before, the problem was that the states were the more powerful side and caused the national government to haev very little power, the event that caused the idea to change this was Shay's Rebellion, showing that a national militia would be needed in case of the event of a single state being taken over
#### Federal Government:
A mix of state and national governments that we adopted that gave us the gov we have today, but we have a written constitution
## Federalism cases:
#### MCCULLOCH V MARYLAND:
Hamilton created a national government in the state of Maryland, it started being taxed by the state but the director would not pay these taxes, the state threatens to shut down the national bank and it sparked the court case
Does the national government have restrictions against having a national bank? No, using the necessary and proper clause it was determined to be a implied power of the national government
Does the state of Maryland have the right to tax the national bank? No, it was deemed as a federal government that has power over the state government, by using the supremacy clause they stated that the power of the state to tax the bank would be unjust and would destroy the national bank
The thought was that a national government would be very useful as a way to distribute money and to store national government money from things like tariffs and federal taxes
#### GIBBONS V OGDEN:
Steam boats that are able to go up and down rivers are used as a very useful trading technique, so two people decided to make a monopoly across the different rivers around the nation where they would lease out the boats for people to use. Hamilton and Madison were at the Annapolis convention that centered around the idea of waterway travel that sparked the constitutional convention. The issue was that the state of New York was the only state that would allow a monopoly, but since it was a interstate commerce deal, it had to go to court. So the idea of different types of trades were identified, interstate, intrastate, and international. Since the states under the confederacy would each have their own tariffs and taxes, it made trading with the U.S. a struggle for foreign merchants. **ONLY THE FEDERAL GOVERNMENT CAN CONTROL INTERSTATE COMMERCE.**
### Necessary and Proper Clause:
Can be used by the national government **AS LONG AS THE 10'TH AMENDMENT IS NOT AFFECTED**. One example is that when the federal government made a edict about the school system having vending machines in cafeterias, in UT the schools would make walls to obscure it so that it could not be seen from the eating area. In one case the federal government was able to fine a school $25000 for every day that a vending machine was out. This is because of the certain standards that school food has that the vending machine food is not regulated against, some other things that are regulated are the exit signs that all schools have to direct to the nearest exit, along with push bars to doors that go outside to prevent people getting stuck in cases where people need to get out fast.
# Essence of Government:
MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY MONEY
@@ -1,9 +0,0 @@
---
title: POLS
parent: Class Notes
has_toc: false
---
# Political Science
___
### [POLS: General Notes]({% link src/class_notes/political_science/general_notes.md %})
### [POLS: Current Events Essay]({% link src/class_notes/political_science/current_events_essay.md %})
@@ -1,19 +0,0 @@
---
title: "Disorder Research"
parent: Psychology
---
By: Nathan Young, S#### B#####, K#### F###### (names removed for privacy)
Psychology 1
Farnworth
10/2/24
# Conversion Disorder
Conversion disorder, also known as functional neurological symptom disorder, is rare and only affects around 4 to 12 people out of every 100,000 which is almost 60 times more rare than getting cancer. This disorder has shown to mainly affect the body’s nervous system and causes differing effects from person to person as it usually is in combination with some other disorders which can affect the person’s senses and cause them to have muscle spasms. The parts of your brain that are affected are the prefrontal cortex and motor cortex having an increase in activity, while the hippocampus has a lower activity. Episodes that you get from it are usually in the form of muscle spasms, twitching, sensory flashes, and numbness. But what causes conversion disorder? Many people who develop it get it as a cause of psychological trauma, such as guilt for something that you did, or large amounts of stress that cause you to start losing control of your body.
In order to treat this disorder, we have multiple different kinds of therapies to try, the most recommended one is a psychotherapy called CBT (Cognitive Behavioral Therapy), this type is the most common to treat it and is also the most likely to work. Second is hypnotherapy, also known as hypnosis, which can  help relax and destress the person being affected by conversion disorder. And finally, family and group therapy, which can help the people around them understand what is happening and also to give them an outlet to hopefully give the person with the disorder relief.
Conversion disorder will make you feel like you don’t have control over your body, making you feel more stressed and sometimes angry
-23
View File
@@ -1,23 +0,0 @@
---
title: "Psychology"
parent: Class Notes
has_toc: false
---
# Psychology
___
### [Psychology: Sleep]({% link src/class_notes/psychology/psych_notes_sleep.md %})
### [Psychology: Memory]({% link src/class_notes/psychology/psych_notes_memory.md %})
### [Psychology: Sense and Perception]({% link src/class_notes/psychology/psych_notes_sense_and_perception.md %})
### [Psychology: Disorders]({% link src/class_notes/psychology/psych_notes_disorders.md %})
### [Psychology: Intelligence]({% link src/class_notes/psychology/psych_notes_intelligence.md %})
### [Psychology: Criminal Forensics]({% link src/class_notes/psychology/psych_notes_criminal_forensics.md %})
### [Psychology: Brain Parts]({% link src/class_notes/psychology/psych_notes_brain_parts.md %})
### [Psychology: Disorder Research Document]({% link src/class_notes/psychology/disorder_research.md %})
@@ -1,152 +0,0 @@
---
title: "Psych Notes - Brain Parts"
parent: Psychology
---
# Brain Parts
___
The two parts of the brain are divided into two “hemispheres”, with the right being the creative physical stuff, and the left being the more critical thinking part
**Cerebral Cortex**: Decision making
**Right hemisphere**: creative thinking
**Left hemisphere**: logical thinking
**Hippocampus**: Forms memories
**Hypothalamus**: Hormones
### FRONTAL LOBE
Language and memory
- Cognitive Skills
- Emotional Expression
- Problem Solving
- Memory
- Language (understanding, reading, and creating words)
- Judgment
It is, in essence the “control panel” of our personality and our ability to communicate
### PARIETAL LOBE
Senses
- Spatial senses
- Navigation
- The major sensory inputs from the skin (touch, temperature, and pain receptors, weight, texture)
### OCCIPITAL LOBE
Vision
- Visual Information
- Shapes
- Colors
### TEMPORAL LOBE
Audio
- The temporal lobe is involved in primary auditory perception, such as hearing, and holds the primary auditory cortex. The primary auditory cortex receives sensory information from the ears and secondary areas process the information into meaningful units such as speech and words
### CEREBELLUM
Motor function
- The cerebellum (which is Latin for “little brain”) is the major structure of the hindbrain that is located near the brainstem. This part of the brain is responsible for coordinating voluntary movements. It is also responsible for a number of functions including motor skills such as balance, and posture
# INSIDE PARTS
#### Thalamus:
Connects the cerebrum to the something, processes all sensory information
#### Corpus Callosum:
Connects the left and right hemispheres of the brain
#### Hypothalamus:
Releases/produces hormones, controls the hormone glands of the body
#### Cerebellum:
Balance and fine motor skills
#### Pons:
Connects the brain to the spine
#### Medulla Oblongata:
Involuntary motor functions
#### Hippocampus:
Makes memories
#### Pituitary gland:
Works on growth functions, also called the master gland
#### Amygdala: Processes emotions
## OTHER PARTS
#### Endocrine:
The body's “slow” chemical communication system: a set of glands that secrete hormones into the bloodstream.
#### Glands:
An organ in a human or animal body which secretes particular chemical substances for the body or for discharge into the surroundings.
#### Hormone:
Chemicals that coordinate different functions in your body  by carrying messages through your blood to your organs, skin, muscles, and other tissues.
### HORMONE GLANDS:
#### Thyroid gland
- Releases thyroxine and triiodothyronine, increasing metabolic rate, growth, and maturation.
- Affects metabolism
#### Parathyroid gland
- Regulates calcium in the blood
- Releases parathyroid hormone, increasing blood calcium, and decreasing potassium
#### Adrenal gland
- Inner parts help trigger the “fight or flight” response.
- Releases adrenaline and noradrenaline. Increases heart rate, blood pressure, and blood sugar, providing a surge of energy known as fight or flight
#### Pancreas
- Regulates the level of sugar in the blood
- Secretes insulin, regulating the level of sugar in the bloodstream
#### Pituitary gland
- Secretes oxytocin, that helps with par bonding, group cohesion, and social trust
#### Pineal gland
- Secretes melatonin, activates in the dark
# Association Areas:
Areas of the cerebral cortex that are not involved in primary motor or sensory functions, rather, they are involved in higher mental functions such as learning, remembering, thinking and speaking
### Somatosensory Cortex:
An area at the front of the parietal lobes that register and processes body touch and movement sensations
### Motor cortex:
The motor cortex is the region of the cerebral cortex involved in the planning, control, and execution of voluntary movements. Classically, the motor cortex is an area of the frontal lobe\
### Prefrontal cortex:
Enables judgment, planning and processing of new memories
People with damaged frontal lobes have high intelligence scores and maybe even great cake-baking skills. But they can not plan ahead to begin baking the cake for a special occasion
### Plasticity:
The brains ability to change, especially during childhood, by reorganizing after damage or by building new pathways based on experience
### Somatosensory system:
All bodily nerve ending system
#### Fusiform Gyros:
Used to recognized faces
#### Wernicks Area:
Used to DECIPHER language so that its not just noise
#### Brocas area:
Is used to express and is used for speech, located in the left frontal lobe
### Peripheral nervous system:
Connects to the central nervous system to relay sensory information, move your body, and is composed of two different branches:
- Somatic nervous system: Voluntary movement and sensory nerves
- Autonomic nervous system: Involuntary movements
1. Sympathetic: Excites you
2. Parasympathetic: Calms you down
@@ -1,87 +0,0 @@
---
title: "Psych Notes - Criminal Forensics"
parent: Psychology
---
# Criminal Forensics
___
## What is the difference between Criminal and Forensic Psychology:
#### Criminal: (The how and why)
1. Studying why people commit crimes
2. Creates criminal profiles
3. Evaluates the risk of reoffending
4. Provided counseling and other services to inmates and offenders
#### Forensic: (Legal system)
1. Consults with law enforcement
2. Evaluates if defendants are competent to stand trail
3. Makes sentencing recommendations
4. Gives testimony as an expert
## FBI Profiling Process
### 1. Data Assimilation:
Collect data from police reports, witness reports, and from crime scene
Signature - Something done to fulfill or satisfy the offender’s emotional state
(Not the same as Modus Operandi)
#### Modus Operandi
What is needed to complete the crime
##### State of the crime scene
Gives clues about the type of offender
- ###### Age
- ###### Race
- ###### Motive
### 2. Crime Classification
Profilers decide whether the crime scene is organized or disorganized (planned)
##### Organized crime scene:
- Body is hidden
- Weapon is removed from scene
- Appears well-planned
- The victim is specifically targeted
- Restraint often used
- Aggression takes place before death
###### Organized crime scene suggests an offender
- Average or above average IQ
- Employed, usually quite skilled
- Socially competent
- Uses alcohol in commision of crime
- Uses car to drive to crime scene/hunt for victim
- Obsessed with media coverage of his crimes
##### Disorganized crime scene:
- Body not hidden
- Weapon is present
- Appears to be spontaneous
- Victim may be an acquaintance
- Aggression post-mortem
###### Disorganized crime scene suggests an offender:
- Below average IQ
- Unstable employment record, unskilled
- Socially isolated
- Lives close to crime scene
- Strict discipline as a child
- Extremely anxious
### 3. Crime Reconstruction:
Hypothesis about crime sequence, offender and victim behaviour
### 4. Profile Generation:
Offender’s physical demographic and behavioural characteristics
@@ -1,191 +0,0 @@
---
title: "Psych Notes - Disorders"
parent: Psychology
---
# Disorders
___
### Psychological disorder
- A mental condition that changes the way that you think, act and interpret everyday life. Different neuron connections. A harmful dysfunction in which thoughts, feelings, or behaviors are maladaptive, unjustifiable, disturbing and atypical
## MUDA acronym
In order for a condition to be considered a disorder, they have to follow all of the four criterium
### Maladaptive
- Destructive to oneself or others
- Maladaptive behaviors are sometimes - not always - an exaggeration of normal acceptable behavior
### Unjustifiable
- Without a rational basis
- Sometimes these practices are accepted in certain contexts, times, traumatic experiences, personal backgrounds, and cultural expectations
- Cell phones today are weird and seem without reason to older generations, but are completely normal for all newer generations.
### Disturbing
- Troublesome to other people
- Bringing people around to things that you enjoy but they would rather not do kinda counts
### Atypical
- So different that it violates a norm
- Different (not like other people’s behaviors)
- Violates a norm - an unofficial rule for accepted and expected behavior in a particular culture
## Disorder Assignment: Conversion Disorder
### Symptoms: [source](https://my.clevelandclinic.org/health/diseases/17975-conversion-disorder)
- Psychogenic non-epileptic seizures (PNES). Seizures typically happen because of conditions or issues with your brain’s structure or how it’s working. Psychogenic non-epileptic seizures happen because of mental health conditions (the word “psychogenic” means “of mental health origin”).
- Sense-related disruptions. Trouble with senses of vision, hearing, smell, taste and touch are all possible with conversion disorder. Some examples include double or tunnel vision, hearing loss or numbness, and the inability to feel something touching your skin.
- Pain. People with conversion disorder often feel pain, sometimes with other symptoms and sometimes on its own.
- Unusual muscle tension, [spasms](https://my.clevelandclinic.org/health/diseases/15466-muscle-spasms), twitches and tremors. These all happen because of a disruption in how your brain controls your muscles.
- Muscle weakness or [paralysis](https://my.clevelandclinic.org/health/diseases/15345-paralysis).
- [Trouble swallowing (dysphagia)](https://my.clevelandclinic.org/health/symptoms/21195-dysphagia-difficulty-swallowing).
- [Dizziness](https://my.clevelandclinic.org/health/symptoms/6422-dizziness).
- [Fainting or passing out (syncope)](https://my.clevelandclinic.org/health/symptoms/21699-fainting).
- Chronic fatigue or lack of energy.
### MUDA of Conversion Disorder:
#### Maladaptive:
- Causes the person to have seizures, dysphagia, and chronic fatigue
#### Unjustified
- Gets dizzy, has lack of energy, and pain
#### Disturbing
- Passing out likely makes the person rely on others to protect their unconscious body
#### Atypical
- Has unusual spasms
## Understanding Disorders
Perspectives of psychological disorders have changes through the centuries.\
Written records of attempts to understand abnormal behavior go back at least 4000 years.
### Babylon:
Ancient Babylonians viewed disorders as the result of a demonic possession and treated them with prayer and magic.
### Hebrews:
Ancient Hebrews saw psychological disorders as punishment for sin, and they too, looked to religion for a cure.
### Ancient Greek:
Socrates and other ancient Greek Philosophers blamed faulty thought processes for psychological disorders and believed in healing in the power of words.
### Early Attempts:
Early brain surgeries would cut part of the skull and remove parts that seemed to be infected, this did not work as the brain is necessary
Unfortunately, not all approaches to treatment have been humane
Fifteenth-century Europeans suspected that people showing symptoms of psychological disorders were possessed by demons, and they often tortured or executed the sufferers to oust these bad spirits
### Salem Witch Trials:
People with disorders in this town would be killed rather than considered for treatment, sparking the idea to find new ways to “fix” disordered people
### Philippe Pinel:
Late 1700s - early 1800s, these many wars caused that around 60% of the french population had mental disorders, so he created the medical model:
The medical model of mental illness is a concept that mental diseases have physical causes that can be diagnosed, treated, and in most cases cured
This model replaces the ugliness of asylums and torture with the humanness of hospitals and therapy
This medical model is still alive today, and focuses almost exclusively on nature and almost never on nuture, but it fails to be able to be used for disorders that cannot be physically detected
### Bio-Psycho-Social model
#### **Bio**
- Caused by genes, brain structure, and chemistry
#### **Psycho**
- Stress, trauma, helplessness, mood-related perceptions and memories
#### **Social**
- Roles, expectations, definitions of normality and disorder
### Anxiety Disorder
A vague feeling of apprehension and nervousness
- Long term worry
- Feeling that something bad is going to happen
- Nervous or scared
- Flight or fight
- ##### Types:
1. Social
2. OCD
3. Attachment
4. Performance
5. Phobias
6. Body Dysmorphia
7. PTSD
Can be found genetically (passed down from parents), and in animals other than humans
### Mood Disorders
Disturbances of out emotions, magnifications of out normal reactions
#### Types:
1. Bipolar Disorder
2. Depression
3. Mania
### Dissociative Disorder: When one’s sense of self has become separated (dissociated from their memories, thought, or feelings
- ##### Amnesia:
1. When one looses memories due to a traumatic experience
- ##### Dissociative Fugue:
1. The loss of ones identity and travel to a new location
- ##### Dissociative Identity Disorder:
1. A disorder in which in individual exhibits two or more distinct and alternating personalities (trauma based)
### Schizophrenic:
It is not one disorder. It is a family of severe disorders characterized by disorganized and delusional thinking, disturbed perceptions, and inappropriate emotions and behavior
## TYPES OF THERAPY
### Humanistic Therapy:
- Involves another human
- Humanistic therapies aims to promote self-fulfillment by increasing self-acceptance and self-awareness
- Fostering growth instead of relieving illness: thus, these therapists refer to people in therapy as clients instead of patients
- Focusing on the present and future instead of past
### Behavioral Therapy:
- Behavior therapy applies learning principles to the elimination of unwanted behaviors
- ##### Systematic Desensitization:
1. A type of counterconditioning that associates a pleasant, relaxed state with gradually increasing anxiety-triggering stimuli
2. Some allergies are able to become neutral to the recipient from gradual increments in the dosage of the allergen
### Family and Group Therapies:
- Treat the family as a system
- Interventions or group texts
### Drug therapies:
- Medicinal drugs
- Electroconvulsive Therapy:
- Hooking someone to a machine to cause a seizure, hopefully restarting the brain
- Does not cause major life changing defects
- Psychosurgery:
- Lobotomy - A neurosurgical treatment of a mental disorder that involves severing connections in the brain’s prefrontal cortex
- Parts of the the frontal lobe would be hammered/removed, makes someone have a pure flat affect
@@ -1,52 +0,0 @@
---
title: "Psych Notes - Intelligence"
parent: Psychology
---
# Intelligence
___
The ability to learn from experiences, solve problems, ad use knowledge to adapt to new situations
## History
Charles Spearman (1863-1945) believed we have one general intelligence (often shortened to g)
- That this is the heart of all our intelligent behavior, from navigating the sea to excelling in school
- He granted that people often have special, outstanding abilities
- But he noted that those who score high in one area such as verbal intelligence, typically score higher than acreage in other areas, such as spatial or reasoning ability
### Crystallized vs Fluid:
- ##### Crystallized:
- Our accumulated knowledge and verbal skills; tends to increase with age
- Cooking, working with computers, and writing
- ##### Fluid intelligence
- Our ability to reason speedily and abstractly; tends to decrease with age; especially during late adulthood
- Yoyoing, specific programming language, video games, and escape rooms
## Multiple intelligence's:
- Howard Gardner has identified eight relatively independent intelligence's, including the verbal and mathematical aptitudes assessed by standardized tests
- Musical, Body Kinesthetic, Interpersonal, Verbal Linguistic, Logical Mathematical, Naturalistic, Intrapersonal, and visual/spacial
- Thus, the computer programmer, the poet the street-smart adolescent, and the basketball team’s play-making point guard exhibit different kinds of intelligence
- Gardner has also proposed a ninth possible intelligence-existential intelligence-the ability “to ponder large questions about life”
#### Savant Syndrome
- A condition in which a person otherwise limited in mental inability has an exceptional specific skill, such as in computation or drawing
### Extreme Intelligence's
- #### Low extreme
- Intellectual Disability: A condition of limited mental ability
- Mental Age: A measure of intelligence test performance typically associated with children of a certain chronological age
- Thus a child who does well as an average 8 year old is said to have the mental age of an 8 year old
- #### High extreme
- Gifted and Talented
@@ -1,42 +0,0 @@
---
title: "Psych Notes - Memory"
parent: Psychology
---
# Memory
___
## Definition:
The persistence of learning over time through the encoding, storage, and retrieval, of information
### Alzheimer’s Disease:
Protein that builds up in the brain and causes neurons to die
## How our brains MAKE memories:
- An external event causes sensory input
- That sensory input is converted into neural information via transduction
- This current, or very recent, experiences are stored as sensory memory
- That sensory memory is encoded
- #### Encoding: Whatever you do to make you remember
- This encoded information goes into short term memory
- #### Short Term Memory: Memories that we use everyday, also known as our working memory
- Short term memory is then further encoded in to long term memory
- #### Long Term Memory: All memories we use when needed
- When long term memory is needed, is is retrieved into short term memory for us to use
### Recall:
A measure of memory in which the person must retrieve information learned earlier, as on a fill in the blank test
### Recognition:
A measure of memory in which the person identifies items previously learned, as on a multiple-choice test
### Relearning:
Remembering what someone is saying after they explain it
@@ -1,179 +0,0 @@
---
title: "Psych Notes - Sense and Perception"
parent: Psychology
---
# Sense and Perception
___
## Sense:
The process by which our sensory receptors and nervous system receive and represent stimulus energies from our environment
#### Vestibular Sense:
Your sense of whole body balance and equilibrium (governed mostly in the semicircular canals in the inner ear, but also in the Cerebellum, in the oldest part of the brain.
#### Kinesthetic Sense:
Your sense of body part position and movement (the receptors for this are all over the skin)
#### Sensory Receptors:
Sensory nerve endings that responds to stimuli
## Perception:
The process by which out brain organizes and interprets sensory information, enabling us to recognize objects and events as meaningful
#### Bottom-up processing:
Information processing that begins with the sensory receptors and works up to the brain’s integration of sensory information
#### Top-down processing:
Information processing guided by higher-level mental processes
#### Weber’s Law:
The intensity of the just noticeable difference depends on how large the stimulus is to begin with
## HEARING:
- Like other senses, our hearing or audition, helps us adapt and survive
- Hearing provides information and enables relationships
### How it works:
- Air molecules, each bumping into the next, create waves of compressed and expanded air, like the ripples on a pond circling out from a tossed river
- As we swim in our ocean of moving air molecules, our ears detect these brief air pauses
### Sound waves:
- Frequency: The number of complete wavelengths that pass a point in a given time
- Pitch: A tone’s experienced highness or lowness; depends on frequency
### Ear hair:
- Ear hair is what converts sound waves into electrical impulses (transduction) in the cochlea
- Eventually thin/fall out due to age, same way hair off the top of the head falls off
### Selective Attention:
- Focusing conscious awareness on a particular stimulus to the exclusion of others
### Inattentional blindness:
- The inability to see an object or a person in out mindset
## SEEING
#### Electromagnetic energy
- When you look at a bright red tulip, the stimuli striking your eyes are not particles of the color red, but pulses of electromagnetic energy that your visual system perceives as red
- On the other end are the mile-long waves of radio transmission
- In between is the narrow band visible to us. Other portions are visible to other animals
- What we see as a visible light is but a thing slice of the wide spectrum of electromagnetic energy. On the spectrum’s one end are the short gamma waves, no longer than the diameter of an atom
#### Wavelength and Hue
- Light travels in waves, and the shape of those waves influences what we see. Light’s wavelength is the distance from one wave peak to the next
- More narrow sound waves are cooler colors like blue, while longer wavelengths are hotter colors like red
- A light wave’s amplitude, or height determines its intensity-the amount of energy your eye receives
### The Eye
- Light enters the eye though the cornea, which bends light to help provide focus
- #### Cornea
- The eye’s clear, protective, other later covering the pupil and iris
- Light then passes through the pupil, a small adjustable opening
- #### Pupil
- The adjustable opening in the center of your eye through which light enters
- Surrounding the pupil and controlling its size is the iris, a colored muscle that dilates or constricts in response to light intensity
- Each iris is so distinctive that an iris-scanning machine can confirm your identity
- #### Iris
- ring of muscle tissue that forms the colored portion of the eye round the pupil and controls the size of the pupil opening
- After passing through your pupil, light hits the transparent lens in your eye. The lens then focuses the light rays into an image on your retina
- Lens: the transparent structure behind the pupil that changes shape to help focus images in the retina
- Retina, a multi-layered tissue on the eyeball’s sensitive inner surface. To focus the rays, the lens changes its curvature and thickness in a process called accommodation
- #### Retina
- The light-sensitive inner surface of the eye, containing the receptor rods and cones plus layers of neurons that begin the profession of visual information
- #### Rods
- Retinal receptors that detect black, white, and gray, and are sensitive to movement; necessary for peripheral and twilight vision, when cones don’t respond
- #### Cones
- Retinal receptors that are concentrated near the center of the retina and that function in daylight or in well-lit conditions
- Cones detect fine detail and give rise to color sensations
- The rods and cones trigger chemical changes
- That chemical reaction would spark neural signals in nearby bipolar cells
- You could then watch the bipolar cells activate neighboring ganglion cells, whose axons twine together like the strands of a tope to form the optic nerve
- #### Optic Nerve
- The nerve that carries neural impulses from the eye to the brain
## TASTE:
- Taste is a chemical sense
- Your brain does not taste, your tongue does
- Taste buds
- Your taste buds detect 5 tastes: sweet, bitter, umomi, sour, and salty
- Papillae holds the taste bud
- Gustatory nerves connect your taste buds to the spine
- Processing is done in the frontal lobe (memory)
### Why do we love salty and sweet and dislike bitter and sour:
- #### Sweet
- Our mothers milk is sweet, So sweet is the first taste we are given in life. So we crave it early on.
- #### Salt
- Is essential for our survival
- #### Bitter
- Most things out in the world that are poisonous to the human body taste bitter
- #### Sour
- Detecting unripe/unsafe food
## SMELL:
### Olfactory Cells
- Neurons that project from the brain that process odor molecules
## TOUCH:
- The sensation produced by contact of an object with the surface of the skin
- Sensitivity to touch varies in different parts of the body; For example, the lips and fingers are far more sensitive than the torso or back. See also touch sense
- It is our physical connection to the outside world
- Your skin is embedded with receptors that respond to various kinds of stimulation
- The basic touch senses are:
- #### Pain
- #### Pressure
- #### Texture
- #### Temperature
#### Somatosensory Cortex:
- Front of the parietal lobe
### Three Types of Pain:
- #### Biological
Sensory receptors called nociceptors - mostly in your skin, but also in your muscles and organ - detect hurtful temperatures, pressure, or chemicals
- #### Psychological
- One powerful influence on out perception of pain is the attention we focus on it
- #### Cultural Influences
- Pain is a product of our attention, our expectations, and also our culture
- Not surprisingly, then, our perception of pain varies with out social situation and out cultural traditions
- We tend to perceive more pain when others seem to be experiencing again
@@ -1,70 +0,0 @@
---
title: "Psych Notes - Sleep"
parent: Psychology
---
# Sleep
___
## Definition:
A periodic natural loss of consciousness - as distinct from unconsciousness resulting from a coma, general anesthesia, or hibernation
### Circadian Rhythm:
Our biological clock; regular bodily rhythms
## How sleep deprivation affects our bodies:
- #### Brain
Decreased ability to focus attention and process and store memories; increased risk of depression, decreased metabolic rate, increases cortisol, enhanced limbic brain response to the mere sight of food, decreased critical responses-reducing the ability to resist temptations
- #### Immune system
Decreases production of immune cells, in creased risk of viral infections
- #### Fat cells
Increased production, greater risk of obesity
- #### Heart
Increased risk of high blood pressure
- #### Stomach
Increases in the hunger-arousing hormone, ghrelin; decrease in the hunger suppressing hormone, leptin
- #### Heart
Increased risk of high blood pressure
- #### Muscles
reduced strength, slower reaction time and motor learning
- #### Joints
increased inflammation
## Sleep disorders:
- #### Insomnia
Recurring problems in falling or staying asleep; Acute insomnia can last 1-3 nights a week; Chronic insomnia can last 3-7 nights a week
- #### Narcolepsy
A sleep disorder characterized by uncontrollable sleep attacks, going directly into stage 4 rem sleep
- #### Sleep Apnea
temporary cessation of breathing during sleep and repeated momentary awakenings; caused by weight, the more heavy you are the more likely you are to have sleep apnea
- #### Night terrors
Characterized by high arousal and an appearance of being terrified; happens during stage 3 sleep meaning you are not dreaming
- #### Parasomnia
The involve abnormal and unnatural movements, behaviorals, emotions, perceptions and dreams that occur while falling asleep, during sleep, between sleep stages, or upon waking
- #### Sleep Paralysis
Episodes involve not being able to speak or move while falling asleep or upon awakening. This usually lasts one or two minutes, and is often frightening
### What are dreams:
The experiences you have when you hallucinate in stage 4 sleep; A sequence of images, emotions, and thoughts, passing through a sleeping person’s mind
#### Why do we dream:
- To store memories
- To develop and preserve neural pathways
- To makes sense of neural static
- To satisfy our own wishes
- Manifest content: The symbolic, remembered story line of a dream
- Latent content: The underlying meaning of a dream
#### Lucid dreams:
Lucid dreams are when you know that you’re dreaming while you’re asleep. You’re aware that the events flashing through your brain aren't really happening. But that dream feels vivid and real. You may even be able to control how the action unfolds, as if you’re directing a movie in your sleep.
-12
View File
@@ -1,12 +0,0 @@
---
title: Guides
nav_order: 3
---
# Guides
{: .no_toc }
I will add some guides later, but for now I am still trying to figure out how to put together other parts of the website
{: .fs-6 .fw-300 }
@@ -1,94 +0,0 @@
---
title: Linux Command Auto-completion
parent: Guides
---
# Linux Command Auto-completion
___
sources: [ask Ubuntu](https://askubuntu.com/questions/68175/how-to-create-script-with-auto-complete) (parameters) and [stackoverflow](https://stackoverflow.com/questions/44441249/how-to-autocomplete-a-bash-commandline-with-file-paths) (path completion)
___
## Use:
A way for my custom commands to have their parameters/arguments be auto-completed rather than having to type out the entire word, plus it can be used to show the different options that are available
## Simple options
For commands that only care about options rather than file paths
#### Example code:
```bash
_foo() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--help --verbose --version"
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}
## `foo` <tab> <tab> would show autocomplete above wordlist
complete -F _foo foo
```
{ .new-title }
> Note
>
> (You place this in the /etc/bash_completion.d/ directory)
Or if you don't want to lose where it is by putting it in that obscure directory, you can temporarily source in in your .bashrc by adding this line:
```bash
source /path/to/your/autocomplete.sh
```
___
Or you can make one automatically with my `command_autocomp_maker.sh` custom command that I made so that I can easily transfer over my commands without there being an annoying bridge of config between them and since they are pretty simple themselves, link [here](https://github.com/pizza2d1/custom_commands)
## Complex options + file paths
source: [stack overflow](<https://stackoverflow.com/questions/44441249/how-to-autocomplete-a-bash-commandline-with-file-paths>)
For commands that are more specific, you can add options for parameters to include `/path/` completion, such as: `command1 --install /path/to/file` where you can set it to only have the `--install` parameter include `/path/` completion.
```bash
__command_name_autocomplete()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--help -h --install -i --run -r --rebuild -rb --show-running-containers -ps --stop -s --remove -rm --logs -l --bash -b --sass -css --unit-tests -t"
containers="nginx php mysql mongo node"
sass="watch"
# By default, autocomplete with options
if [[ ${prev} == command_name ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
# By default, autocomplete with options
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
# For --install and -i options, autocomplete with folder
if [ ${prev} == --install ] || [ ${prev} == -i ] ; then
COMPREPLY=( $(compgen -d -- ${cur}) )
return 0
fi
# For --stop --remove --logs and --bash, autocomplete with containers
if [ ${prev} == --stop ] || [ ${prev} == -s ] || [ ${prev} == --remove ] || [ ${prev} == -rm ] || [ ${prev} == --logs ] || [ ${prev} == -l ] || [ ${prev} == --bash ] || [ ${prev} == -b ] ; then
COMPREPLY=( $(compgen -W "${containers}" -- ${cur}) )
return 0
fi
# For --sass and -css, complete with sass options
if [ ${prev} == --sass ] || [ ${prev} == -css ] ; then
COMPREPLY=( $(compgen -W "${sass}" -- ${cur}) )
return 0
fi
# For --unit-tests and -t, complete with relative to command_name folder paths
if [ ${prev} == --unit-tests ] || [ ${prev} == -t ] ; then
COMPREPLY=( $(compgen -d -- ${cur}) )
return 0
fi
}
complete -o filenames -F __command_name_autocomplete command_name
```
-11
View File
@@ -1,11 +0,0 @@
---
title: Linux Commands
parent: Guides
---
# Linux Commands
{: .no_toc }
Here is where I will add some of my notes on how I used some of the common linux commands, mostly because the oones that I find online are kind of hard to follow and don't always apply to a more general use case.
{: .fs-6 .fw-300 }
+1
View File
@@ -49,3 +49,4 @@ If you would like to make a copy of this webpage for your own use, I recommend u
### - **[About Me]({% link src/aboutme.md %})**
### - **[Projects]({% link src/projects/index.md %})**
### - **[Server News]({% link src/server_news/index.md %})**
@@ -1,60 +0,0 @@
---
title: Home
layout: home
nav_order: 1
description: "A webpage dedicated to guides and notes made by Pizza2d1"
permalink: /
---
# Welcome!
{: .fs-9 }
I hope you enjoy learning about the different things that I have collected here to share with people!
{: .fs-6 .fw-300 }
[Table of Contents](#table-of-contents){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
[Check out my other projects!](https://github.com/pizza2d1){: .btn .fs-5 .mb-4 .mb-md-0 .btn-green }
---
{: .warning }
> This was made in a very scrappy manner and may have some issues with it. If you see any, please help me and [make a issue notice](https://github.com/Pizza2d1/pizza2d1.github.io/issues/new) so that I can fix it. Thank you!
## Getting started
{: .new-title }
> Quick Note
>
> This webpage is still a work in progress and they will be for the next few days, BUT, don't let that dicourage you from checking out what is already posted :3
If you would like to download my class notes, you can find a download link on the [Class Notes](https://pizza2d1.github.io/src/class_notes) page
<!-- You can go through an see what notes I've made by selecting the category on sidebar, and if you would like to download the notes yourself you can scroll down to the bottom and get both a html and markdown version of the page, which I find very useful as it allows you to put it right into your [Obsidian](https://obsidian.md) note-taking app -->
### License
If you would like to make a copy of this webpage for your own use, I recommend using the official [just-the-docs template](https://just-the-docs.github.io/just-the-docs-template/) which includes a valid MIT license, but if you would like to use mine that is totally, and completely fine (and would make me so happy)
#### [My license](https://github.com/pizza2d1/pizza2d1.github.io/tree/main/LICENSE.txt).
### Contributing
I would love to have some help adding new guides and notes, so if you yourself would like to add some, you can message me on [Discord](https://discordapp.com/users/714918826831118436), (Just make sure to tell me who you are first)
### Contact me!
[![LinkedIn Logo](https://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/LinkedIn_logo_initials.png/600px-LinkedIn_logo_initials.png){: width="20" }](https://www.linkedin.com/in/pizza2d1/)
[LinkedIn](https://www.linkedin.com/in/pizza2d1/)
[![Discord Logo](https://static.vecteezy.com/system/resources/previews/006/892/625/non_2x/discord-logo-icon-editorial-free-vector.jpg){: width="20" }](https://discordapp.com/users/714918826831118436)
[Discord](https://discordapp.com/users/714918826831118436)
[![Github Logo](https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg){: width="20" }](https://github.com/pizza2d1)
[Github](https://github.com/pizza2d1)
----
## <u>Table of contents</u>
### - **[About Me]({% link src/aboutme.md %})**
### - **[Notes]({% link src/notes/index.md %})**
#### - **[Command Notes]({% link src/notes/programming.md %})**
### - **[Class Notes]({% link src/class_notes/index.md %})**
-64
View File
@@ -1,64 +0,0 @@
___
**Assigning Variables
StringName="Words"
IntName=Number#
ArrayName=() or ArrayName=(item1, item2)
**Calling Variables
$StringName returns "Words"
$IntName returns Number#
$ArrayName returns **first** item of array
${ArrayName[index]} returns array item
___
### Strings
Add to String:
`NewString="$String <NEW_CONTENT>"
Modify String:
```bash
String="Hello World"
NewString=${String:2:5} #${ STRING_BEING_MODIFIED : STARTING_POS : OFFSET }`
```
String output: "Hello World"
NewString output: "lo Wo"
___
### Arrays
Are piss-poor, I hate them
First item in Array:
`$ArrayName`
Second item in Array:
`${ArrayName[1]}`
All items of an Array:
`${ArrayName[@]}`
Number of items in an Array (int):
`$(#ArrayName[@]}`
^^^^ Awful
Bash colors: https://misc.flogisoft.com/bash/tip_colors_and_formatting
```bash
Black 0;30 Dark Gray 1;30
Red 0;31 Light Red 1;31
Green 0;32 Light Green 1;32
Brown/Orange 0;33 Yellow 1;33
Blue 0;34 Light Blue 1;34
Purple 0;35 Light Purple 1;35
Cyan 0;36 Light Cyan 1;36
Light Gray 0;37 White 1;37
```
Examples:
RED='\033[1;31m'
GREEN='\033[0;32m'
Icons: https://github.com/sebastiencs/icons-in-terminal?tab=readme-ov-file#how-it-works
-123
View File
@@ -1,123 +0,0 @@
Sources: [cheat sheet](<https://education.github.com/git-cheat-sheet-education.pdf>), [create sub-branch](<https://stackoverflow.com/questions/33652953/how-to-create-a-sub-branch>), [create remote branch](<https://stackoverflow.com/questions/1519006/how-do-i-create-a-remote-git-branch>), [compare commits](<https://stackoverflow.com/questions/17563726/how-can-i-see-the-changes-in-a-git-commit>), [compare branches](<https://stackoverflow.com/questions/43552274/how-can-i-diff-two-branches-in-github>)
___
## Downloading
### Download:
<u>alias</u> can also be the URL of the project
```bash
git clone [ALIAS]
```
### Download specific branch:
```bash
git clone --single-branch --branch=[BRANCH NAME] [ALIAS]
```
## Modifying online repository
#### Steps:
- Make changes to the files that you want to have modified
- Have the files added to the push list via `git add [FILENAME]`
- Commit the changes: `git commit`
- Push the changes to the online (remote) repository: `git push` (will push the current branch)
### Push
```
git push origin local-name:remote-name
```
## Creating a repository:
Creates a private repository on [github](<github.com/pizza2d1>)
```bash
gh repo create SIEMTesting --private
```
You can also make it public with `--public`
```bash
git remote add SIEMTesting https://github.com/pizza2d1/SIEMTesting
```
Will push current directory to the repo called "SIEMTesting" to the "master" branch, regardless of what the current directory is called
```
git push --set-upstream SIEMTesting master
```
## Creating branches
#### Local:
Just use the git branch command:
```bash
git branch [NEW_BRANCH_NAME]
```
#### Remote:
###### Create root branch:
```bash
# Create the branch and checkout into it
git checkout -b [NEW_BRANCH_NAME]
# Make the new branch a branch of origin
git push origin [NEW_BRANCH_NAME]
# Set git commits to go to that remote branch
git push --set-upstream origin [NEW_BRANCH_NAME]
```
###### Create sub-branch:
```bash
git push origin main:[NEW_BRANCH_NAME]
```
## Deleting branches
#### Local:
To delete the _**local**_ branch, use one of the following:
```
git branch -d <branch_name>
git branch -D <branch_name>
```
- The `-d` option is an alias for `--delete`, which only deletes the branch if it has already been fully merged in its upstream branch.
- The `-D` option is an alias for `--delete --force`, which deletes the branch "irrespective of its merged status." [Source: `man git-branch`]
- As of [Git v2.3](https://github.com/git/git/blob/master/Documentation/RelNotes/2.3.0.txt), `git branch -d` (delete) learned to honor the `-f` (force) flag.
- You will receive an error if you try to delete the currently selected branch.
#### Remote:
```
git push -d origin <branch_name> #will not auto-complete
# OR #
git push <remote_name> --delete <branch_name>
```
If you are deleting a sub-branch, you do not need to specify the parent branch
## Comparing Commits/Branches
#### Commits:
To compare between one commit and the other, you must get their commit hash:
```bash
git log # Will show you your list of commits and their hashes
```
Then you can use `git diff` to compare:
```bash
git diff [Commit1_HASH] [Commit2_HASH]
# Example:
git diff d9c448f746c27285981a00403959898006b57ddb 171ab48a6ffe190be5b4cfd8a0bc4cefd5639735
```
#### Branches:
Used diff with the branch names:
```bash
git diff branch_1 branch_2
# Can also be reversed to as git diff branch_2 branch_1
```
For example, if you want to find out what will happen when main gets merged **from** dev:
```bash
git diff main dev
```
# This is the extent of my knowledge for now
#git #commands/git
-31
View File
@@ -1,31 +0,0 @@
---
title: "Copy from NAS"
parent: Linux
---
source: [Unix and Linux](<https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh>)
___
Syntax:
```
scp <source> <destination>
```
To copy a file from `B` to `A` while logged into `B`:
```
scp /path/to/file username@[A's IP_ADDRESS]:/path/to/destination
```
To copy a file from `B` to `A` while logged into `A`:
```
scp username@[B's IP_ADDRESS]:/path/to/file /path/to/destination
```
Example:
```bash
scp pizza2d1@192.168.0.77:/home/pizza2d1/ObbyBackup /home/pizza2d1/
```
Will copy the ObbyBackup file from the NAS home directory to my home directory
#commands/scp
@@ -1,56 +0,0 @@
---
title: "Custom PATH commands"
parent: Linux
---
___
Custom $PATH files that I've made (In case I need to delete them):
THESE ARE ALL IN /usr/custom_paths/
###### asdf
Changes wallpaper to base Ubuntu wallpaper:
`/usr/share/backgrounds/warty-final-ubuntu.png`
###### autocomp_maker
Makes a file that allows a custom command to have auto-completion when you use tab, just like with regular commands. Places the file in `/etc/bash_completion.d/`
source: [stackoverflow](<https://stackoverflow.com/questions/44441249/how-to-autocomplete-a-bash-commandline-with-file-paths>)
###### bash_testing
Displays default terminal message, used for testing new `.bashrc` iterations and in case I want to display it without opening a new terminal window (I think its annoying)
###### bootselector
A tool I made that lets you switch your plymouth boot splash screen and add a plymouth to the list of available plymouths
###### boottester
Only kind of works, shows startup plymouth
###### gayshit
ASCII art of some gay shit
###### gayterm
Displays term but with too much color
###### ihaveawunkus
Will rotate through all of my goofy cat pictures
###### kermit
Displays kermit the frog with same computer spec details as term
###### pizzapaper
My wallpaper switching command that is made for gnome DE's
###### term
Shows the current `.bashrc` terminal opening display
#custompaths/asdf
#custompaths/autocomp_maker
#custompaths/bash_testing
#custompaths/bootselector
#custompaths/boottester
#custompaths/gayshit
#custompaths/gayterm
#custompaths/ihaveawunkus
#custompaths/kermit
#custompaths/pizzapaper
#custompaths/term
-19
View File
@@ -1,19 +0,0 @@
---
title: "Ethernet issues"
parent: Linux
---
If the ethernet device shows as "unavailable" when using this command:
```bash
nmcli device status
```
You need to restart the network manager service, by doing:
```bash
sudo systemctl restart NetworkManager
```
This will temporarily disconnect you from all network devices but will connect again with (hopefully) all devices working again
#commands/nmcli #commands/systemctl
-58
View File
@@ -1,58 +0,0 @@
---
title: "Filesystems"
parent: Linux
---
If you must extract and isolate additional storage from `sda` without the risk of data loss due to shrinking the primary drive which is never advised, then a safer approach would be to use `fallocate` to create a loop device.
`fallocate` is great for creating `swap` on systems but can also be used to great effect when partitioning is not an option.
First, create a mount point for the loop drive.
```
mkdir /NewDrive
```
Now, you can go ahead and create the loop device.
```
fallocate -l 5G NewStorage
```
The above command will create will create a file `NewStorage` with a file size of just under 5GB. You can confirm this with `ls -h`
Now that the storage is isolated rather than partitioned, you will need to create a filesystem with it.
```
mkfs.ext4 NewStorage
```
This will create a `ext4` filesystem. Now, you can mount it to the directory created earlier.
```
mount NewStorage /NewDrive
```
Your `lsblk` command should now return something like this
```
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
sda1 8:1 0 298.1G 0 part /
loop0 7:0 0 5G 0 loop /NewDrive
```
And that is it without the risk of data loss or need for shrinking.
To see all active loop devices in use on your system, you can use `losetup`
```
losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
/dev/loop0 0 0 1 0 /path/TO/NewDrive
```
#commands/mkdir #commands/fallocate #commands/mkfs #commands/mount #commands/lsblk #commands/losetup
-27
View File
@@ -1,27 +0,0 @@
---
title: "Flashing drives"
parent: Linux
---
###### Create a compressed image file with a working image file
```bash
dd if=/dev/sdb | gzip > backup.img.gz
```
###### Flash a drive with compressed image file
```bash
cat backup.img.gz | gunzip | dd of=/dev/sdb
```
## ROBOTICS VERSION:
For flashing a sd card to the roborio
```bash
gunzip -c /mnt/mydrive/img.gz > /dev/sda
```
#commands/dd #commands/gzip
-38
View File
@@ -1,38 +0,0 @@
---
title: "Linux"
---
___
## [[Ubuntu]]
- [Hanabi Wallpapers](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FHanabi%20Wallpaper%20Usage>)
- [Startup Apps](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FCustom%20Startup%20Programs>)
- [Ubuntu extensions](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FUbuntu%20Add-ons>)
- [Plymouth config](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2Fconfiguring%20plymouth>)
### [[Copy from NAS]]
For copying/sending files to the NAS through cli using the `scp` command
### [[Custom PATH commands]]
A list of all the custom PATH commands I made for my linux system for customization and space saving
### [[Ethernet issues]]
Can also be used for wifi issues, put notes here on how to use `nmcli`
### [[Filesystems]]
Managing linux file systems with `fdisk` and `fallocate`
### [[Flashing drives]]
How to use the `dd` command
### [[inotify events]]
- [inotifywait breakdown canvas](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2Finotifywait%20breakdown.canvas>)
All `inotify` events and what they mean, used for my custom SIEM on my NAS
### [[Installing hyprland commands]]
My process for installing hyprland, seems to only work for actual computers and not VMs
### [[Linux command auto-completion]]
How to add auto-completion for custom commands, using `/etc/bash_completion.d/` files
### [[Making a linux logical volume]]
How to make a LVM for linux, sort of the same thing as a windows "storage pool"
### [[Resize LVM]]
How to modify existing LVMs
### [[sed command in Linux]]
Some things that I learned while trying to use `sed` for my bash programs
### [[YAML for Linux]]
What I learned from using yaml with the community `yq` command when making my pizza-paper-YAML program in case I would use YAML in robotics
#linux
-53
View File
@@ -1,53 +0,0 @@
---
title: "inotify events"
parent: Linux
---
## OPEN
A watched file or a file within a watched directory was opened.
## ACCESS
A watched file or a file within a watched directory was read from.
## MODIFY
A watched file or a file within a watched directory was written to.
## CREATE
A file or directory was created within a watched directory.
## DELETE
A file or directory within a watched directory was deleted.
## ATTRIB
The metadata of a watched file or a file within a watched directory was modified. This includes timestamps, file permissions, extended attributes etc.
## CLOSE_WRITE
A watched file or a file within a watched directory was closed, after being opened in writable mode. This does not necessarily imply the file was written to.
## CLOSE_NOWRITE
A watched file or a file within a watched directory was closed, after being opened in read-only mode.
## CLOSE
A watched file or a file within a watched directory was closed, regardless of how it was opened. Note that this is actually implemented simply by listening for both close_write and close_nowrite, hence all close events received will be output as one of these, not CLOSE.
## MOVED_TO
A file or directory was moved into a watched directory. This event occurs even if the file is simply moved from and to the same directory.
## MOVED_FROM
A file or directory was moved from a watched directory. This event occurs even if the file is simply moved from and to the same directory.
## MOVE
A file or directory was moved from or to a watched directory. Note that this is actually implemented simply by listening for both moved_to and moved_from, hence all move events received will be output as one or both of these, not MOVE.
## MOVE_SELF
A watched file or directory was moved. After this event, the file or directory is no longer being watched.
## DELETE_SELF
A watched file or directory was deleted. After this event the file or directory is no longer being watched. Note that this event can occur even if it is not explicitly being listened for.
## UNMOUNT
The filesystem on which a watched file or directory resides was unmounted. After this event the file or directory is no longer being watched. Note that this event can occur even if it is not explicitly being listened to.
#inotify
@@ -1,30 +0,0 @@
---
title: "Installing hyprland commands"
parent: Linux
---
`pacman -Sy archinstall archlinux-keyring
`shutdown -h now
Boot into existing OS
Open KDE wayland
IMAGE OF KDE DESKTOP
Open terminal (named Konsole)
`sudo pacman -Suy git`
`mkdir -p .local/src`
`cd .local/src`
`sudo git clone https://github.com/bugswriter/dwm.git`
`sudo git clone https://github.com/bugswriter/dmenu.git`
`sudo git clone https://github.com/bugswriter/st.git`
### Desktop environment add-ons:
Mechabar
#hyprland
@@ -1,91 +0,0 @@
---
title: "Linux command auto-completion"
parent: Linux
---
sources: [ask Ubuntu](<https://askubuntu.com/questions/68175/how-to-create-script-with-auto-complete>) (parameters) and [stackoverflow](<https://stackoverflow.com/questions/44441249/how-to-autocomplete-a-bash-commandline-with-file-paths>) (path completion)
___
## Use:
A way for my custom commands to have their parameters/arguments be auto-completed rather than having to type out the entire word, plus it can be used to show the different options that are available
## Simple options
For commands that only care about options rather than file paths
#### Example code:
```bash
_foo() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--help --verbose --version"
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}
## `foo` <tab> <tab> would show autocomplete above wordlist
complete -F _foo foo
```
###### (You place this in the /etc/bash_completion.d/ directory)
Or if you don't want to lose where it is by putting it in that obscure directory, you can source in in your .bashrc by adding this line:
```bash
source /path/to/your/autocomplete.sh
```
___
Or you can make one automatically with my `command_autocomp_maker.sh` custom command that I made so that I can easily transfer over my commands without there being an annoying bridge of config between them and since they are pretty simple themselves
## Complex options + file paths
source: [stack overflow](<https://stackoverflow.com/questions/44441249/how-to-autocomplete-a-bash-commandline-with-file-paths>)
For commands that are more specific, you can add options for parameters to include `/path/` completion, such as: `command1 --install /path/to/file` where you can set it to only have the `--install` parameter include `/path/` completion.
```bash
__command_name_autocomplete()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--help -h --install -i --run -r --rebuild -rb --show-running-containers -ps --stop -s --remove -rm --logs -l --bash -b --sass -css --unit-tests -t"
containers="nginx php mysql mongo node"
sass="watch"
# By default, autocomplete with options
if [[ ${prev} == command_name ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
# By default, autocomplete with options
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
# For --install and -i options, autocomplete with folder
if [ ${prev} == --install ] || [ ${prev} == -i ] ; then
COMPREPLY=( $(compgen -d -- ${cur}) )
return 0
fi
# For --stop --remove --logs and --bash, autocomplete with containers
if [ ${prev} == --stop ] || [ ${prev} == -s ] || [ ${prev} == --remove ] || [ ${prev} == -rm ] || [ ${prev} == --logs ] || [ ${prev} == -l ] || [ ${prev} == --bash ] || [ ${prev} == -b ] ; then
COMPREPLY=( $(compgen -W "${containers}" -- ${cur}) )
return 0
fi
# For --sass and -css, complete with sass options
if [ ${prev} == --sass ] || [ ${prev} == -css ] ; then
COMPREPLY=( $(compgen -W "${sass}" -- ${cur}) )
return 0
fi
# For --unit-tests and -t, complete with relative to command_name folder paths
if [ ${prev} == --unit-tests ] || [ ${prev} == -t ] ; then
COMPREPLY=( $(compgen -d -- ${cur}) )
return 0
fi
}
complete -o filenames -F __command_name_autocomplete command_name
```
#commands/source #commands/complete
@@ -1,154 +0,0 @@
---
title: "Making a linux logical volume"
parent: Linux
---
[Source](<https://medium.com/@yhakimi/lvm-how-to-create-and-extend-a-logical-volume-in-linux-9744f27eacfe>)
___
# Start:
Make sure that your disk has a clean partition that you are able to convert into a usable disk, aka allow the LVM (logical volume manager) to use your storage.
# Option 1. Using entire disk:
First, you want to delete all partitions and previous data that is on the drive, you CANNOT directly convert a drive into a logical volume while keeping the data, as it using formatting to allow for drive expansion.
### Delete partitions
We will use the `fdisk` tool that comes with most linux distributions to modify your disk.
First, list all your drives to make sure that you are selecting the right drive:
```bash
sudo fdisk -l
```
Then, its time to wipe the disk of all partitions (replace sdXX with the drive you choose):
```bash
sudo fdisk /dev/sdXX
```
This will open the fdisk menu, you should see
`Command (m for help):`
at the bottom of the terminal
### Quick note
If you got a red error saying that the drive is running, MAKE SURE TO UNMOUNT THE DEVICE. If you cannot unmount it conventionally, run:
```bash
sudo umount -l /dev/sdXX
```
(if you are not sure where the mount is located, use gnome-disks)
Run these commands (the letters, also one at a time):
```bash
# Deletes your partition (might need to run multiple times)
Command (m for help): d
# Creates a new clean partition
Command (m for help): n
# Press enter through all of these
Partition Number: (1-128, default 1): <Press Enter>
First Sector (2048-XXXXX, default 2048): <Press Enter>
Last Sector, +/-sectors or +/-size{K,M,G,T,P} (2048-XXXXX, default XXXXX): <Press Enter>
# Edits the kind of partition that it will be, in this case we want 8e (LVM)
Command (m for help): t
Selected Partition: 1
Partition type or alias (type L to list all): 8e
# Write this to the disk so that it will be saved
Command (m for help): w
```
# Option 2. Extend Partitions WORKING ON
If you want to use unused parts of your primary/drive or want to just use extra space on other drives without compromising their data, you can instead use that extra space as logical volume styled partitions
```bash
# Deletes your partition (might need to run multiple times)
Command (m for help): d
# Creates a new clean partition
Command (m for help): n
# Press enter through all of these
Partition Number: (1-128, default 1): <Press Enter>
First Sector (2048-XXXXX, default 2048): <Press Enter>
Last Sector, +/-sectors or +/-size{K,M,G,T,P} (2048-XXXXX, default XXXXX): <Press Enter>
# Edits the kind of partition that it will be, in this case we want 8e (LVM)
Command (m for help): t
Selected Partition: 1
Partition type or alias (type L to list all): 8e
# Write this to the disk so that it will be saved
Command (m for help): w
```
You now have a partitioned disk that can be used for LVM purposes
## Creating a Logical Volume
Now that you have a free partition that can be used for a LVM, you need to make it into a physical drive
###### Creating a physical drive
```bash
sudo pvcreate /dev/sdXX
```
To verify that it worked, run:
```bash
sudo pvdisplay
```
###### Creating the volume group
This will make a volume group (vg) named vg-data, you can use a different name instead:
```bash
sudo vgcreate vg-data /dev/sdXX
# Check to see that it worked:
sudo vgs
```
###### Creating the logical volume
Will create the logical volume that will soon be mounted to your system so that you can use it, you can replace `lv-data` with another name, just remember that `vg-data` is the right name.
```bash
# Will use all of the free space in the volume group to add to the logical volume
sudo lvcreate --name lv-data -l 100%FREE vg-data
```
You now have a logical volume! This can be added to easily so that you can expand your storage, even if you have processes running on the logical volume (really nice).
## Adding LV to file-system
Now that you have a logical volume, you'll notice that you can't save any data to it quite yet, in order to do that you need to make/add a file-system
###### Option 1. Making your LV into a file-system
If you have not already made a accessible logical volume, this is how to make one:
```bash
# "mkfs" means make filesystem, this creates a filesystem based
# on the entirety of your logical volume.
sudo mkfs.xfs /dev/vg-data/lv-data
# If "mkfs.xfs" doesn't work, just use "mkfs" which will use ext4 instead of xfs
```
Now to mount the file-system to your system:
```bash
# You can replace the "/data" folder with another name if you wish
sudo mkdir /data
sudo mount /dev/vg-data/lv-data /data
```
###### Option 2. Adding a new LV to existing file-system
If you already have a file-system that uses LVs and want to add another LV to it, you don't need to make a new file-system for it, instead do:
```bash
resize2fs /dev/vg-data/lv-data
```
This will try and resize the file-system to the new size of your logical volume, assuming you added to it.
# End
#commands/fdisk #commands/umount #commands/mount #commands/pvcreate #commands/vgcreate #commands/lvcreate #commands/resize2fs
-215
View File
@@ -1,215 +0,0 @@
---
title: "Resize LVM"
parent: Linux
---
___
## How to resize volumes with LVM
**Quick tips:**
- To see the details of logical volume group use: `vgdisplay`
- To see the details of logical volumes use: `lvdisplay`
- To create new volumes, use: `lvcreate`
- To resize existing volumes, use: `lvresize`
- Use "--help" see quick help for the command:  `lvresize --help`
- It is easy to add extra space to an existing file system - no downtime required.
- It is much more difficult to shrink the file system - downtime IS required.
- Do not attempt to shrink a volume unless you really know what you are doing.
- More details here: [http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager](http://www.google.com/url?q=http%3A%2F%2Fwww.centos.org%2Fdocs%2F5%2Fhtml%2FCluster_Logical_Volume_Manager&sa=D&sntz=1&usg=AFrqEzdaYf86KRv877W5Z2vbRJEqDIu_Sg)
### Before you begin:
- Run `df -h /` to make sure you have some free space available on your root volume. If your root volume is 100% full, you must clean it up by removing some files before you proceed.
- Run `vgdisplay` and note which volume groups you actually have.
- Run `lvdisplay` and note which logical volumes exist on your system.
- Adjust the examples below to match volume/group names.
## Example 1:
##### Add 10GB to "/" (root) partition
Add 10GB to "root" volume:
```bash
lvresize -L +10G /dev/VolGroup00/root
```
Resize the filesystem that resides on that volume_:
```bash
resize2fs /dev/VolGroup00/root
```
Note: resize2fs may take a while to expand the file system on a large volume, so you may want to open a second terminal and monitor the progress with the following command:
```bash
watch df -h
```
## Example 2:
##### Set swap to 16GB
Disable all swaps:
```bash
swapoff -a
```
Set swap partition size to 16GB:
```bash
lvresize -L 16G /dev/VolGroup00/swap
```
Resize the swap area to use new volume size:
```bash
mkswap /dev/VolGroup00/swap
```
Enable all swaps:
```bash
swapon -a
```
## Example 3:
##### Create a new volume "data" of 5GB and mount it as "/data"
Create the mount point:
```bash
mkdir /data
```
Create the volume:
```bash
lvcreate -L 5G -n data VolGroup00
```
Create the filesystem:
```bash
mkfs.ext3 /dev/VolGroup00/data
```
Add the following line to your /etc/fstab: (MIGHT BE WRONG)
```bash
/dev/VolGroup00/data /data ext3 defaults 0 2
```
Mount the volume:
```bash
mount /data
```
## Example 4: NOT COMPLETE
##### Reducing size of existing volume "test"
IMPORTANT:
1. Reducing volume size CAN NOT be performed while file system is mounted and may take a LONG time.
2. You will need to boot from a Rescue CD in order to be able to reduce the size of a volume which holds root file system.
3. Improper reduction of a volume size WILL DESTROY YOUR DATA.
Make sure you have a good backup and plenty of downtime scheduled, as it may take a while to shrink a filesystem.
***You have been warned: proceed at your own risk.
**First, make sure the file system has enough free space so it can be reduced:
```bash
```
_root@server:~# **df -h /test/**_
Filesystem Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-__test
_5.0G  139M 4.6G   3% /test_
Note that even empty file system will use some space: 139M in our case.
Proceed to unmount the file system.
_root@server:~# **umount /test**_
Run a filesystem consistency check. This may take a while.
_root@server:~# **fsck -f /dev/VolGroup00/test**_ _e2fsck 1.41.11 (14-Mar-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
__/dev/mapper/VolGroup00-__test__: 11/327680 files (0.0% non-contiguous), 55935/1310720 blocks_
Find out file system block size
_root@server:~# **tune2fs -l /dev/**__**VolGroup00**__**/test | grep 'Block size'**_
_Block size:               4096_
Double check the minimum file system size in blocks:
_root@server:~# **resize2fs -P /dev/**__**VolGroup00**__**/test**_
_resize2fs 1.41.11 (14-Mar-2010)_
_Estimated minimum size of the filesystem: 34477_
In this example, the minimum logical volume size required is: 34477*4096 = 141217792 bytes.
Here, you can make calculations to figure out what your file system final size should be, proceed with caution. It is much safer to shrink a file system to its minimum size instead.
Depending on the current file system size, usage and layout, this may take a LONG time.
_root@server:~# **resize2fs -M**_ _**/dev/**__**VolGroup00**__**/test**__
resize2fs 1.41.11 (14-Mar-2010)
Resizing the filesystem on /dev/raid1/test to 34477 (4k) blocks.
The filesystem on /dev/raid1/test is now 34477 blocks long.
_
**MAKE SURE THAT YOUR PLANNED NEW VOLUME SIZE IS GREATER THAN THE SIZE OF THE FILESYSTEM.
**Keep in mind that LVM allocates space to volumes on Physical Extent (PE) granularity, so you may not be able to get the exact size you want.
_root@server:~# **vgdisplay**_
_--- Volume group ---_
_VG Name_ _VolGroup00_
_System ID_
_Format                lvm2_
_Metadata Areas        1_
_Metadata Sequence No  44_
_VG Access             read/write_
_VG Status             resizable_
_MAX LV                0_
_Cur LV                20_
_Open LV               20_
_Max PV                0_
_Cur PV                1_
_Act PV                1_
_VG Size               930.50 GiB_
_PE Size               4.00 MiB_
_Total PE              238207_
_Alloc PE / Size       212966 / 831.90 GiB_
_Free  PE / Size       25241 / 98.60 GiB_
_VG UUID               LazRIZ-d8rU-2bwB-uI7o-6Amt-BH0w-oFxNh_
In our example, PE size is 4MB, we will have to round up the planned volume size to next larger multiple of 4.
Just to be on a safe side, we strongly recommend you adding some extra "padding", so in this example we will shrink the volume down to 200M, which is greater than BOTH 139M used as reported by df and 141M as calculated in blocks.
_root@server:~# **lvresize -L 200M**_ _**/dev/**__**VolGroup00**__**/test**__
WARNING: Reducing active logical volume to 200.00 MiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce test? [y/n]: **y**
Reducing logical volume test to 200.00 MiB
Logical volume test successfully resized
_
Now, grow the file system to use all of the space available in a logical volume:
_root@server:~# **resize2fs**_ _**/dev/**__**VolGroup00**__**/test**__resize2fs 1.41.11 (14-Mar-2010)
Resizing the filesystem on_ _/dev/__VolGroup00__/test_ _to 51200 (4k) blocks.
The filesystem on_ _/dev/__VolGroup00__/test_ _is now 51200 blocks long._
Mount the file system and check the new size:
_root@server:~# **mount**_ **_/dev/__VolGroup00__/test_ _/test_**
_root@server:~# **df -h /test**_
_Filesystem            Size  Used Avail Use% Mounted on_
_/dev/mapper/__VolGroup00__-test_
_196M 131M   56M  71% /test_
@@ -1,27 +0,0 @@
---
title: "Running file issues on linux"
parent: Linux
---
sources: [Unix & Linux](<https://unix.stackexchange.com/questions/79702/how-to-test-whether-a-file-uses-crlf-or-lf-without-modifying-it>) and [stackoverflow](<https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types>)
___
A while ago I was having issues with my programs not running because they kept having a error that would look like this:
```
./pizza-paper.sh: line 3: $'\r': command not found
./pizza-paper.sh: line 10: $'\r': command not found
./pizza-paper.sh: line 47: syntax error near unexpected token `done'
'/pizza-paper.sh: line 47: `done < "/home/$user/Documents/pizzapapers.txt"
```
And I found out that the reason why that was happening was that VSCode was somehow changing the file's "line feed" which is basically what the file uses to know when to move onto the next line (for syntax purposes).
The issue that I was having was the fact that VSCode so generously decided to do was change my normal linux LF (that's the name of the type of line feed) to window's version of line feed: CRLF, which is not compatible with linux scripts.
The quick fix for it is to just convert it over with a command that you install called `dos2unix` like this:
```bash
dos2unix <FILENAME>
# Example
# dos2unix pizzapaper.sh
```
That should fix the issue and make it so that the programs can be run normally again
@@ -1,25 +0,0 @@
---
title: "sed command in Linux"
parent: Linux
---
___
"sed" is a pretty useful command that allows you to edit/replace multiple parts of a text file by specifying keywords or locations
You are able to replace all "I did" strings in a text file to "I chose to" with a single command, similarly, you are able to pick a range of how many of those matching strings get modified to the new string that you choose
## Additional arguments:
| Option | Description |
| ------------ | ---------------------------------------------------------------------------- |
| **`**-i**`** | Edit the file in place without printing to the console (overwrite the file). |
| **`**-n**`** | Suppress automatic printing of lines. |
| **`**-e**`** | Allows multiple commands to be executed. |
| **`**-f**`** | Reads sed commands from a file instead of the command line. |
| **`**-r**`** | Enables extended regular expressions. |
#commands/sed
-84
View File
@@ -1,84 +0,0 @@
---
title: "YAML for Linux"
parent: Linux
---
___
The package that I used to modify .yaml files was the most used and updated called `yq` that can be directly installed by that name with `sudo apt install yq`
## Creating yaml files/keys
To create a yaml file you will have to do it the normal way with:
`touch <FILE>.yaml`
In yaml's data system, it follows the same structure as dictionaries where you can store different values with certain "keys" that can be used to call/modify those values.
To create a new key + value, you need to both input them into the file.
###### Note: You must include a value when declaring a key with yq
Lets start by making a `data1` key with value `69` into a file called `testing.yaml`
`yq -yi '.data1 = 69' testing.yaml #testing.yaml must be an existing file`
###### Breakdown:
- `yq` will call upon the yaml editing command
- `-yi` will be used to WRITE to the file rather than READ
- `.data1` identifies the key in the dictionary that we are focusing on
- `= 69` sets the value of the `data1` key to the integer `69`
- `testing.yaml` is the file that will be edited
Now lets make a dictionary inside a dictionary, its just as simple as the first step, but instead you insert it into the main dictionary name:
`yq -yi '.mainDictionary.data1 = 69' testing.yaml`
Now, you might be thinking "What if I don't want to have a value assigned to the key?", not possible friend, at least not with `yq`, instead you have to echo it into the file like so:
Creating a new key called `data2` with no value
`echo "data2:" >> testing.yaml`
This will create an empty key, if you were to read it, it would print:
`data2: null`
## Deleting yaml elements
To delete an element, you need the name of the key
`yq -yi 'del(.mainDictionary.data1) testing.yaml`
This will delete the `data1` key and its value from inside the `mainDictionary` dictionary
If you don't include `-yi` it will just print out what it would be like IF the element was deleted
## Using yq with variables
The way to include variables is very weird and follows a similar style to the `sed` command
###### When using variables you MUST use double brackets ", not single '
If you want to do just a variable-named key, do:
`yq -yi ".mainDictionary.$VariableName = 69" testing.yaml`
For variable-named values, you must include an extra cover of double brackets:
`yq -yi '.mainDictionary.data1 = "$VariableName"' testing.yaml`
For BOTH variable-named keys and values, its a bit more weird
`yq -yi ".mainDictionary.$KeyName = \"$ValueName\"" testing.yaml`
As you can see I used `\"` around the value instead of just `"`, that is because you NEED double brackets for variable, but you also need it to prevent the quotes from closing
### Making comments:
Given a sample.yml file of:
```
a:
# comment on key
x: 3
y: 4
```
You can use this command to print/add comments
```
yq '.a.x | key | headComment' sample.yml
```
will output the head comment of the key above it:
```
comment on key
```
#yaml #commands/yq
-51
View File
@@ -1,51 +0,0 @@
___
# General
## [[Bash Notes]]
Notes that I've taken while learning about how the Bash (linux shell) language works
## [[Git commands]]
How to use git cli for fast coding (super useful)
___
# [[Robotics]]
### [Robotics Notes](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FRobotics%2FRobotics%20Notes>)
### [Robotics WIP](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FRobotics%2FRobotics%20WIP>)
### [Robotpy Components](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FRobotics%2FRobotpy%20Components>)
## Robotpy Installer Guides:
#### [How to setup Robotpy and Driver Station on Linux](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FRobotics%2FInstaller%20guides%2FHow%20to%20setup%20Robotpy%20and%20Driver%20Station%20on%20Linux>)
#### [How to setup Robotpy and Driver Station on Windows (Not complete)](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FRobotics%2FInstaller%20guides%2FHow%20to%20setup%20Robotpy%20and%20Driver%20Station%20on%20Windows%20(Not%20complete)>)
### [Github](https://github.com/AltaHighRobotics)
[![[github.png|150]]](https://github.com/AltaHighRobotics)
___
# [[LINUX]]
## [Ubuntu](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FUbuntu>)
- [Hanabi Wallpapers](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FHanabi%20Wallpaper%20Usage>)
- [Startup Apps](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FCustom%20Startup%20Programs>)
- [Ubuntu extensions](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2FUbuntu%20Add-ons>)
- [Plymouth config](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FUbuntu%2Fconfiguring%20plymouth>)
### [Copy from NAS](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FCopy%20from%20NAS>)
For copying/sending files to the NAS through cli using the `scp` command
### [Custom PATH commands](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FCustom%20PATH%20commands>)
A list of all the custom PATH commands I made for my linux system for customization and space saving
### [Ethernet Issues](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FEthernet%20issues>)
Can also be used for wifi issues, put notes here on how to use `nmcli`
### [Filesystems](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FFilesystems>)
Managing linux file systems with `fdisk` and `fallocate`
### [Flashing drives](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FFlashing%20drives>)
How to use the `dd` command
### [Hyprland Installation](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FInstalling%20hyprland%20commands>)
My process for installing hyprland, seems to only work for actual computers and not VMs
### [Linux auto-completion](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FLinux%20command%20auto-completion>)
How to add auto-completion for custom commands, using `/etc/bash_completion.d/` files
### [Making a linux logical volume](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FMaking%20a%20linux%20logical%20volume>)
How to make a LVM for linux, sort of the same thing as a windows "storage pool"
### [Resize LVM](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FResize%20LVM>)
How to modify existing LVMs
### [sed command in Linux](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2Fsed%20command%20in%20Linux>)
Some things that I learned while trying to use `sed` for my bash programs
### [YAML for Linux](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2FYAML%20for%20Linux>)
What I learned from using yaml with the community `yq` command when making my pizza-paper-YAML program in case I would use YAML in robotics
### [inotify events](<obsidian://open?vault=Obsidian%20Vault&file=Programming%2FLinux%2Finotify%20events>)
All `inotify` events and what they mean, used for my custom SIEM on my NAS
## ![[inotifywait breakdown.canvas|inotifywait breakdown]]
#Programming
@@ -1,68 +0,0 @@
Windows Version: [[How to setup Robotpy and Driver Station on Windows (Not complete)]]
___
## You should only need to follow this guide if you have already tried the robotpy-installer repository in the github
Here is the link to the github: (https://github.com/AltaHighRobotics/RobotpyInstallers)
Since you are on a linux machine, you will run the linux-robotpy-installer.sh
## If those installers did not work, this guide should help you
### Install Robotpy
Make sure your python is Python3.12, you can check by running:
```bash
python3 -V
```
You should see `Python3.12
If you do NOT HAVE PYTHON 3.12 you need to fix that, to install it, run:
```bash
sudo apt install python3.12
```
Go to your terminal and enter:
````bash
pip config set global.break-system-packages true
# Making sure it is the right version
python3 -m pip install robotpy==2024.3.2.2
# Will download the normal dependacies that you will need
python3 -m pip install robotpy['commands2', 'phoneix5']
pip config set global.break-system-packages false
````
This will prevent your system from flagging robotpy as a global enviornment package so that you can properly install it, you may also need to set break-system-packages for syncing your robotpy packages (we'll include it dw bbg <3 :3)
### There we go!
You now have robotpy and its dependacies installed, if your project requires extra dependancies, you can install them with:
python3 -m pip install robotpy[<PACKAGE_NAME>]`
### Install Driver Station (annoying)
If you would like to install a working linux version of FRC driver station as well (which should already be in the windows machines), you may be out of luck unless you are on arch linux apparently (I have ubuntu, my friend has arch but only his worked)
#### This is a rust version of driver station so it will install rust for you
To install, go to [this link](https://github.com/Redrield/Conductor) and follow it's instructions, unless if you just wanna run this code:
Installs nodejs and libraries needed for Conductor DS:
````bash
sudo apt-get install -y nodejs libudev-dev libx11-dev libxi-dev libpango1.0-dev libatk1.0-dev libsoup2.4-dev libgtk-3-dev libwebkit2gtk-4.0-dev
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
# This loads nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# This loads nvm bash_completion
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 14
nvm use 14
# Install Rust`
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install cargo-bundle
# Downloads Conductor driver station`
git clone https://github.com/Redrield/Conductor
cd Conductor
make setup && make release
````
#Robotics
@@ -1,41 +0,0 @@
Linux Version: [[How to setup Robotpy and Driver Station on Linux]]
___
## You should only need to follow this guide if you have already tried the robotpy-installer repository in the github
Here is the link to the github: (https://github.com/AltaHighRobotics/RobotpyInstallers)
Since you are on a windows machine you will run the win-robotpy-installer.py
### Robotpy Install
To install robotpy, you need to first make sure that you have a python**3.12** version, to download that, you can either look it up on Microsoft store or
Enter this [URL](https://www.python.org/ftp/python/3.12.3/python-3.12.3.exe) into your search bar:
`https://www.python.org/ftp/python/3.12.3/python-3.12.3.exe
This will automatically install the python3.12.3 installer, you will need to run this executable so that your system will register python3 commands
Open Command Prompt terminal or your VSCode project terminal
Enter this command into the terminal:
```Terminal
python3 -m pip install robotpy
python3 -m pip install robotpy-commands-v2
python3 -m pip install robotpy[phoenix5]
python3 -m pip install robotpy["commands2","phoenix5"]
```
### Powershell Robotpy Installer
To install robotpy exclusively through powershell (CMD), first make sure that you have python3.12 installed:
Go to your taskbar and search "CMD", this will bring up "command prompt"
#### OPEN IT AS AN ADMINISTRATOR
Once you've done that, install chocolatey by running:
````sql
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
````
That will allow us to install python3
```SQL
choco install -y python3
```
@@ -1,156 +0,0 @@
___
# Motors
## NEO brushless motor
![[Pasted image 20250313075024.png|100]]
## NEO 550 brushless (outside rotation)
![[Pasted image 20250313074727.png|100]]
## Talon 500 FX
![[Pasted image 20250313074756.png|100]]
##### Example code for subsystem:
```java
package frc.robot.subsystems;
import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.signals.NeutralModeValue;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants.PenetratorConstants;
public class PenetratorSubsystem extends SubsystemBase{
public enum MoveStyle {
INSERT,
PULLOUT,
STOP
}
private TalonFX motor;
public PenetratorSubsystem() {
super();
this.motor = new TalonFX(PenetratorConstants.MOTOR_ID);
// final double extension = this.motor.getPosition().getValue().magnitude();
// SmartDashboard.putNumber("Penetrator Extension", extension);
}
public void set(MoveStyle pegginType) {
switch (pegginType) {
case INSERT:
this.motor.set(-PenetratorConstants.MOTOR_INSERT_SPEED);
break;
case PULLOUT:
this.motor.set(PenetratorConstants.MOTOR_PULLOUT_SPEED);
break;
case STOP:
this.motor.set(0);
break;
}
}
}
```
## NEO Vortex
![[Pasted image 20250313074908.png|100]]
# Motor Controllers
## Spark max
![[Pasted image 20250313074830.png|100]]
Does not have a hard brake mode, can be configured using the REV configuration tool
### Example code:
#### Subsystem (for a brushless motor)
```java
package frc.robot.subsystems;
import com.revrobotics.spark.SparkMax;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants.SparkExampleConstants;
public class SparkExampleSubsystem extends SubsystemBase{
// Make an enum that can be used to easily read/make commands to this subsystem
public enum MoveStyle {
FORWARD,
BACKWARD,
STOP
}
// Create SparkMax object and grab encoder
private SparkMax motor;
private RelativeEncoder turnEncoder;
public SparkExampleSubsystem() {
super();
// Initialize motor controller
this.motor = new SparkMax(RimmerConstants.SPARK_MAX_ID, MotorType.kBrushless); // This part can be changed to use a brushed motor instead
// Get encoder information
final Rotation2d encoderRotation = this.getEncoder();
SmartDashboard.putNumber("Rimmer Encoder Extension", encoderRotation.getRadians());
}
public void set(MoveStyle MoveType) {
switch (MoveType) {
case FORWARD:
this.motor.set(-SparkExampleConstants.MOTOR_FORWARD_SPEED);
break;
case BACKWARD:
this.motor.set(SparkExampleConstants.MOTOR_BACKWARD_SPEED);
break;
case STOP:
this.motor.set(0);
break;
}
}
}
```
#### Command (makes the robot move forward)
```java
package frc.robot.commands.lift; // Change this to be the name of your folder this command is stored in
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.subsystems.SparkExampleSubsystem;
import frc.robot.subsystems.SparkExampleSubsystem.MoveStyle;
/** An example command that uses an example subsystem. */
public class SparkMoveForward extends Command {
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})
private final SparkExampleSubsystem subsystem;
/**
* Creates a new ExampleCommand.
*
* @param subsystem The subsystem used by this command.
*/
public SparkMoveForward(SparkExampleSubsystem subsystem) {
this.subsystem = subsystem;
addRequirements(subsystem);
}
/**
* We need to use full power to get the ball in but no:t to keep it
* So after a few seconds we lower the motor power
*/
@Override
public void execute() {
this.subsystem.set(MoveStyle.INSERT);
}
@Override
public void end(boolean interrupted) {
this.subsystem.set(MoveStyle.STOP);
}
}
```
@@ -1,62 +0,0 @@
___
## RoboRIO images
###### Create a compressed image file with a working image file
```bash
dd if=/dev/sdb | gzip > backup.img.gz
```
###### Flash a drive with compressed image file
```bash
cat backup.img.gz | gunzip | dd of=/dev/sdb
```
Example code for our purposes:
```bash
sudo dd if=/dev/sda status=progress bs=32M| gzip > arch_hyprland.img.gz
```
## Virtual Environment
Get into a virtual environment:
##### Windows:
Run in powershell:
```batch
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
```
Run in repository destination:
```
venv env
# Or if your python is weird:
python3 -m venv env
```
## NOT FINISHED
##### Linux:
Make sure that both `python3.12-venv` and `python3-pip` are installed beforehand
In the current directory
```bash
# Create virtual environment
python3 -m venv .env
# Enter virtual environment
source .env/bin/activate
```
Once you are in the virtual environment you are able to download any packages that you want and run the modules without any issue, BUT once you leave the environment (which can be seen in terminal as no longer having `(.env)` at the terminal entry line)
To get back into the virtual environment, you just run the same source command:
```bash
source .env/bin/activate
```
Which you may have to do each time you want to use that specific environment
#commands/source #commands/dd
-23
View File
@@ -1,23 +0,0 @@
___
## Making a web application
that can be accessed via browser to edit constants (such as speed and rotation) for real-time debugging.
Extras: Only show constants that the current robot has, Bookmark/Star specific constants that we are testing, prevent the constant change from going over max limits
ETHAN/DUNCAN
## Standardizing Robot commands/subsystems
So that we are able to copy files from other robot repositories without needing to completely configure it to the new robot: Plug-n-Play
Extras: When testing robots, check the constants to make sure that they are upper-case AND tell the programmer about it
NATHAN (me :3)
## Add a versatile motor PID system
Using enum so that the programmers are able to just specify the robot type (most likely in constants) so that the motors fit to the robot, prevents the issue where basic driving code doesn't work across different machines
Extras: Add good documentation or a system where in the case where we have a new type of robot that the enum can be easily edited to match that robot
SOMEONE IDK
-15
View File
@@ -1,15 +0,0 @@
___
### [Github](https://github.com/AltaHighRobotics)
[![[github.png|150]]](https://github.com/AltaHighRobotics)
### [[Robotics Notes]]
### [[Robotics WIP]]
### [[Robotpy Components]]
___
### Installer Guides:
#### [[How to setup Robotpy and Driver Station on Linux]]
#### [[How to setup Robotpy and Driver Station on Windows (Not complete)]]
![[altaroboticslogo.jpeg]]
#Robotics
@@ -1,85 +0,0 @@
___
# Required Parts
## robot.py
### Use:
The main program that will be run on the actual robot when the code is deployed to it, can be used to run robotContainer.py which has most of the infrastructure
### Path:
Main repository
### Connections:
#### Imports:
- commands2[^1]
- robotContainer.py[^2]
#### Deports to:
- NONE
## robotContainer.py
### Use:
Holds most of the robot's input commands, this is where you should put your controller commands to make the robot do stuff
### Path:
Main repository
### Connections:
#### Imports:
- wpilib[^1]
- constants[^2]
- subsystems[^2]
- commands[^2]
#### Deports:
- NONE
## constants.py
### Use:
Holds all the constants that are needed for the robot to follow,
### Path:
Main repository
### Connections:
#### Imports:
- NONE
#### Deports:
- robotContainer.py[^2]
- subsystems:[^2]
- aprilTagSubsystem.py
- driveSubsystem.py
## Subsystems folder
### Use:
For the different components that are being controlled by the robot, such as the driving motors being one subsystem, vision being another, and manipulators (arms/hands) being another
### Path:
Main repository
## Commands folder
### Use:
Will hold your commands for the robot that will be used to control how the robot acts, most commands are only linked with one button that controls the robot to do a single thing such as rotate robot arm or interact with apriltags
### Path:
Main repository
## Utilities folder
### Use:
For storing functions that will be used by subsystems to interact with other files (I think?), e.g. aprilTagSubsystem will use a utils file to interact with the driverSubsystem to drive it towards an apriltag
### Path:
Main Repository
___
# Additional Parts (not included)
## dance.py
### Use:
While the button input is being held, it will run on a timer to move forward and backward on a steady beat
### Path:
Main repository / commands
## sneke.py
### Use:
While the button input is being held, it will run on a timer to move forward while turning left and right like a snake
### Path:
Main repository / commands
## forward.py
### Use:
Will move the robot straight forward as long as the button input is being held
### Path:
Main repository / commands
## Footnotes
[^1]: Libraries that are automatically installed with `robotpy sync` or with the installers
[^2]: These imports are from libaries that you create and are not automatically installed with `robotpy sync`
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@@ -1,11 +0,0 @@
---
title: Projects
layout: home
nav_order: 2
---
# Projects
___
Here is where I will store a list of my projects that I work on.
## W.I.P.
until I have enough free time
-1
View File
@@ -1 +0,0 @@
penis
+97
View File
@@ -0,0 +1,97 @@
---
title: Gitea Runner Setup
layout: home
permalink: /server_info/gitea_runner_setup/
nav_exclude: true
search_enabled: true
---
# Setting up a gitea runner
___
### About
This guide will go through how to set up your own runner for gitea so that you are able to use gitea actions for your repository to run when certain flags trigger, such as when you push to gitea.
### Why
An example of how this might be useful is having a git repository that you want to have be ready to be packaged in a docker image automatically, so you include a Dockerfile in the repository and create a workflow action that triggers every time you push to a certain branch to make the docker image and push it to docker.io
## Installation
This can be downloaded on your main machine or server if you wish. The runner acts as a daemon that will run continually and will automatically check if a flag was hit to activate, so running it on a desktop PC shouldn't be an issue
### 1.
Download the latest gitea runner binary: https://dl.gitea.com/gitea-runner/3.5.0/
Quicklinks:
- [linux amd64](https://dl.gitea.com/gitea-runner/3.5.0/gitea-runner-3.5.0-linux-amd64)
- [windows amd64](https://dl.gitea.com/gitea-runner/3.5.0/gitea-runner-3.5.0-windows-amd64.exe)
___
### 2.
Create a runner repo token from gitea:
In the repository go to ***Settings > Actions > Runners***, and copy the runner token
https://gitea.happylizard.me/[OWNER]/[REPO]/settings/actions/runners
___
### 3.
Now with the binary that you downloaded, run this:
```
# Linux
./gitea-runner-3.5.0-linux-amd64 register --no-interactive --instance https://gitea.happylizard.me --token [TOKEN]
# Windows
./gitea-runner-3.5.0-windows-amd64.exe register --no-interactive --instance https://gitea.happylizard.me --token [TOKEN]
```
{: .new-title }
> Troubleshooting
>
> If you are not able to add this token, make sure that you have a gpg key that links to you that you can use to authenicate your token:
>
> gpg --generate-key
___
### 4.
Now that your runner is connected, run the daemon:
```
# Linux
./gitea-runner-3.5.0-linux-amd64 daemon
# Windows
./gitea-runner-3.5.0-windows-amd64.exe daemon
```
___
## Finish
Now that you have a runner that is automatically checking your repo, you can now use gitea actions to automatically run when you trigger a git flag
[Gitea's Example](https://docs.gitea.com/usage/actions/quickstart/#:~:text=name,job%2Estatus%20%7D%7D%2E%22):
```
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
```
+22
View File
@@ -0,0 +1,22 @@
---
title: Gitea Server News
layout: home
nav_order: 3
description: "Gitea News"
permalink: /server_news/gitea
parent: Server News
---
# Gitea Server News
A list of updates that I add when upgrading or adding things to gitea
---
## Latest update:
### 2026/9/15:
Gitea now supports repository agents for running workflows in the Actions tab of each repository
They currently use containerized "runners" that are specific to each repository and are to be run BY THE REPO OWNER, as they are currently not set up to be automatically made for each repo
To make a repo runner, here is [Gitea's own guide](https://docs.gitea.com/usage/actions/quickstart/), or you can use this quick guide: [Adding gitea runner](https://pizza2d1.github.io/server_info/gitea_runner_setup)
+52
View File
@@ -0,0 +1,52 @@
---
title: Server News
layout: home
nav_order: 2
description: "Where I will detail what I am doing with my website"
permalink: /server_news
has_toc: false
---
# Server News
[Links to website services!](https://pizza2d1.github.io/server_links){: .btn .fs-5 .mb-4 .mb-md-0 .btn-purple }
[Check out my other projects!](https://github.com/pizza2d1){: .btn .fs-5 .mb-4 .mb-md-0 .btn-green }
[Table of Contents](#table-of-contents){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
---
{: .warning }
> This part of the webpage is still continuing to be worked on, so there might be some broken links here and there, as Jekyll is not very intuiative
{: .new-title }
> Quick Note
>
> If the website is down it is totally fine to contact me to let me know. I plan on having my services be used by more people in the future once I get a proper setup and would like to know how to fix issues that arise early in the server-management side of hobbies, which means quickly snuffing out issues
### Contact me!
[![LinkedIn Logo](../../assets/images/linkedin.png){: width="20" }](https://www.linkedin.com/in/pizza2d1/)
[LinkedIn](https://www.linkedin.com/in/pizza2d1/)
[![Discord Logo](../../assets/images/discord.png){: width="20" }](https://discordapp.com/users/714918826831118436)
[Discord](https://discordapp.com/users/714918826831118436)
[![Github Logo](../../assets/images/github.png){: width="20" }](https://github.com/pizza2d1)
[Github](https://github.com/pizza2d1)
[![Signal Logo](../../assets/images/signal.png){: width="20" }](https://signal.me/#eu/14nA-tBiLDlv3Z1DzDlmNSd_hpqwEk2EcjhmY0uWcjbTAQWx9NZGiJfkVOkMR4mS)
[Signal](https://signal.me/#eu/14nA-tBiLDlv3Z1DzDlmNSd_hpqwEk2EcjhmY0uWcjbTAQWx9NZGiJfkVOkMR4mS)
I currently don't really have an easy way to update this quite yet, since I am mostly just using the Jekyll markdown files for editing these, but eventually I will try and have it work the same way that I previously had with my RSS feed where I can just type into a new text file, run a command and have it published to the website all formatted and pretty
___
## <u>Table of contents</u>
### - **[Website News]({% link src/server_news/website/index.md %})**
### - **[Gitea News]({% link src/server_news/gitea/index.md %})**
### - **[Jellyfin News]({% link src/server_news/jellyfin/index.md %})**
### - **[Rstack News]({% link src/server_news/rstack/index.md %})**
### - **[Server Links]({% link src/server_news/links/index.md %})**
+17
View File
@@ -0,0 +1,17 @@
---
title: Jellyfin Server News
layout: home
nav_order: 3
description: "Jellyfin News"
permalink: /server_news/jellyfin
parent: Server News
---
# Jellyfin Server News
A list of updates that I add when upgrading or adding things to Jellyfin
---
### Latest update:
None (this page is still new)
+65
View File
@@ -0,0 +1,65 @@
---
title: Server Links
layout: home
nav_order: 3
permalink: /server_links
parent: Server News
---
# Server Links
Where I will try to keep an up to date list of services that you can use on my server
---
{: .warning }
> Some of these links or services may not work, as being a server admin is very time consuming I guess and I keep trying to add stuff which breaks other things
# Media streaming:
## [Jellyfin](https://jellyfin.happylizard.me) [![Jellyfin Logo](../../../assets/images/jellyfin.png){: width="25" }](https://jellyfin.happylizard.me)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=https%3A%2F%2Fjellyfin.happylizard.me)](https://jellyfin.happylizard.me)
[Official Jellyfin Website](https://jellyfin.org/)
# File server:
## [Copyparty 🎊](https://copyparty.happylizard.me)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=https%3A%2F%2Fcopyparty.happylizard.me)](https://copyparty.happylizard.me)
[Copyparty Github](https://github.com/9001/copyparty)
# Git repositories:
## [Gitea](https://gitea.happylizard.me) [![Gitea Logo](../../../assets/images/gitea.png){: width="25" }](https://gitea.happylizard.me)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=https%3A%2F%2Fgitea.happylizard.me)](https://gitea.happylizard.me)
[Official Gitea Website](https://about.gitea.com/)
# Rstack (trusted only):
## [Radarr](https://radarr.teto.beer) [![Radarr Logo](../../../assets/images/radarr.png){: width="25" }](https://radarr.teto.beer)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=http%3A%2F%2Fradarr.teto.beer)](https://radarr.teto.beer)
## [Sonarr](https://sonarr.teto.beer) [![Sonarr Logo](../../../assets/images/sonarr.png){: width="25" }](https://sonarr.teto.beer)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=http%3A%2F%2Fsonarr.teto.beer)](https://sonarr.teto.beer)
## [Lidarr](https://lidarr.teto.beer) [![Lidarr Logo](../../../assets/images/lidarr.png){: width="25" }](https://lidarr.teto.beer)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=http%3A%2F%2Flidarr.teto.beer)](https://lidarr.teto.beer)
## [qBittorrent Client](https://torrent.teto.beer) [![torrent.Logo](../../../assets/images/qbittorrent.png){: width="25" }](https://torrent.teto.beer)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=http%3A%2F%2Ftorrent.teto.beer)](https://torrent.teto.beer)
# Others:
## [Portal Runner Converter](https://convert.happylizard.me)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=http%3A%2F%2Fconvert.happylizard.me)](https://convert.happylizard.me)
[Youtube Video](https://youtu.be/btUbcsTbVA8) [Github](https://github.com/p2r3/convert)
## [Happy Ripper](https://ethanis.gay)
[![a](https://img.shields.io/website?down_color=red&down_message=offline&style=plastic&up_color=green&up_message=up&label=Site%20Status&url=https%3A%2F%2Fethanis.gay)](https://ethanis.gay)
{: .new-title }
> Quick Note
>
> Not all these services are publicly usable, as they require a level of trust, if you want to get access to some of these services, just make sure to contact me first
## Contact Links:
[![Discord Logo](https://static.vecteezy.com/system/resources/previews/006/892/625/non_2x/discord-logo-icon-editorial-free-vector.jpg){: width="20" }](https://discordapp.com/users/714918826831118436)
[Discord](https://discordapp.com/users/714918826831118436)
[![Signal Logo](https://thumb.wikimedia.org/wikipedia/commons/thumb/6/60/Signal-Logo-Ultramarine_%282024%29.svg/1280px-Signal-Logo-Ultramarine_%282024%29.svg.png?utm_source=en.wikipedia.org&utm_campaign=imageinfo&utm_content=thumbnail){: width="20" }](https://signal.me/#eu/14nA-tBiLDlv3Z1DzDlmNSd_hpqwEk2EcjhmY0uWcjbTAQWx9NZGiJfkVOkMR4mS)
[Signal](https://signal.me/#eu/14nA-tBiLDlv3Z1DzDlmNSd_hpqwEk2EcjhmY0uWcjbTAQWx9NZGiJfkVOkMR4mS)
+17
View File
@@ -0,0 +1,17 @@
---
title: Rstack Server News
layout: home
nav_order: 3
description: "Rstack News"
permalink: /server_news/rstack
parent: Server News
---
# Rstack Server News
A list of updates that I add when upgrading or adding things to the torrenting rstack (Radarr, Sonarr, Lidarr, and such)
---
### Latest update:
None (this page is still new)
+17
View File
@@ -0,0 +1,17 @@
---
title: Website Server News
layout: home
nav_order: 3
description: "Website News"
permalink: /server_news/website
parent: Server News
---
# Website Server News
A list of updates that I add when upgrading or adding things to the front-facing website
---
### Latest update:
None (this page is still new)