mirror of
https://github.com/cliffe/HacktivityLabSheets.git
synced 2026-02-20 13:50:46 +00:00
Update lab sheets and enhance highlighting functionality
- Modified permalink structure in the configuration to include category in lab URLs. - Added author and license metadata to lab sheets for better attribution and clarity. - Introduced a comprehensive highlighting guide for AI assistants to standardize lab sheet formatting. - Enhanced JavaScript functionality to support multiple highlight types and improved table of contents generation. - Updated styles for various highlight types to improve visual distinction in lab content. - Added a new logo for branding consistency across the site.
This commit is contained in:
@@ -16,7 +16,7 @@ highlighter: rouge
|
||||
collections:
|
||||
labs:
|
||||
output: true
|
||||
permalink: /:collection/:name/
|
||||
permalink: /:collection/:category/:name/
|
||||
|
||||
# Default settings for lab posts
|
||||
defaults:
|
||||
|
||||
406
_labs/example_highlighting_guide.md
Normal file
406
_labs/example_highlighting_guide.md
Normal file
@@ -0,0 +1,406 @@
|
||||
---
|
||||
title: "Lab Sheet Highlighting Guide (AI Instructions)"
|
||||
author: "AI Assistant"
|
||||
license: "CC BY-SA 4.0"
|
||||
description: "A comprehensive guide for AI assistants on how to properly highlight lab sheets using the new highlighting system. This guide contains examples and instructions for converting plain text lab sheets into properly highlighted versions."
|
||||
difficulty: "AI Guide"
|
||||
duration: "Reference"
|
||||
prerequisites: "Understanding of Markdown and the highlighting system"
|
||||
tags: ["ai-guide", "highlighting", "lab-formatting", "documentation"]
|
||||
categories: ["documentation"]
|
||||
type: ["guide", "reference"]
|
||||
---
|
||||
|
||||
# Sheet Highlighting Guide (AI Instructions)
|
||||
|
||||
This guide provides comprehensive instructions for AI assistants on how to properly highlight lab sheets using the new highlighting system. Follow these patterns and examples when editing any lab sheet.
|
||||
|
||||
## 🎯 Overview
|
||||
|
||||
The highlighting system supports two main types of highlighting:
|
||||
1. **Inline highlights** - for short phrases within sentences
|
||||
2. **Block highlights** - for standalone action items, tips, warnings, and notes
|
||||
|
||||
## 📝 Inline Highlighting Syntax
|
||||
|
||||
### Basic Format
|
||||
Use `==type: content==` where `type` is one of: `action`, `tip`, `hint`, `warning`, `VM`
|
||||
|
||||
### Examples
|
||||
|
||||
**Action Highlights:**
|
||||
```markdown
|
||||
==action: Open a terminal window==
|
||||
==action: Run the command sudo apt update==
|
||||
==action: Navigate to the /home directory==
|
||||
```
|
||||
|
||||
**Tip Highlights:**
|
||||
```markdown
|
||||
==tip: Use Tab for auto-completion==
|
||||
==tip: Press Ctrl+C to cancel a running command==
|
||||
==tip: Use the up arrow to repeat previous commands==
|
||||
```
|
||||
|
||||
**Hint Highlights:**
|
||||
```markdown
|
||||
==hint: The flag is hidden in the /home/victim directory==
|
||||
==hint: Try using the sudo command to access restricted files==
|
||||
==hint: The password might be in the common passwords list==
|
||||
```
|
||||
|
||||
**Warning Highlights:**
|
||||
```markdown
|
||||
==warning: This command will delete files permanently==
|
||||
==warning: Only run this in a test environment==
|
||||
==warning: This may trigger antivirus software==
|
||||
```
|
||||
|
||||
**VM Highlights:**
|
||||
```markdown
|
||||
==VM: On Kali==
|
||||
==VM: On Windows==
|
||||
==VM: On Ubuntu==
|
||||
==VM: Interact with the Desktop VM==
|
||||
==VM: Switch to the target VM==
|
||||
==VM: On the Windows target machine==
|
||||
```
|
||||
|
||||
## 📦 Block-Level Highlighting Syntax
|
||||
|
||||
### Basic Format
|
||||
Use `> Type: content` where `Type` is one of: `Action`, `Tip`, `Warning`, `Hint`, `Note`
|
||||
|
||||
### Examples
|
||||
|
||||
**Action Blocks:**
|
||||
> Action: Open a terminal and navigate to your home directory. Create a new folder called "lab_exercise" and change into it.
|
||||
|
||||
> Action: Download the required files using wget. Verify the download completed successfully by listing the directory contents.
|
||||
|
||||
**Tip Blocks:**
|
||||
> Tip: If you encounter permission errors, try using sudo before the command. Be careful with sudo as it gives you administrative privileges.
|
||||
|
||||
> Tip: You can use the history command to see all previously executed commands. Use the up and down arrows to navigate through command history.
|
||||
|
||||
**Warning Blocks:**
|
||||
> Warning: This lab involves using security tools that may be detected as malicious software. Ensure you're working in an isolated environment and consider disabling real-time antivirus protection temporarily.
|
||||
|
||||
> Warning: The commands in this section will modify system files. Make sure you understand what each command does before executing it.
|
||||
|
||||
**Hint Blocks:**
|
||||
> Hint: The flag is located in a hidden file in the victim's home directory. Look for files starting with a dot.
|
||||
|
||||
> Hint: The password for the victim account is one of the most common passwords. Try the rockyou.txt wordlist.
|
||||
|
||||
**Note Blocks:**
|
||||
> Note: If you get an error, try running it with sudo. The output may vary depending on your system configuration.
|
||||
|
||||
> Note: This command lists all processes running on the system. The "aux" flags provide detailed information about each process.
|
||||
|
||||
## 🤖 AI Instructions for Lab Sheet Editing
|
||||
|
||||
### Step 1: Identify Action Items
|
||||
Look for sentences that describe actions students need to perform:
|
||||
- Commands to run
|
||||
- Steps to follow
|
||||
- Tasks to complete
|
||||
- Procedures to execute
|
||||
|
||||
**Convert to:** `==action: [action description]==` for inline actions or `> Action: [detailed action]==` for block-level actions
|
||||
|
||||
### Step 2: Identify Tips and Helpful Information
|
||||
Look for:
|
||||
- Helpful hints
|
||||
- Time-saving suggestions
|
||||
- Best practices
|
||||
- Shortcuts or tricks
|
||||
|
||||
**Convert to:** `==tip: [tip content]==` for inline tips or `> Tip: [detailed tip]==` for block-level tips
|
||||
|
||||
### Step 3: Identify Important Hints
|
||||
Look for:
|
||||
- Clues that point towards challenge answers
|
||||
- Direction on where to find flags or solutions
|
||||
- Guidance on which tools or techniques to use
|
||||
- Hints about passwords, file locations, or attack vectors
|
||||
|
||||
**Convert to:** `==hint: [hint content]==` for inline hints or `> Hint: [detailed hint]==` for block-level hints
|
||||
|
||||
### Step 4: Identify Warnings
|
||||
Look for:
|
||||
- Potential dangers
|
||||
- Security considerations
|
||||
- Destructive operations
|
||||
- Important cautions
|
||||
|
||||
**Convert to:** `==warning: [warning content]==` for inline warnings or `> Warning: [detailed warning]==` for block-level warnings
|
||||
|
||||
### Step 5: Identify VM/Environment Context
|
||||
Look for:
|
||||
- VM interaction instructions (e.g., "Interact with the Desktop VM")
|
||||
- VM switching instructions (e.g., "Switch to the target VM")
|
||||
|
||||
**Convert to:** `==VM: [environment name or interaction]==` for inline VM references
|
||||
|
||||
**Examples:**
|
||||
- "On Kali" → `==VM: On Kali==`
|
||||
- "Interact with the Desktop VM" → `==VM: Interact with the Desktop VM==`
|
||||
- "Switch to the Windows target" → `==VM: Switch to the Windows target==`
|
||||
### Step 6: Identify Troubleshooting and Brief Explanations
|
||||
Look for:
|
||||
- Troubleshooting information that directly follows commands
|
||||
- Brief explanations of what commands do that directly follows commands
|
||||
- Additional context about command output
|
||||
- Clarifications about expected results
|
||||
|
||||
**Convert to:** `> Note: [troubleshooting or explanation content]` for block-level notes
|
||||
|
||||
|
||||
## 📋 Conversion Examples
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
Open a terminal window. Navigate to your home directory using the cd command. Create a new directory called "security_lab" and change into it. Be careful not to delete any existing files.
|
||||
```
|
||||
|
||||
### After (Highlighted):
|
||||
```
|
||||
==action: Open a terminal window==. ==action: Navigate to your home directory using the cd command==. ==action: Create a new directory called "security_lab" and change into it==. ==warning: Be careful not to delete any existing files==.
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
On Kali, open a terminal and run the following commands. Make sure you're connected to the lab network.
|
||||
```
|
||||
|
||||
### After (Highlighted):
|
||||
```
|
||||
==VM: On Kali==, ==action: open a terminal and run the following commands==. ==hint: Make sure you're connected to the lab network==.
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
Interact with the Desktop VM. Click the icon after the VMs have started. Then switch to the target VM and run the scan.
|
||||
```
|
||||
|
||||
### After (Highlighted):
|
||||
```
|
||||
==VM: Interact with the Desktop VM==. ==action: Click the icon after the VMs have started==. Then ==VM: switch to the target VM== and ==action: run the scan==.
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
If you get lost in the file system, you can always return to your home directory by typing "cd" without any arguments. This is a useful shortcut to remember.
|
||||
```
|
||||
|
||||
### After (Highlighted):
|
||||
```
|
||||
==tip: If you get lost in the file system, you can always return to your home directory by typing "cd" without any arguments==. This is a useful shortcut to remember.
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
This lab requires root access to modify system files. Make sure you understand the implications of running commands with elevated privileges.
|
||||
```
|
||||
|
||||
### After (Highlighted):
|
||||
```
|
||||
> Hint: This lab requires root access to modify system files.
|
||||
|
||||
> Warning: Make sure you understand the implications of running commands with elevated privileges.
|
||||
```
|
||||
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
Interact with the Desktop VM. (Click ![][image2] after the VMs have started).
|
||||
```
|
||||
### After (Highlighted):
|
||||
```
|
||||
==VM: Interact with the Desktop VM==. (Click ![][image2] after the VMs have started).
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
On the Kali VM:
|
||||
```
|
||||
### After (Highlighted):
|
||||
```
|
||||
==VM: On the Kali VM:==
|
||||
```
|
||||
|
||||
### Before (Plain Text):
|
||||
```
|
||||
From the command line run:
|
||||
|
||||
```bash
|
||||
whoami
|
||||
```
|
||||
```
|
||||
### After (Highlighted):
|
||||
```
|
||||
From the command line ==action: run:==
|
||||
|
||||
```bash
|
||||
whoami
|
||||
```
|
||||
```
|
||||
### Before (Plain Text):
|
||||
```
|
||||
Note, this is lowercase “LS”.
|
||||
```
|
||||
### After (Highlighted):
|
||||
```
|
||||
> Note: this is lowercase “LS”.
|
||||
```
|
||||
|
||||
## 🎨 Visual Results
|
||||
|
||||
When properly highlighted, the content will display as:
|
||||
|
||||
- **Action highlights**: Blue background with ⚡ icon
|
||||
- **Tip highlights**: Purple background with 💡 icon
|
||||
- **Hint highlights**: Green background with 💭 icon
|
||||
- **Warning highlights**: Orange background with ⚠️ icon
|
||||
- **VM highlights**: Light blue background with 🖥️ icon
|
||||
|
||||
Block-level highlights will appear as styled boxes with appropriate colors and icons:
|
||||
- **Note blocks**: Light gray background with 📝 icon (for troubleshooting and explanations)
|
||||
|
||||
## ✅ Quality Checklist
|
||||
|
||||
Before finalizing a lab sheet, ensure:
|
||||
|
||||
1. **All action items are highlighted** - Every step students need to perform
|
||||
2. **Tips are properly marked** - Helpful information that saves time or provides shortcuts
|
||||
3. **Important hints are highlighted** - Critical information students need to know
|
||||
4. **Warnings are clearly marked** - Any potential dangers or important cautions
|
||||
5. **VM/Environment context is marked** - Clear indication of which system/VM to use
|
||||
6. **Consistency** - Use the same highlighting style throughout the document
|
||||
7. **Appropriate level** - Don't over-highlight; only highlight truly important information
|
||||
8. **TOC links are working** - Check that all headings in the Table of Contents have proper markdown links that work correctly
|
||||
|
||||
## 🔄 Process Summary
|
||||
|
||||
1. **Read through the entire lab sheet**
|
||||
2. **Check TOC links** - Verify all headings in the Table of Contents have proper markdown anchor links
|
||||
3. **Identify each type of content** (actions, tips, hints, warnings, VM context, troubleshooting/explanations)
|
||||
4. **Apply appropriate highlighting syntax**
|
||||
5. **Review for consistency and completeness**
|
||||
6. **Test the highlighting** by viewing the rendered page
|
||||
|
||||
## 📚 Additional Notes
|
||||
|
||||
- **Preserve original content**: Only add highlighting, don't change the actual text
|
||||
- **Maintain readability**: Don't over-highlight; use highlighting to enhance, not overwhelm
|
||||
- **Be consistent**: Use the same patterns throughout the document
|
||||
- **Consider context**: Some content might be both an action and a tip - choose the most appropriate type
|
||||
- **Test thoroughly**: Always verify the highlighting works correctly in the browser
|
||||
|
||||
## ⚠️ When NOT to Use Highlighting
|
||||
|
||||
**Important**: Don't overuse highlighting tags. Most lab sheet content should remain unhighlighted.
|
||||
|
||||
### ❌ Don't Highlight:
|
||||
- **Regular explanatory text** - Most sentences that simply explain what students are doing
|
||||
- **Standard instructions** - Common commands or procedures that are part of normal lab flow
|
||||
- **Descriptive content** - Text that describes concepts, tools, or background information
|
||||
|
||||
### ✅ Do Highlight:
|
||||
- **Critical actions** - Steps that are essential for lab completion
|
||||
- **Important warnings** - Safety concerns or potential problems
|
||||
- **Helpful tips** - Time-saving shortcuts or useful techniques
|
||||
- **Key hints** - Important information students must remember
|
||||
- **VM context** - Clear indication of which system to use
|
||||
|
||||
|
||||
|
||||
|
||||
## 🔧 Additional Processing Instructions
|
||||
|
||||
### Table of Contents (TOC) Verification
|
||||
|
||||
When processing lab sheets, always verify the Table of Contents:
|
||||
|
||||
1. Remove any TOC/Contents section that is hardcoded, these are added automatically based on headers
|
||||
```markdown
|
||||
[Section Name](#anchor-link)
|
||||
```
|
||||
|
||||
2. **Verify Anchor Links**: Confirm that each heading in the document has a correct anchor:
|
||||
```markdown
|
||||
### Section Name {#anchor-link}
|
||||
```
|
||||
|
||||
3. **Common TOC Issues to Fix**:
|
||||
- Missing anchor IDs in headings
|
||||
- Incorrect anchor formatting (spaces, special characters -- remove any brackets() and slashes from within anchors)
|
||||
|
||||
### Pre-Processing Checklist
|
||||
|
||||
Before applying highlighting to any lab sheet:
|
||||
|
||||
- [ ] **Read the entire document** to understand the structure and flow
|
||||
- [ ] **Check TOC completeness** - ensure all major sections are listed
|
||||
- [ ] **Verify heading hierarchy** - confirm proper use of #, ##, ###, etc.
|
||||
- [ ] **Test all existing links** - both internal TOC links and external URLs
|
||||
- [ ] **Identify content types** - map out where actions, tips, hints, warnings, VM context, and troubleshooting/explanations appear
|
||||
- [ ] **Identify troubleshooting text** - find text that provides troubleshooting information after commands and format as note blocks
|
||||
- [ ] **Plan highlighting strategy** - decide which content truly needs highlighting
|
||||
|
||||
### Post-Processing Verification
|
||||
|
||||
After applying highlighting:
|
||||
|
||||
- [ ] **Validate markdown syntax** - confirm no syntax errors were introduced
|
||||
- [ ] **Review consistency** - ensure similar content uses similar highlighting
|
||||
- [ ] **Test in browser** - view the rendered page to confirm everything displays properly
|
||||
|
||||
### Troubleshooting Text Formatting
|
||||
|
||||
When instructions are followed by troubleshooting information about the command that was just run, format the troubleshooting text as a note block:
|
||||
|
||||
**Before:**
|
||||
```markdown
|
||||
Run this command:
|
||||
```bash
|
||||
ls -la
|
||||
```
|
||||
If you get an error, try running it with sudo. The output may vary depending on your system configuration.
|
||||
```
|
||||
|
||||
**After:**
|
||||
```markdown
|
||||
Run this command:
|
||||
```bash
|
||||
ls -la
|
||||
```
|
||||
> Note: If you get an error, try running it with sudo. The output may vary depending on your system configuration.
|
||||
```
|
||||
|
||||
**Rule**: Any brief explanation and any troubleshooting text that directly follows a command instruction should be formatted as a note block using `> Note:` to visually separate the explanation/troubleshooting information from the instruction.
|
||||
|
||||
### Common Processing Errors to Avoid
|
||||
|
||||
1. **Over-highlighting**: Don't highlight every instruction - focus on critical actions only
|
||||
2. **Breaking TOC links**: Be careful not to modify heading text that affects anchor links
|
||||
3. **Inconsistent formatting**: Use the same highlighting patterns throughout the document
|
||||
4. **Missing VM context**: Always highlight when switching between different VMs or systems
|
||||
5. **Ignoring warnings**: Ensure all safety warnings and important cautions are highlighted
|
||||
6. **Poor tip placement**: Tips should be genuinely helpful, not obvious information
|
||||
7. **Missing troubleshooting formatting**: Don't forget to format troubleshooting text after commands as note blocks
|
||||
|
||||
### File Structure Requirements
|
||||
|
||||
Ensure lab sheets maintain proper structure:
|
||||
|
||||
- **YAML front matter** with all required fields (title, author, description, etc.)
|
||||
- **Proper heading hierarchy** (h1 for title, h2 for main sections, h3 for subsections)
|
||||
- **Working TOC** with functional anchor links
|
||||
- **Consistent code block formatting** using proper language tags
|
||||
- **Valid markdown syntax** throughout the document
|
||||
|
||||
---
|
||||
|
||||
*This guide should be used as a reference when editing any lab sheet to ensure consistent and effective use of the highlighting system.*
|
||||
@@ -1,10 +1,12 @@
|
||||
---
|
||||
title: "Introduction to Linux and Security"
|
||||
author: "Z. Cliffe Schreuders"
|
||||
license: "CC BY-SA 4.0"
|
||||
description: "Learn Linux fundamentals and security tools, including command-line operations, file system navigation, SSH, and basic penetration testing with Kali Linux."
|
||||
difficulty: "Beginner"
|
||||
duration: "90 minutes"
|
||||
prerequisites: "Basic computer skills"
|
||||
overview: |
|
||||
In this lab, you will delve into Linux and security tools, gaining practical knowledge and skills that are highly relevant in the field of cyber security. Linux is a powerful and versatile operating system widely used in the IT industry. Understanding Linux and its command-line interface is crucial for anyone interested in security testing and ethical hacking. You'll begin by familiarizing yourself with Linux basics, from fundamental command-line operations to concepts like piping between programs and file redirection. This lab will also introduce you to the Kali Linux distribution, a platform designed for penetration testing and ethical hacking.
|
||||
|
||||
Throughout this lab, you will learn how to perform various tasks, such as creating and manipulating files, exploring the Linux file system, and conducting network-related activities. You will gain hands-on experience with SSH, a secure remote shell protocol used for administration, and even attempt online brute force attacks to understand the importance of security in the digital realm. By the end of this lab, you will have honed your Linux command-line skills, developed a basic understanding of networking, and practiced using essential security tools, preparing you for more advanced challenges in the field of cyber security.
|
||||
tags: ["linux", "command-line", "ssh", "kali", "networking", "security"]
|
||||
category: "introducing_attacks"
|
||||
lab_sheet_url: "https://docs.google.com/document/d/1vA_Ev_GPqPg3cGZblgVclWmTU-sUEEBqwYpFH09mQjg/edit?usp=sharing"
|
||||
@@ -20,104 +22,48 @@ cybok:
|
||||
keywords: ["PENETRATION TESTING - SOFTWARE TOOLS"]
|
||||
---
|
||||
|
||||
# Introduction to Linux and security tools
|
||||
## General notes about the labs
|
||||
|
||||
### License {#preparation-and-logging-in}
|
||||
|
||||
![][image1]
|
||||
|
||||
This work by [Z. Cliffe Schreuders](http://z.cliffe.schreuders.org) at Leeds Beckett University is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/deed.en_GB).
|
||||
|
||||
<div class="action-item">
|
||||
### ⚡ Lab Setup Required
|
||||
Before starting this lab, ensure you have:
|
||||
- A ==Linux virtual machine== or system with ==root access==
|
||||
- Internet connectivity for downloading tools
|
||||
- At least ==2GB of available disk space==
|
||||
</div>
|
||||
|
||||
<div class="warning-item">
|
||||
### ⚠️ Important Notice
|
||||
This lab involves using security tools that could be detected as malicious by antivirus software. Work in an isolated environment and disable real-time protection if necessary.
|
||||
</div>
|
||||
|
||||
### Contents {#preparation-and-logging-in}
|
||||
|
||||
[License](#preparation-and-logging-in)
|
||||
|
||||
[Contents](#preparation-and-logging-in)
|
||||
|
||||
[General notes about the labs](#heading)
|
||||
|
||||
[Preparation and logging in](#preparation-and-logging-in)
|
||||
|
||||
[Familiarisation with the environment](#familiarisation-with-the-environment)
|
||||
|
||||
[Basic Linux command skills](#basic-linux-command-skills)
|
||||
|
||||
[Getting unstuck](#getting-unstuck)
|
||||
|
||||
[VI](#vi)
|
||||
|
||||
[Piping between programs](#piping-between-programs)
|
||||
|
||||
[Redirecting to/from files](#redirecting-to/from-files)
|
||||
|
||||
[Basic Linux networking](#basic-linux-networking)
|
||||
|
||||
[Virtualisation and our use of virtual machines (VMs)](#virtualisation-and-our-use-of-virtual-machines-\(vms\))
|
||||
|
||||
[A note about working from home](#a-note-about-working-from-home)
|
||||
|
||||
[Introduction to Kali Linux](#introduction-to-kali-linux)
|
||||
|
||||
[Remote shell access and SSH](#remote-shell-access-and-ssh)
|
||||
|
||||
[Hacking SSH via online bruteforce attacks](#hacking-ssh-via-online-bruteforce-attacks)
|
||||
|
||||
[Conclusion](#conclusion)
|
||||
|
||||
### {#heading}
|
||||
|
||||
### General notes about the labs
|
||||
|
||||
==Many of the tasks== you complete within our labs could be considered illegal if targeted at a computer that you do not have explicit permission to interact with, do security tests on, and attack. In short, keep all activity contained to our labs and to computers you have legal permission to attack[^1]. Use common sense, and act within the law, ethically, and according to your own morals. With power comes responsibility, use it wisely.
|
||||
Many of the tasks you complete within our labs could be considered illegal if targeted at a computer that you do not have explicit permission to interact with, do security tests on, and attack. In short, keep all activity contained to our labs and to computers you have legal permission to attack[^1]. Use common sense, and act within the law, ethically, and according to your own morals. With power comes responsibility, use it wisely.
|
||||
|
||||
One of the interesting and inevitable things about working with security attacks, is that because we are often intentionally “breaking” things and making them misbehave for our own intentions, sometimes things do not go exactly according to plan, software may crash or behave erratically. This adds to the challenge, and may require some troubleshooting.
|
||||
|
||||
The labs are written to be informative and, in order to aid clarity, instructions that you should actually execute are generally written in this colour. Note that all lab content is assessable for the module, but the ==colour coding may help you skip to the “next thing to *do*”==, but make sure you dedicate time to read and understand everything. Coloured instructions in ==*italics*== indicates you need to change the instructions based on your environment: for example, using your own IP address.
|
||||
The labs are written to be informative and, in order to aid clarity, instructions that you should actually execute are generally written in this colour. Note that all lab content is assessable for the module, but the ==action: colour coding may help you skip to the “next thing to *do*”==, but make sure you dedicate time to read and understand everything. Coloured instructions in ==action: *italics*== indicates you need to change the instructions based on your environment: for example, using your own IP address.
|
||||
|
||||
Often the lab instructions are intentionally open ended, and you will have to figure some things out for yourselves. This module is designed to be challenging, as well as fun\!
|
||||
|
||||
However, we aim to provide a well planned and fluent experience. If you notice any mistakes in the lab instructions or you feel some important information is missing, please let us know and we will try to address any issues.
|
||||
|
||||
### Preparation and logging in {#preparation-and-logging-in}
|
||||
## Preparation and logging in {#preparation-and-logging-in}
|
||||
|
||||
[**Click here to read through a guide to using Hacktivity.**](https://docs.google.com/document/d/17d5nUx2OtnvkgBcCQcNZhZ8TJBO94GMKF4CHBy1VPjg/edit?usp=sharing)
|
||||
|
||||
This includes some important information about how to use the lab environment and how to troubleshoot during lab exercises. Read through this now before continuing.
|
||||
|
||||
For all of the labs in this module, start by logging into Hacktivity.
|
||||
> Action: For all of the labs in this module, start by logging into Hacktivity.
|
||||
> Sign up for the module, claim a set of VMs for lab 1, and start your VMs.
|
||||
|
||||
Sign up for the module, claim a set of VMs for lab 1, and start your VMs.
|
||||
==VM: Interact with the Desktop VM==. (Click ![][image2] after the VMs have started).
|
||||
|
||||
Interact with the Desktop VM. (Click ![][image2] after the VMs have started).
|
||||
> Note: Note that a command shell will open automatically, and a username has been randomly generated for you.
|
||||
|
||||
Note that a command shell will open automatically, and a username has been randomly generated for you. *To adjust the size of the terminal text, you can press “Ctrl”, “Shift” and “+” to increase it, or “Ctrl” and “-” to decrease it.*
|
||||
> Tip: To adjust the size of the terminal text, you can press "Ctrl", "Shift" and "+" to increase it, or "Ctrl" and "-" to decrease it.
|
||||
|
||||
From the command line run:
|
||||
==action: From the command line run:==
|
||||
|
||||
```whoami```
|
||||
```bash
|
||||
whoami
|
||||
```
|
||||
|
||||
Your password is “tiaspbiqe2r” (**t**his **i**s **a** **s**ecure **p**assword **b**ut **i**s **q**uite **e**asy **2** **r**emember).
|
||||
Your password is "tiaspbiqe2r" (**t**his **i**s **a** **s**ecure **p**assword **b**ut **i**s **q**uite **e**asy **2** **r**emember).
|
||||
|
||||
*Note that you don’t (yet) have root (superuser / admin) access to this desktop VM.*
|
||||
> Note: You don't (yet 😉) have root (superuser / admin) access to this desktop VM.
|
||||
|
||||
In any case, never log in to the desktop environment using the root account \-- that is bad practice, and should always be avoided[^2].
|
||||
|
||||
*Tip: Don’t waste time typing out the full commands and directory / file names \- pressing the “Tab” key will autocomplete words, as long as nothing else starts with those letters (if it does, try typing a few more before pressing “Tab”). Try it now \- type “whoa” then press “Tab”. You should see the previous command complete itself.*
|
||||
> Tip: Don't waste time typing out the full commands and directory / file names - pressing the "Tab" key will autocomplete words, as long as nothing else starts with those letters (if it does, try typing a few more before pressing "Tab"). ==action: Try it now - type "whoa" then press "Tab"==. You should see the previous command complete itself.
|
||||
|
||||
### Familiarisation with the environment {#familiarisation-with-the-environment}
|
||||
## Familiarisation with the environment {#familiarisation-with-the-environment}
|
||||
|
||||
The desktop VM is a Linux system, which is based on Debian (a distribution of GNU/Linux[^3]), and is configured with the KDE desktop environment[^4]. Note that many of the VMs you will use are based on different Linux distros, with various desktop environments. Although different distributions may appear to be visually very different, the commands used for each are typically almost identical. By the end of your studies you will be familiar with many flavors of Linux. We will also be using other operating systems (OSs), such as Windows.
|
||||
|
||||
@@ -144,7 +90,7 @@ Here is a brief summary of some of the most popular desktop flavours of Linux:
|
||||
|
||||
Each of these Linux distributions has its strengths and caters to different user preferences and needs, whether it's ease of use, stability, bleeding-edge software, or specialized applications. The popularity of each distribution can vary depending on the target audience and use case.
|
||||
|
||||
### Basic Linux command skills {#basic-linux-command-skills}
|
||||
## Basic Linux command skills {#basic-linux-command-skills}
|
||||
|
||||
We will start with a crash course in building your way to Linux command-line wizardry (you have to start somewhere), then quickly jump into network sniffing, password grabbing, remote administration of machines via ssh (secure shell), and other exciting things.
|
||||
|
||||
@@ -161,39 +107,51 @@ Here’s a brief cheat sheet of some common Linux/Unix commands:
|
||||
| mkdir | Makes a directory | mkdir newdirectory |
|
||||
| cd | Change working directory, to “move us into a different directory” | cd newdirectory |
|
||||
|
||||
*Tip: If you ever get lost within the file structure, you can type “cd” on its own (no directory name afterwards) and you’ll return to your home folder. To go up just one level within the file system, type “cd ..” (“cd”, followed by a space then two full-stops.)*
|
||||
> Tip: If you ever get lost within the file structure, you can type "cd" on its own (no directory name afterwards) and you'll return to your home folder. To go up just one level within the file system, type "cd .." ("cd", followed by a space then two full-stops.)
|
||||
|
||||
If you haven't already, open a terminal console.
|
||||
If you haven't already, ==action: open a terminal console==.
|
||||
|
||||
One way to do this is to start Konsole from KDEMenu → Applications → System → Terminal → Konsole.
|
||||
> Note: One way to do this is to start Konsole from KDEMenu → Applications → System → Terminal → Konsole.
|
||||
|
||||
Start by checking your current location in the file system:
|
||||
Start by ==action: checking your current location in the file system==:
|
||||
|
||||
```bash
|
||||
pwd
|
||||
```
|
||||
|
||||
Continue by making a new directory, moving into it, and creating another directory there (check you location using pwd if needed):
|
||||
Continue by ==action: making a new directory, moving into it, and creating another directory there== (check you location using pwd if needed):
|
||||
|
||||
```bash
|
||||
mkdir mydir
|
||||
```
|
||||
|
||||
```bash
|
||||
cd mydir
|
||||
```
|
||||
|
||||
```bash
|
||||
mkdir mydir2
|
||||
```
|
||||
|
||||
Display at the contents of your working directory:
|
||||
==action: Display the contents of your working directory==:
|
||||
|
||||
```bash
|
||||
ls
|
||||
```
|
||||
|
||||
Note, this is lowercase “LS”.
|
||||
> Note: Note that this is lowercase “LS”.
|
||||
|
||||
Ok, that lists the directory name, but doesn’t tell you much else...
|
||||
|
||||
#### Getting unstuck {#getting-unstuck}
|
||||
### Getting unstuck {#getting-unstuck}
|
||||
|
||||
If you don’t know what a command does, or what flags (command arguments) to use, then look it up in the manual, using the **man** command.
|
||||
If you don't know what a command does, or what flags (command arguments) to use, then look it up in the manual, using the **man** command.
|
||||
|
||||
Try it now:
|
||||
==action: Try it now==:
|
||||
|
||||
```bash
|
||||
man ls
|
||||
```
|
||||
|
||||
(and press enter when prompted which ls you are interested in learning about)
|
||||
|
||||
@@ -201,133 +159,165 @@ The cheat sheet above mentions how how to use **ls** to display more details. Sc
|
||||
|
||||
When you are done reading, press “q” to quit.
|
||||
|
||||
Now try it. Run:
|
||||
Now ==action: try it==. Run:
|
||||
|
||||
ls \-la
|
||||
```bash
|
||||
ls -la
|
||||
```
|
||||
|
||||
Note, this is lowercase “LS \-LA”.
|
||||
> Note: This is lowercase “LS \-LA”.
|
||||
|
||||
This gives a much more satisfying output. The output includes permissions, the user who owns the file, filesize (in bytes), last time each file/directory was modified, and more. We will come back to the meaning of all this information in more detail another time.
|
||||
|
||||
You can also read the info page, which like the man page, also provides a summary of usage:
|
||||
|
||||
```bash
|
||||
info ls
|
||||
```
|
||||
|
||||
(press “q” to quit)
|
||||
(press "q" to quit)
|
||||
|
||||
#### VI {#vi}
|
||||
### VI {#vi}
|
||||
|
||||
Next, lets edit a file, using vi, the “paragon of editing perfection”[^5], and most importantly the editor available on nearly every Unix and Linux system. Run:
|
||||
Next, lets ==action: edit a file, using vi==, the "paragon of editing perfection"[^5], and most importantly the editor available on nearly every Unix and Linux system. Run:
|
||||
|
||||
```bash
|
||||
vi mynewfile
|
||||
```
|
||||
|
||||
Vi is ‘modal’: it has an insert mode, where you can type text into the file, and normal mode, where what you type is interpreted as commands. Press the “i” key to enter “insert mode”. Type a message (such as “hello there”), then exit back to “normal mode” by pressing the Esc key. Now to exit and save the file press the “:” key, followed by “wq” (write quit), and press Enter.
|
||||
Vi is 'modal': it has an insert mode, where you can type text into the file, and normal mode, where what you type is interpreted as commands. ==action: Press the "i" key to enter "insert mode"==. ==action: Type a message (such as "hello there")==, then ==action: exit back to "normal mode" by pressing the Esc key==. Now to ==action: exit and save the file press the ":" key, followed by "wq" (write quit), and press Enter==.
|
||||
|
||||
Now you know everything you need to edit files using vi\!
|
||||
|
||||
Side note: if you want to become a serious guru, take 10-20 mins to run through an online tutorial on vi. You will soon be impressing people with your wizard-like editing skills. What’s that you say? Want to delete 30 lines? In normal mode, just type “30dd”.
|
||||
> Tip: Side note: if you want to become a serious guru, take 10-20 mins to run through an online tutorial on vi. You will soon be impressing people with your wizard-like editing skills. What’s that you say? Want to delete 30 lines? In normal mode, just type “30dd”.
|
||||
|
||||
Open the file using vi again, and add another line of text to the file. Save and quit.
|
||||
==action: Open the file using vi again, and add another line of text to the file. Save and quit==.
|
||||
|
||||
Next, list the files in your working directory again. Then, refer to the cheat sheet to copy your new file to a file named “mynewfile2”.
|
||||
Next, ==action: list the files in your working directory again==. Then, ==action: refer to the cheat sheet to copy your new file to a file named "mynewfile2"==.
|
||||
|
||||
Print the contents of the file to the console.
|
||||
==action: Print the contents of the file to the console==.
|
||||
|
||||
*Tip: If your terminal is getting a little crowded with text, press “Ctrl” and “l” (lower-case L) together to clear it.*
|
||||
> Tip: If your terminal is getting a little crowded with text, press "Ctrl" and "l" (lower-case L) together to clear it.
|
||||
|
||||
#### Piping between programs {#piping-between-programs}
|
||||
### Piping between programs {#piping-between-programs}
|
||||
|
||||
Another important command line skill is piping between programs. You can send the output (known as stdout) of one program to the input (known as stdin) of another. For example, imagine you had a large text file, and wanted to find all the lines that matched a certain pattern, and then sort those alphabetically. Doing this manually could take an impossibly long time, depending on the size of the file. Using some simple Unix commands we can do this easily.
|
||||
|
||||
Let's start by printing the contents of a file on our system. Run:
|
||||
Let's start by ==action: printing the contents of a file on our system==. Run:
|
||||
|
||||
```bash
|
||||
cat /etc/passwd
|
||||
```
|
||||
|
||||
Note that the passwd file contains information about each of the user accounts on the local system.
|
||||
> Note: The passwd file contains information about each of the user accounts on the local system.
|
||||
|
||||
Now if we wanted to see only the lines that contained the text “/home/”, we can use the grep command, to filter the output to only those lines. Run:
|
||||
Now if we wanted to see only the lines that contained the text "/home/", we can use the grep command, to filter the output to only those lines. Run:
|
||||
|
||||
```bash
|
||||
cat /etc/passwd | grep /home/
|
||||
```
|
||||
|
||||
Note that there are user accounts that are not for normal users (with home directories), so this command will filter those out. *Also, depending on your computer's keyboard layout or language settings, you may find that the “|” and “\~” keys are reversed, so try the other if you get an unexpected output.*
|
||||
> Note: There are user accounts that are not for normal users (with home directories), so this command will filter those out. *Also, depending on your computer's keyboard layout or language settings, you may find that the "\|" and "\~" keys are reversed, so try the other if you get an unexpected output.*
|
||||
|
||||
And to put these in *reverse* alphabetical order, run:
|
||||
|
||||
cat /etc/passwd | grep /home/ | sort \-r
|
||||
```bash
|
||||
cat /etc/passwd | grep /home/ | sort -r
|
||||
```
|
||||
|
||||
*Tip: Pressing the **↑** key (up arrow) or ↓ key (down arrow) allows you to cycle through previous commands. For example, after typing each command above, press **↑** to bring it back, then you can just add the new parts.*
|
||||
> Tip: Pressing the **↑** key (up arrow) or ↓ key (down arrow) allows you to cycle through previous commands. For example, after typing each command above, press **↑** to bring it back, then you can just add the new parts.
|
||||
|
||||
#### Redirecting to/from files {#redirecting-to/from-files}
|
||||
### Redirecting to/from files {#redirecting-to-from-files}
|
||||
|
||||
The final command line skill we will cover in this quick crash course is redirection to and from files. You can send the output (known as stdout) of a program to a file, or send the contents of a file to the input (known as stdin) of a program.
|
||||
|
||||
So for example, it is easy to save the output from a command to a file. Run:
|
||||
So for example, it is easy to ==action: save the output from a command to a file==. Run:
|
||||
|
||||
ps aux \> processes
|
||||
```bash
|
||||
ps aux > processes
|
||||
```
|
||||
|
||||
Note, the **ps** command lists the processes (running programs) on the system, and the “aux” flags tell it to show all of the processes in some detail. The command above writes a list of all the processes on the machine to a file named 'processes'.
|
||||
> Note: The **ps** command lists the processes (running programs) on the system, and the “aux” flags tell it to show all of the processes in some detail. The command above writes a list of all the processes on the machine to a file named 'processes'.
|
||||
|
||||
To display that file we can send the contents of the file to the **cat** program:
|
||||
To ==action: display that file we can send the contents of the file to the **cat** program==:
|
||||
|
||||
cat \< processes
|
||||
```bash
|
||||
cat < processes
|
||||
```
|
||||
|
||||
Alternatively you can tell cat to read the file itself:
|
||||
Alternatively you can ==action: tell cat to read the file itself==:
|
||||
|
||||
```bash
|
||||
cat processes
|
||||
```
|
||||
|
||||
The difference is that the first version sends the contents of the file to the cat process, which just receives the lines of text and displays them, whereas the second command tells cat that you want it to open the file and read out its contents.
|
||||
> The difference is that the first version sends the contents of the file to the cat process, which just receives the lines of text and displays them, whereas the second command tells cat that you want it to open the file and read out its contents.
|
||||
|
||||
Another handy program is **less**, which gives you the ability to scroll through the file (as well as lots of other handy features). Run:
|
||||
|
||||
```bash
|
||||
less processes
|
||||
```
|
||||
|
||||
Scroll through, and press “q” to quit when you are ready.
|
||||
==action: Scroll through, and press "q" to quit when you are ready==.
|
||||
|
||||
Write a one line command that only prints the processes that contain the text 'bash' to a file named 'bashes'.
|
||||
==action: Write a one line command that only prints the processes that contain the text 'bash' to a file named 'bashes'==.
|
||||
|
||||
Hint: pipe the output from ps to grep, then redirect the output to a file.
|
||||
> Hint: Pipe the output from ps to grep, then redirect the output to a file.
|
||||
|
||||
### Basic Linux networking {#basic-linux-networking}
|
||||
## Basic Linux networking {#basic-linux-networking}
|
||||
|
||||
Find your system’s IP address(es). Run:
|
||||
==action: Find your system's IP address(es)==. Run:
|
||||
|
||||
```bash
|
||||
/sbin/ifconfig
|
||||
```
|
||||
|
||||
Note, this is similar in purpose to the *ipconfig* command on Windows.
|
||||
> Note: This is similar in purpose to the *ipconfig* command on Windows.
|
||||
|
||||
Also try the newer command:
|
||||
Also ==action: try the newer command==:
|
||||
|
||||
```bash
|
||||
ip a s
|
||||
```
|
||||
|
||||
(Short for “ip address show”, which also works in full)
|
||||
(Short for "ip address show", which also works in full)
|
||||
|
||||
Finally, you can use the “hostname” command with the flag “-I” to display just your IP address(es):
|
||||
Finally, you can ==action: use the "hostname" command with the flag "-I" to display just your IP address(es)==:
|
||||
|
||||
hostname \-I
|
||||
```bash
|
||||
hostname -I
|
||||
```
|
||||
|
||||
Hint: In the Hacktivity environment, your IPv4 address will typically start either with “172.22” (where you are on a shared network with other students) or “10” (where you are on a more isolated network).
|
||||
> Hint: In the Hacktivity environment, your IPv4 address will typically start either with “172.22” (where you are on a shared network with other students) or “10” (where you are on a more isolated network).
|
||||
|
||||
On many Linux systems you can leave off the /sbin/ part, depending on the $PATH environment variable, which lists where to look for programs to run. To see what your $PATH is currently set to, run:
|
||||
On many Linux systems you can leave off the /sbin/ part, depending on the $PATH environment variable, which lists where to look for programs to run. To ==action: see what your $PATH is currently set to==, run:
|
||||
|
||||
```bash
|
||||
echo $PATH
|
||||
```
|
||||
|
||||
Note, the **echo** command simply outputs something to the screen (so for example, “echo hello, world\!” would print “hello, world\!” to the console), and variables start with “$” in Bash, the Linux shell[^6].
|
||||
> Note: The **echo** command simply outputs something to the screen (so for example, “echo hello, world\!” would print “hello, world\!” to the console), and variables start with “$” in Bash, the Linux shell[^6].
|
||||
|
||||
You will see a list of folders, separated by the “:” symbol. Any executables contained within these folders will be accessible from any directory, without typing the path first.
|
||||
|
||||
Note that the commands to list IP addresses will display each of the network interfaces, including physical interfaces, and virtual ones. Ethernet ports will be represented as “eth0”, “eth1”, “ens3” and so on.
|
||||
|
||||
If you ever find that your ethernet port has not been allocated an appropriate IP address (for example, there was a problem with the DHCP server), you can usually remedy the problem (and get allocated an IP address) by running:
|
||||
If you ever find that your ethernet port has not been allocated an appropriate IP address (for example, there was a problem with the DHCP server), you can usually ==action: remedy the problem (and get allocated an IP address) by running==:
|
||||
|
||||
```bash
|
||||
dhclient eth0
|
||||
```
|
||||
|
||||
or (depending on distro)
|
||||
|
||||
```bash
|
||||
dhcpcd eth0
|
||||
```
|
||||
|
||||
You can also try restarting the entire network service, or bring up/down interfaces (ask Google or your tutor).
|
||||
> Note: You can also try restarting the entire network service, or bring up/down interfaces (ask Google or your tutor).
|
||||
|
||||
### Virtualisation and our use of virtual machines (VMs) {#virtualisation-and-our-use-of-virtual-machines-(vms)}
|
||||
## Virtualisation and our use of virtual machines (VMs) {#virtualisation-and-our-use-of-virtual-machines-vms}
|
||||
|
||||
Virtualisation is a very powerful tool, which can provide important security features, such as isolation, and is an important component of many modern cloud infrastructures. Virtualisation can create virtual environments, and can even run entire operating systems as though they were on separate hardware. This type of virtualisation is known as platform virtualisation, or hardware virtualisation. As illustrated in the figure below, virtualisation allows one set of hardware (a computer), to host a number of guest virtual machines (VMs), each with their own operating systems, applications, and virtual hardware.
|
||||
|
||||
@@ -337,39 +327,41 @@ Hardware Virtualization ([Image](http://commons.wikimedia.org/wiki/File:Hardware
|
||||
|
||||
During the module we will make use of various VMs to recreate realistic security scenarios, typically generated by our software and running on our oVirt and Proxmox cloud infrastructure.
|
||||
|
||||
### A note about working from home {#a-note-about-working-from-home}
|
||||
## A note about working from home {#a-note-about-working-from-home}
|
||||
|
||||
You can access Hacktivity remotely to work on labs from home, and you might also be interested in setting up your own home lab environment with VMs installed locally. However, choosing to do work outside of our lab environment is at your own risk and responsibility.
|
||||
|
||||
The most important thing to consider is to **ensure you are not acting illegally**. As mentioned, many of the tasks we do in our isolated labs could be considered illegal if targeted at someone else’s servers. Any tasks done in your own environment should be contained to your own personal computer(s), and to be sure you should disconnect your personal lab from all external network connections. If in any doubt, only complete the exercises within our secure labs.
|
||||
> Warning: The most important thing to consider is to **ensure you are not acting illegally**. As mentioned, many of the tasks we do in our isolated labs could be considered illegal if targeted at someone else's servers. Any tasks done in your own environment should be contained to your own personal computer(s), and to be sure you should disconnect your personal lab from all external network connections. If in any doubt, only complete the exercises within our secure labs.
|
||||
|
||||
Ideally you would have a PC with VMware Player and Virtualbox installed. Keep in mind that your mileage will vary, and we cannot provide support for your own home setups. Getting some practice with Linux outside of the labs (either installed on your computer or through a VM) will also help with upcoming lessons.
|
||||
|
||||
### Introduction to Kali Linux {#introduction-to-kali-linux}
|
||||
## Introduction to Kali Linux {#introduction-to-kali-linux}
|
||||
|
||||
In 2013, Offensive Security released Kali Linux, the successor to the very popular BackTrack Linux distribution.
|
||||
|
||||
Kali Linux is a Linux distribution especially designed for penetration testing, and forensics. These distros have become the industry standard for ethical hacking.
|
||||
|
||||
If you have not already done so (it should already be running), start and interact with the Kali VM. The username is “kali”, with password “kali”.
|
||||
If you have not already done so (it should already be running), start and interact with the Kali VM. The username is "kali", with password "kali".
|
||||
|
||||
Start by browsing through the tools that are available.
|
||||
==action: Start by browsing through the tools that are available==.
|
||||
|
||||
Click the “Applications” menu → hover over any of the numbered subdirectories
|
||||
==action: Click the "Applications" menu → hover over any of the numbered subdirectories==
|
||||
|
||||
There are an amazing amount of security/hacking tools included with Kali. Take a few minutes to familiarise yourself with the layout of this menu.
|
||||
There are an amazing amount of security/hacking tools included with Kali. ==action: Take a few minutes to familiarise yourself with the layout of this menu==.
|
||||
|
||||
Most of these programs are command line tools. Open a terminal, by clicking the console icon (![][image4]).
|
||||
Most of these programs are command line tools. ==action: Open a terminal, by clicking the console icon== (![][image4]).
|
||||
|
||||
This is where the magic happens\!
|
||||
|
||||
To further emphasise the sheer amount of ~~awesomeness~~ tools, run:
|
||||
|
||||
```bash
|
||||
ls /usr/bin
|
||||
```
|
||||
|
||||
Have a quick scroll through the vast “arsenal” of tools. Do you already recognise any of these programs?
|
||||
|
||||
### Remote shell access and SSH {#remote-shell-access-and-ssh}
|
||||
## Remote shell access and SSH {#remote-shell-access-and-ssh}
|
||||
|
||||
Secure shell (SSH) is a network protocol that enables secure communication between two computers on an insecure network. The primarily purpose of SSH is to provide an encrypted remote shell (command line) session, for executing commands on a remote server. This is safer than the old insecure method of remote logins using Telnet or rlogin, which have no encryption and can be easily attacked (by simply listening to network traffic, which includes user logins with passwords).
|
||||
|
||||
@@ -381,71 +373,94 @@ Now lets see ssh in action.
|
||||
|
||||
**On your Desktop system**
|
||||
|
||||
Confirm that a local SSH server (sshd) is running on your system:
|
||||
==action: Confirm that a local SSH server (sshd) is running on your system==:
|
||||
|
||||
```bash
|
||||
/usr/sbin/service sshd status
|
||||
```
|
||||
|
||||
On Kali “/usr/sbin/” is not necessary, since you are logged in as root (again, running everything as root is normally a bad idea, but for security *testing* purposes is ok).
|
||||
> Note: On Kali “/usr/sbin/” is not necessary, since you are logged in as root (again, running everything as root is normally a bad idea, but for security *testing* purposes is ok).
|
||||
|
||||
When the sshd service is running, other users can SSH into your machine (if they have valid credentials), and issue commands.
|
||||
|
||||
**On your Kali system**
|
||||
|
||||
To illustrate this, ssh into your Desktop VM. Run this command to ssh into the server:
|
||||
To illustrate this, ==action: ssh into your Desktop VM==. Run this command to ssh into the server:
|
||||
|
||||
```bash
|
||||
ssh *username*@*IP-OF-DESKTOP*
|
||||
```
|
||||
|
||||
Where *username* is the desktop user’s username, as shown previously by the whoami command, and the IP address is the address of the Desktop.
|
||||
Where *username* is the desktop user's username, as shown previously by the whoami command, and the IP address is the address of the Desktop.
|
||||
|
||||
If you leave out the username (and @ symbol),the username you are logged in as is used to connect to the remote system (which won’t work here, as we are running as root on Kali). *This is also an instance where keyboard layout and language can cause the incorrect symbol to be typed \- you may find that the “@” symbol and “ symbol (quote mark) are reversed.*
|
||||
|
||||
Enter the password given to you at the start of the lab, “tiaspbiqe2r”.
|
||||
==action: Enter the password given to you at the start of the lab, "tiaspbiqe2r"==.
|
||||
|
||||
You should check the fingerprint displayed, to confirm you are connecting to the machine you think you are connecting to. This protects against man-in-the-middle attacks, where you think you are connecting to a trusted server, but are actually being fooled into talking to a malicious host, who may be intercepting or modifying the communications.
|
||||
You should ==action: check the fingerprint displayed, to confirm you are connecting to the machine you think you are connecting to==. This protects against man-in-the-middle attacks, where you think you are connecting to a trusted server, but are actually being fooled into talking to a malicious host, who may be intercepting or modifying the communications.
|
||||
|
||||
To check the fingerprint, on the desktop run:
|
||||
To ==action: check the fingerprint, on the desktop run==:
|
||||
|
||||
ssh-keygen \-lf /etc/ssh/ssh\_host\_rsa\_key.pub
|
||||
```bash
|
||||
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
|
||||
```
|
||||
|
||||
Hint: you may also need to check other .pub files in that directory
|
||||
> hint: Hint: you may also need to check other .pub files in that directory
|
||||
|
||||
If the fingerprint presented to you while connecting matches, type “yes”, and from then on if you connect to the same machine you won't be prompted.
|
||||
|
||||
*Note: If you wish to copy / paste commands within the terminal, press the “Shift” key along with the usual shortcut \- “Shift”, “Ctrl” and “c” will copy,* “Shift”, “Ctrl” and “v” will paste.
|
||||
> Tip: If you wish to copy / paste commands within the terminal, press the "Shift" key along with the usual shortcut \- "Shift", "Ctrl" and "c" will copy, "Shift", "Ctrl" and "v" will paste.
|
||||
|
||||
If all has gone well you are now sharing the computer. Use these commands and interpret the output:
|
||||
If all has gone well you are now sharing the computer. ==action: Use these commands and interpret the output==:
|
||||
|
||||
```bash
|
||||
hostname
|
||||
```
|
||||
|
||||
```bash
|
||||
/sbin/ifconfig
|
||||
```
|
||||
|
||||
```bash
|
||||
whoami
|
||||
```
|
||||
|
||||
```bash
|
||||
top
|
||||
```
|
||||
|
||||
```bash
|
||||
who
|
||||
```
|
||||
|
||||
```bash
|
||||
write *username*
|
||||
```
|
||||
|
||||
```bash
|
||||
ps aux
|
||||
```
|
||||
|
||||
Hint: remember, if you are not sure what a command does, check its man page, using “man *command*”.
|
||||
> Hint: remember, if you are not sure what a command does, check its man page, using “man *command*”.
|
||||
|
||||
Try running “kate” on the remote system, why doesn't that work?
|
||||
==action: Try running "kate" on the remote system, why doesn't that work?==
|
||||
|
||||
Log out of the ssh session (run “exit” or press Ctrl-D), but be careful, if you exit one too many times your current terminal console will close (the username within the terminal should indicate which account you are currently using).
|
||||
==action: Log out of the ssh session (run "exit" or press Ctrl-D)==
|
||||
> Warning: Be careful, if you exit one too many times your current terminal console will close (the username within the terminal should indicate which account you are currently using).
|
||||
|
||||
Now try adding the command line argument “-X” which forwards X11 traffic, so that graphical programs have their interfaces forwarded to your local X server:
|
||||
Now ==action: try adding the command line argument "-X" which forwards X11 traffic, so that graphical programs have their interfaces forwarded to your local X server==:
|
||||
|
||||
ssh *username*@*desktop-ip* \-X
|
||||
```bash
|
||||
ssh *username*@*desktop-ip* -X
|
||||
```
|
||||
|
||||
Retry running “kate”.
|
||||
==action: Retry running "kate"==.
|
||||
|
||||
Now the program is running on the remote server, but displayed locally\! You should be able to graphically edit files on the remote system. Try adding some text and saving it. You should then be able to view the new document back on the Desktop machine.
|
||||
Now the program is running on the remote server, but displayed locally\! You should be able to graphically edit files on the remote system. ==action: Try adding some text and saving it==. You should then be able to view the new document back on the Desktop machine.
|
||||
|
||||
When you are finished, simply run “exit” or press Ctrl+D to exit back to your own local terminal.
|
||||
When you are finished, simply ==action: run "exit" or press Ctrl+D to exit back to your own local terminal==.
|
||||
|
||||
### Hacking SSH via online bruteforce attacks {#hacking-ssh-via-online-bruteforce-attacks}
|
||||
## Hacking SSH via online bruteforce attacks {#hacking-ssh-via-online-bruteforce-attacks}
|
||||
|
||||
Now, for those of you hanging out to hack something\!
|
||||
|
||||
@@ -455,57 +470,73 @@ Hydra is an online login tool, which can test login credentials (and bruteforce
|
||||
|
||||
Services Hydra can check credentials include: Asterisk, AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP, HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-POST, HTTP-PROXY, HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTPS-POST, HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MEMCACHED, MONGODB, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener, Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, Radmin, RDP, Rexec, Rlogin, Rsh, RTSP, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP v1+v2+v3, SOCKS5, SSH (v1 and v2), SSHKEY, Subversion, Teamspeak (TS2), Telnet, VMware-Auth, VNC and XMPP.
|
||||
|
||||
Use Hydra to test a known username and password combination:
|
||||
==action: Use Hydra to test a known username and password combination==:
|
||||
|
||||
hydra \-l *username* \-p tiaspbiqe2r *IPADDRESS* \-t 4 ssh
|
||||
```bash
|
||||
hydra -l *username* -p tiaspbiqe2r *IPADDRESS* -t 4 ssh
|
||||
```
|
||||
|
||||
**On your Desktop system**
|
||||
|
||||
Confirm the user home directories present:
|
||||
==action: Confirm the user home directories present==:
|
||||
|
||||
```bash
|
||||
ls /home/
|
||||
```
|
||||
|
||||
There is a victim account… Can you read the victim’s files in other users' home folders?
|
||||
There is a victim account… ==action: Can you read the victim's files in other users' home folders?==
|
||||
|
||||
```bash
|
||||
ls /home/victim
|
||||
```
|
||||
|
||||
No. *(Not yet\!)*
|
||||
|
||||
**On your Kali system**
|
||||
|
||||
Hydra can receive a list of passwords to attempt. But which passwords should you try? List some of the wordlists available on Kali:
|
||||
Hydra can receive a list of passwords to attempt. But which passwords should you try? ==action: List some of the wordlists available on Kali==:
|
||||
|
||||
```bash
|
||||
ls /usr/share/wordlists/seclists/Passwords/Common-Credentials
|
||||
```
|
||||
|
||||
Which of these are most likely to work against SSH credentials?
|
||||
==action: Which of these are most likely to work against SSH credentials?==
|
||||
|
||||
Use some password lists to use Hydra to crack the victim account on Desktop:
|
||||
==action: Use some password lists to use Hydra to crack the victim account on Desktop==:
|
||||
|
||||
hydra \-l victim \-P /usr/share/wordlists/seclists/Passwords/Common-Credentials/*File\_name* *DESKTOP-IP-ADDRESS* \-t 4 ssh
|
||||
```bash
|
||||
hydra -l victim -P /usr/share/wordlists/seclists/Passwords/Common-Credentials/*File_name* *DESKTOP-IP-ADDRESS* -t 4 ssh
|
||||
```
|
||||
|
||||
*Where filename is a password list.*
|
||||
|
||||
*Note that using the wrong list will take a REALLY long time to try to crack credentials using online methods (and can quickly result in your IP address being blocked from some online services). To stop the scan press Ctrl-C, and try a different password list file.*
|
||||
> Warning: Using the wrong list will take a REALLY long time to try to crack credentials using online methods (and can quickly result in your IP address being blocked from some online services). To stop the scan press Ctrl-C, and try a different password list file.
|
||||
|
||||
Once you have identified login credentials for the victim account, SSH to the desktop using the victim credentials.
|
||||
Once you have identified login credentials for the victim account, ==action: SSH to the desktop using the victim credentials==.
|
||||
|
||||
Once you have access to the victim user, look in the victim user’s home directory for a flag. Read the flag file in the victim’s home directory with the command:
|
||||
Once you have access to the victim user, ==action: look in the victim user's home directory for a flag==. ==action: Read the flag file in the victim's home directory with the command==:
|
||||
|
||||
```bash
|
||||
cat /home/victim/flag
|
||||
```
|
||||
|
||||
There is another account to be hacked, the “bystander” user. There is a flag. Try to access it using:
|
||||
There is another account to be hacked, the "bystander" user. There is a flag. ==action: Try to access it using==:
|
||||
|
||||
```bash
|
||||
cat /home/bystander/flag
|
||||
```
|
||||
|
||||
The victim can’t access it directly (neither can your user).
|
||||
The victim can't access it directly (neither can your user).
|
||||
|
||||
Note that the victim user has the extra ability to act as a superuser (root). As the victim, use the “sudo” command to act as root and access the “bystander” user’s files.
|
||||
Note that the victim user has the extra ability to act as a superuser (root). As the victim, ==action: use the "sudo" command to act as root and access the "bystander" user's files==.
|
||||
|
||||
```bash
|
||||
sudo cat /home/bystander/flag
|
||||
```
|
||||
|
||||
**Submit all flags to Hacktivity to show you have completed these tasks.**
|
||||
==action: **Submit all flags to Hacktivity to show you have completed these tasks.**==
|
||||
|
||||
### Conclusion {#conclusion}
|
||||
## Conclusion {#conclusion}
|
||||
|
||||
At this point you have:
|
||||
|
||||
@@ -521,6 +552,8 @@ At this point you have:
|
||||
|
||||
Well done\! Not bad for the first week\!
|
||||
|
||||
## Footnotes
|
||||
|
||||
[^1]: See the section about working from home for some more details about setting up your own isolated lab
|
||||
|
||||
[^2]: For more information, see: [http://en.opensuse.org/SDB:Login\_as\_root](http://en.opensuse.org/SDB:Login_as_root)
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
---
|
||||
title: "Malware and an Introduction to Metasploit and Payloads"
|
||||
author: "Z. Cliffe Schreuders"
|
||||
license: "CC BY-SA 4.0"
|
||||
description: "Explore malware types and ethical hacking techniques using the Metasploit framework. Learn to create Trojan horses, evade anti-malware detection, and generate payloads in a controlled environment."
|
||||
overview: |
|
||||
This lab provides an introduction to malware analysis and ethical hacking techniques using the Metasploit framework. You will explore different types of malware and learn how to create, analyze, and defend against malicious software in a controlled environment. The lab covers essential concepts in cybersecurity including Trojan horses, payload generation, and anti-malware evasion techniques.
|
||||
|
||||
Through hands-on exercises, you will gain practical experience with the Metasploit framework, one of the most powerful penetration testing tools available. You will learn how to generate various types of payloads, understand how malware operates, and develop skills in ethical hacking that are crucial for cybersecurity professionals. This lab prepares you for more advanced topics in malware analysis and penetration testing.
|
||||
difficulty: "Beginner"
|
||||
duration: "120 minutes"
|
||||
prerequisites: "Basic understanding of operating systems and networking"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Do+Hyeon&family=Source+Code+Pro:wght@400;500;600&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Cute+Font&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/hacktivity-theme.css' | relative_url }}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
@@ -22,19 +23,23 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// Check for embedded query parameter
|
||||
if (window.location.search.includes('embedded')) {
|
||||
document.body.classList.add('embedded-mode');
|
||||
}
|
||||
</script>
|
||||
|
||||
{% unless page.embed or site.embedded %}
|
||||
<header class="site-header">
|
||||
<div class="wrapper">
|
||||
<a class="site-title" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a>
|
||||
<a href="https://hacktivity.co.uk"><img src="{{ '/assets/images/hacktivity-logo.svg' | relative_url }}" alt="Hacktivity Logo" class="hacktivity-logo"></a></span>
|
||||
<!-- <a class="nav-link" href="{{ '/' | relative_url }}">Sheets</a>
|
||||
<a class="nav-link" href="https://github.com/{{ site.github.repository_name }}" target="_blank">GitHub</a> -->
|
||||
|
||||
<nav class="site-nav">
|
||||
<span class="menu-icon">☰</span>
|
||||
<div class="trigger">
|
||||
<a class="page-link" href="{{ '/' | relative_url }}">Home</a>
|
||||
<a class="page-link" href="https://github.com/{{ site.github.repository_name }}" target="_blank">GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
{% endunless %}
|
||||
|
||||
<main class="page-content">
|
||||
<div class="wrapper">
|
||||
@@ -42,13 +47,14 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% unless page.embed or site.embedded %}
|
||||
<footer class="site-footer">
|
||||
<div class="wrapper">
|
||||
<p class="footer-text">
|
||||
© 2024 {{ site.title | escape }}.
|
||||
<a href="https://github.com/cliffe/{{ site.github.repository_name }}">View on GitHub</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
{% endunless %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,13 +10,27 @@ layout: default
|
||||
</div>
|
||||
|
||||
<article class="lab-content">
|
||||
<header class="lab-header">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.description %}
|
||||
<p class="lab-description">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if page.overview %}
|
||||
<h2>Lab Overview</h2>
|
||||
<div class="overview-content">{{ page.overview | markdownify }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="lab-metadata">
|
||||
{% if page.author %}
|
||||
<div class="metadata-item">
|
||||
<strong>Author:</strong> {{ page.author }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page.license %}
|
||||
<div class="metadata-item">
|
||||
<strong>License:</strong> {{ page.license }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page.difficulty %}
|
||||
<div class="metadata-item">
|
||||
<strong>Difficulty:</strong> {{ page.difficulty }}
|
||||
@@ -32,23 +46,38 @@ layout: default
|
||||
<strong>Prerequisites:</strong> {{ page.prerequisites }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page.cybok %}
|
||||
<div class="cybok">
|
||||
<strong>CyBOK Knowledge Areas:</strong>
|
||||
{% for cybok_item in page.cybok %}
|
||||
<span class="cybok-ka">{{ cybok_item.ka }}: {{ cybok_item.topic }}</span>
|
||||
{% for keyword in cybok_item.keywords %}
|
||||
<span class="cybok-keyword">{{ keyword }}</span>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page.tags %}
|
||||
<div class="metadata-item">
|
||||
<strong>Tags:</strong>
|
||||
<div class="tags">
|
||||
{% for tag in page.tags %}
|
||||
<span class="tag">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</header>
|
||||
<br />
|
||||
|
||||
<div class="lab-content-body">
|
||||
<div id="toc-container" class="toc-container">
|
||||
<h2>Table of Contents</h2>
|
||||
<ul id="toc-list"></ul>
|
||||
</div>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
<footer class="lab-footer">
|
||||
<a href="{{ '/' | relative_url }}" class="back-link">← Back to Lab Index</a>
|
||||
<a href="https://hacktivity.co.uk" class="back-link">← Back to Hacktivity</a>
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
@@ -78,6 +107,13 @@ layout: default
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.overview-content {
|
||||
color: var(--fg-color);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
|
||||
.lab-metadata {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
@@ -97,15 +133,6 @@ layout: default
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tag {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: 12px;
|
||||
font-size: 0.75rem;
|
||||
border: 1px solid var(--primary-btnbg-color);
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
||||
.lab-content-body {
|
||||
line-height: 1.6;
|
||||
@@ -126,31 +153,6 @@ layout: default
|
||||
color: var(--fg-color);
|
||||
}
|
||||
|
||||
.lab-content-body code {
|
||||
background-color: #ffeb3b;
|
||||
padding: 0.125rem 0.25rem;
|
||||
border-radius: 3px;
|
||||
font-size: 0.875rem;
|
||||
border: 1px solid var(--panelborder-color);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.lab-content-body pre {
|
||||
background-color: var(--highlight-color);
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
border: 1px solid var(--panelborder-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.lab-content-body pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
border: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.lab-footer {
|
||||
margin-top: 3rem;
|
||||
padding-top: 1.5rem;
|
||||
@@ -167,6 +169,55 @@ layout: default
|
||||
text-decoration: underline;
|
||||
color: var(--primary-btnhov-color);
|
||||
}
|
||||
|
||||
.toc-container {
|
||||
background-color: var(--panelbg-color);
|
||||
border: 1px solid var(--panelborder-color);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.toc-container h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--fg-color);
|
||||
font-size: 1.1rem;
|
||||
border-bottom: 1px solid var(--panelborder-color);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#toc-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#toc-list li {
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
|
||||
#toc-list a {
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 0.25rem 0;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
#toc-list a:hover {
|
||||
background-color: var(--highlight-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Indentation based on heading level */
|
||||
#toc-list li[data-level="1"] { padding-left: 0; }
|
||||
#toc-list li[data-level="2"] { padding-left: 1rem; }
|
||||
#toc-list li[data-level="3"] { padding-left: 2rem; }
|
||||
#toc-list li[data-level="4"] { padding-left: 3rem; }
|
||||
#toc-list li[data-level="5"] { padding-left: 4rem; }
|
||||
#toc-list li[data-level="6"] { padding-left: 5rem; }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -199,12 +250,103 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Process ==highlight== syntax
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Process ==highlight== syntax and > TIP: patterns
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const contentBody = document.querySelector('.lab-content-body');
|
||||
if (contentBody) {
|
||||
// Replace ==text== with <mark>text</mark>
|
||||
// Replace specific highlight types first
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==action:\s*([^=]+)==/gi, '<span class="action-highlight">⚡ $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==tip:\s*([^=]+)==/gi, '<span class="tip-highlight">💡 $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==hint:\s*([^=]+)==/gi, '<span class="hint-highlight">💭 $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==note:\s*([^=]+)==/gi, '<span class="note-highlight">📝 $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==warning:\s*([^=]+)==/gi, '<span class="warning-highlight">⚠️ $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==VM:\s*([^=]+)==/gi, '<span class="vm-highlight">🖥️ $1</span>');
|
||||
|
||||
// Replace generic ==text== with <mark>text</mark>
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==([^=]+)==/g, '<mark>$1</mark>');
|
||||
|
||||
// Replace > TIP: patterns with tip-item divs
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*<em>Tip:<\/em>\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Handle > *Tip: ANYTHINGHERE* (entire content in italics)
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*<em>Tip:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/em>\s*<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Also handle > TIP: without italics
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Tip:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Handle block-level action, warning, note, hint patterns
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Action:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="action-item">$1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Warning:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="warning-item">$1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Note:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="note-item">$1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Hint:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="hint-item">Hint: $1</div>'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Auto-generate Table of Contents
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const tocList = document.getElementById('toc-list');
|
||||
const contentBody = document.querySelector('.lab-content-body');
|
||||
|
||||
if (tocList && contentBody) {
|
||||
// Find all headings in the content
|
||||
const headings = contentBody.querySelectorAll('h1, h2, h3, h4, h5, h6');
|
||||
|
||||
if (headings.length === 0) {
|
||||
// Hide TOC if no headings found
|
||||
document.getElementById('toc-container').style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate TOC items
|
||||
headings.forEach((heading, index) => {
|
||||
// Create ID if it doesn't exist
|
||||
if (!heading.id) {
|
||||
heading.id = heading.textContent
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9\s-]/g, '')
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/^-+|-+$/g, '');
|
||||
}
|
||||
|
||||
// Create TOC item
|
||||
const li = document.createElement('li');
|
||||
const level = parseInt(heading.tagName.charAt(1));
|
||||
li.setAttribute('data-level', level);
|
||||
|
||||
const a = document.createElement('a');
|
||||
a.href = '#' + heading.id;
|
||||
a.textContent = heading.textContent;
|
||||
|
||||
// Add click handler for smooth scrolling
|
||||
a.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
heading.scrollIntoView({ behavior: 'smooth' });
|
||||
});
|
||||
|
||||
li.appendChild(a);
|
||||
tocList.appendChild(li);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,12 +0,0 @@
|
||||
# Jekyll plugin to support ==highlight== syntax
|
||||
module Jekyll
|
||||
module HighlightFilter
|
||||
def highlight_text(input)
|
||||
return input if input.nil?
|
||||
# Convert ==text== to <mark>text</mark>
|
||||
input.gsub(/==([^=]+)==/, '<mark>\1</mark>')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_filter(Jekyll::HighlightFilter)
|
||||
@@ -8,7 +8,7 @@ body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Do Hyeon", "Source Code Pro", Monaco, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
@@ -117,6 +117,105 @@ html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
// Embedded mode styles
|
||||
.embedded-mode .site-header,
|
||||
.embedded-mode .site-footer,
|
||||
.embedded-mode .lab-footer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.embedded-mode main {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Site header styles
|
||||
.site-header {
|
||||
background-color: var(--navbg-color);
|
||||
border-bottom: 1px solid var(--panelborder-color);
|
||||
}
|
||||
|
||||
.site-header .wrapper {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
color: var(--navfg-color);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
font-family: "Do Hyeon", "Source Code Pro", Monaco, monospace;
|
||||
}
|
||||
|
||||
.site-title:hover {
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
display: none;
|
||||
color: var(--navfg-color);
|
||||
font-size: 1.2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.trigger {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
color: var(--navfg-color);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.page-link:hover {
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Site footer styles
|
||||
.site-footer {
|
||||
background-color: var(--panelbg-color);
|
||||
border-top: 1px solid var(--panelborder-color);
|
||||
padding: 2rem 0;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.site-footer .wrapper {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
color: var(--fg-color);
|
||||
opacity: 0.8;
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.footer-text a {
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer-text a:hover {
|
||||
color: var(--primary-btnhov-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
// Navigation styles
|
||||
.navbar {
|
||||
background-color: var(--navbg-color) !important;
|
||||
@@ -339,12 +438,56 @@ h1.user_handle, h1.team_name {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.difficulty, .duration {
|
||||
.author, .license {
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--fg-color);
|
||||
font-weight: 500;
|
||||
opacity: 0.7;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.author strong, .license strong {
|
||||
color: var(--fg-color);
|
||||
font-weight: 600;
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.cybok {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.cybok strong {
|
||||
color: var(--fg-color);
|
||||
font-weight: 600;
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.cybok-ka {
|
||||
display: inline-block;
|
||||
// background-color: var(--primary-btnhov-color);
|
||||
// color: white;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 100px;
|
||||
font-size: 0.5rem;
|
||||
font-weight: 500;
|
||||
margin: 0.125rem 0.25rem 0.125rem 0;
|
||||
border: 1px solid var(--primary-btnbg-color);
|
||||
}
|
||||
|
||||
.cybok-keyword {
|
||||
display: inline-block;
|
||||
// background-color: var(--primary-btnbg-color);
|
||||
// color: white;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 100px;
|
||||
font-size: 0.5rem;
|
||||
font-weight: 500;
|
||||
margin: 0.125rem 0.25rem 0.125rem 0;
|
||||
border: 1px solid var(--primary-btnbg-color);
|
||||
}
|
||||
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
@@ -352,11 +495,11 @@ h1.user_handle, h1.team_name {
|
||||
}
|
||||
|
||||
.tag {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
// background-color: var(--primary-btnbg-color);
|
||||
// color: white;
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: 12px;
|
||||
font-size: 0.75rem;
|
||||
font-size: 0.5rem;
|
||||
border: 1px solid var(--primary-btnbg-color);
|
||||
}
|
||||
|
||||
@@ -493,6 +636,43 @@ h1.user_handle, h1.team_name {
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
// Mobile header styles
|
||||
.site-header .wrapper {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.trigger {
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-link {
|
||||
padding: 0.5rem;
|
||||
border-radius: 4px;
|
||||
background-color: var(--panelbg-color);
|
||||
}
|
||||
|
||||
// Mobile footer styles
|
||||
.site-footer {
|
||||
padding: 1.5rem 0;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Print styles
|
||||
@@ -549,9 +729,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
// Code blocks
|
||||
pre, code {
|
||||
background-color: var(--highlight-color);
|
||||
border: 1px solid var(--panelborder-color);
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
color: var(--fg-color);
|
||||
}
|
||||
|
||||
code {
|
||||
@@ -560,6 +738,8 @@ code {
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid var(--panelborder-color);
|
||||
border-radius: 4px;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
@@ -568,18 +748,104 @@ pre {
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 1rem 0;
|
||||
margin: 1.5rem 0;
|
||||
background-color: var(--panelbg-color);
|
||||
border: 1px solid var(--panelborder-color);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid var(--panelborder-color);
|
||||
padding: 0.5rem;
|
||||
padding: 0.75rem 1rem;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: var(--panel-headbg-color);
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
border-bottom: 2px solid var(--primary-btnbg-color);
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: var(--panelbg-color);
|
||||
color: var(--fg-color);
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
// Alternating row colors for better readability
|
||||
tbody tr:nth-child(even) td {
|
||||
background-color: var(--highlight-color);
|
||||
}
|
||||
|
||||
tbody tr:nth-child(odd) td {
|
||||
background-color: var(--panelbg-color);
|
||||
}
|
||||
|
||||
// Hover effects
|
||||
tbody tr:hover td {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
// Dark mode specific table adjustments
|
||||
[data-theme="dark"] table {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
[data-theme="dark"] tbody tr:nth-child(even) td {
|
||||
background-color: #2a2a2a;
|
||||
}
|
||||
|
||||
[data-theme="dark"] tbody tr:nth-child(odd) td {
|
||||
background-color: var(--panelbg-color);
|
||||
}
|
||||
|
||||
[data-theme="dark"] tbody tr:hover td {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Light mode specific table adjustments
|
||||
[data-theme="light"] table {
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
[data-theme="light"] tbody tr:nth-child(even) td {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
[data-theme="light"] tbody tr:nth-child(odd) td {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
[data-theme="light"] tbody tr:hover td {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Responsive table styling
|
||||
@media (max-width: 767px) {
|
||||
table {
|
||||
font-size: 0.8rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 0.5rem 0.75rem;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Blockquote styles
|
||||
@@ -610,7 +876,6 @@ blockquote {
|
||||
.action-item::before {
|
||||
content: "⚡ ";
|
||||
font-weight: bold;
|
||||
color: var(--primary-btnbg-color);
|
||||
}
|
||||
|
||||
.warning-item {
|
||||
@@ -673,6 +938,96 @@ blockquote {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tip-item {
|
||||
// background-color: var(--alert-infobg-color);
|
||||
border: 1px solid var(--alert-infoborder-color);
|
||||
border-left: 4px solid #17a2b8;
|
||||
border-radius: 4px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
color: var(--alert-infofg-color);
|
||||
}
|
||||
|
||||
.tip-item h1, .tip-item h2, .tip-item h3, .tip-item h4, .tip-item h5, .tip-item h6 {
|
||||
color: var(--alert-infofg-color);
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.tip-item::before {
|
||||
content: "💡 ";
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.note-item {
|
||||
// border: 1px solid #dee2e6;
|
||||
border-left: 4px solid var(--primary-btnbg-color);
|
||||
border-radius: 4px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
color: #495057;
|
||||
}
|
||||
|
||||
.note-item h1, .note-item h2, .note-item h3, .note-item h4, .note-item h5, .note-item h6 {
|
||||
color: #495057;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// .note-item::before {
|
||||
// content: "📝 ";
|
||||
// font-weight: bold;
|
||||
// }
|
||||
|
||||
[data-theme="dark"] .note-item {
|
||||
border-color: #495057;
|
||||
border-left-color: var(--primary-btnbg-color);;
|
||||
color: #e9ecef;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .note-item h1,
|
||||
[data-theme="dark"] .note-item h2,
|
||||
[data-theme="dark"] .note-item h3,
|
||||
[data-theme="dark"] .note-item h4,
|
||||
[data-theme="dark"] .note-item h5,
|
||||
[data-theme="dark"] .note-item h6 {
|
||||
color: #e9ecef;
|
||||
}
|
||||
|
||||
.hint-item {
|
||||
background-color: #d4edda;
|
||||
border: 1px solid #c3e6cb;
|
||||
border-left: 4px solid #28a745;
|
||||
border-radius: 4px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
.hint-item h1, .hint-item h2, .hint-item h3, .hint-item h4, .hint-item h5, .hint-item h6 {
|
||||
color: #155724;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.hint-item::before {
|
||||
content: "💭 ";
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .hint-item {
|
||||
background-color: #1e7e34;
|
||||
border-color: #28a745;
|
||||
border-left-color: #28a745;
|
||||
color: #d4edda;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .hint-item h1,
|
||||
[data-theme="dark"] .hint-item h2,
|
||||
[data-theme="dark"] .hint-item h3,
|
||||
[data-theme="dark"] .hint-item h4,
|
||||
[data-theme="dark"] .hint-item h5,
|
||||
[data-theme="dark"] .hint-item h6 {
|
||||
color: #d4edda;
|
||||
}
|
||||
|
||||
// Inline action styling
|
||||
.action-text {
|
||||
background-color: var(--primary-btnbg-color);
|
||||
@@ -687,8 +1042,8 @@ blockquote {
|
||||
}
|
||||
|
||||
// Markdown highlight syntax support
|
||||
mark, .highlight-text {
|
||||
background-color: #ffeb3b;
|
||||
mark, .highlight-text{
|
||||
background-color: #f0ad4e;
|
||||
color: #000;
|
||||
padding: 0.1rem 0.2rem;
|
||||
border-radius: 2px;
|
||||
@@ -697,6 +1052,141 @@ mark, .highlight-text {
|
||||
|
||||
[data-theme="dark"] mark,
|
||||
[data-theme="dark"] .highlight-text {
|
||||
background-color: #ffc107;
|
||||
background-color: #f0ad4e;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
// Specific highlight types
|
||||
.action-highlight {
|
||||
background-color: #e3f2fd;
|
||||
color: #1565c0;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #2196f3;
|
||||
font-weight: 500;
|
||||
margin: 0.1rem 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .action-highlight {
|
||||
background-color: #1a237e;
|
||||
color: #90caf9;
|
||||
border-left-color: #64b5f6;
|
||||
}
|
||||
|
||||
.tip-highlight {
|
||||
background-color: #f3e5f5;
|
||||
color: #7b1fa2;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #9c27b0;
|
||||
font-weight: 500;
|
||||
display: inline;
|
||||
margin: 0.1rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .tip-highlight {
|
||||
background-color: #4a148c;
|
||||
color: #ce93d8;
|
||||
border-left-color: #ba68c8;
|
||||
}
|
||||
|
||||
.hint-highlight {
|
||||
background-color: #e8f5e8;
|
||||
color: #2e7d32;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #4caf50;
|
||||
font-weight: 500;
|
||||
display: inline;
|
||||
margin: 0.1rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .hint-highlight {
|
||||
background-color: #1b5e20;
|
||||
color: #a5d6a7;
|
||||
border-left-color: #81c784;
|
||||
}
|
||||
|
||||
.note-highlight {
|
||||
background-color: #f5f5f5;
|
||||
color: #424242;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #9e9e9e;
|
||||
font-weight: 500;
|
||||
display: inline;
|
||||
margin: 0.1rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .note-highlight {
|
||||
background-color: #424242;
|
||||
color: #e0e0e0;
|
||||
border-left-color: #9e9e9e;
|
||||
}
|
||||
|
||||
.warning-highlight {
|
||||
background-color: #fff3e0;
|
||||
color: #ef6c00;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #ff9800;
|
||||
font-weight: 500;
|
||||
display: inline;
|
||||
margin: 0.1rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .warning-highlight {
|
||||
background-color: #e65100;
|
||||
color: #ffb74d;
|
||||
border-left-color: #ffb74d;
|
||||
}
|
||||
|
||||
.vm-highlight {
|
||||
background-color: #e1f5fe;
|
||||
color: #0277bd;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid #0288d1;
|
||||
font-weight: 500;
|
||||
display: inline-block;
|
||||
margin: 0.1rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .vm-highlight {
|
||||
background-color: #01579b;
|
||||
color: #81d4fa;
|
||||
border-left-color: #29b6f6;
|
||||
}
|
||||
|
||||
.language-bash {
|
||||
font-family: "Source Code Pro", Monaco, monospace !important;
|
||||
// background-color: #f0ad4e;
|
||||
color: var(--fg-color);
|
||||
padding: 0.1rem 0.2rem;
|
||||
// border-radius: 2px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// Add terminal icon above bash code blocks
|
||||
.language-bash::before {
|
||||
content: ">_ ";
|
||||
font-size: 1em;
|
||||
margin-right: 0.5rem;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-family: "Cute Font", "Source Code Pro", Monaco, monospace;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: var(--link-color);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--primary-btnhov-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -105,32 +105,32 @@ a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Code */
|
||||
code {
|
||||
background-color: #f6f8fa;
|
||||
color: #24292e;
|
||||
padding: 0.125rem 0.25rem;
|
||||
border-radius: 3px;
|
||||
font-size: 0.875rem;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
}
|
||||
// /* Code */
|
||||
// code {
|
||||
// background-color: #f6f8fa;
|
||||
// color: #24292e;
|
||||
// padding: 0.125rem 0.25rem;
|
||||
// border-radius: 3px;
|
||||
// font-size: 0.875rem;
|
||||
// font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
// }
|
||||
|
||||
pre {
|
||||
background-color: #f6f8fa;
|
||||
color: #24292e;
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
// pre {
|
||||
// background-color: #f6f8fa;
|
||||
// color: #24292e;
|
||||
// padding: 1rem;
|
||||
// border-radius: 6px;
|
||||
// overflow-x: auto;
|
||||
// font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
// font-size: 0.875rem;
|
||||
// line-height: 1.45;
|
||||
// }
|
||||
|
||||
pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
// pre code {
|
||||
// background-color: transparent;
|
||||
// padding: 0;
|
||||
// border-radius: 0;
|
||||
// }
|
||||
|
||||
/* Lists */
|
||||
ul, ol {
|
||||
|
||||
183
assets/images/hacktivity-logo.svg
Normal file
183
assets/images/hacktivity-logo.svg
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="41.199425mm"
|
||||
height="10.301043mm"
|
||||
viewBox="0 0 41.199425 10.301043"
|
||||
version="1.1"
|
||||
id="svg1014"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="hacktivity-logo.svg">
|
||||
<defs
|
||||
id="defs1008" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.979899"
|
||||
inkscape:cx="50.269636"
|
||||
inkscape:cy="-199.89381"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="text870"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1080"
|
||||
inkscape:window-height="1855"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata1011">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-1.3229067,-4.5875722)">
|
||||
<g
|
||||
transform="translate(-10.505928,-117.0458)"
|
||||
id="g882">
|
||||
<g
|
||||
aria-label="Hacktivity"
|
||||
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#dda0dd;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text870">
|
||||
<path
|
||||
d="m 16.824168,128.84062 h -1.3335 v -3.00566 h -2.31775 v 3.00566 h -1.344083 v -7.20725 h 1.344083 v 2.99509 h 2.31775 v -2.99509 h 1.3335 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1592" />
|
||||
<path
|
||||
d="m 17.643384,125.15762 q 0.03175,-0.33866 0.148167,-0.64558 0.127,-0.30692 0.359833,-0.53975 0.232833,-0.23283 0.582083,-0.37042 0.34925,-0.14816 0.804333,-0.14816 h 0.635 q 0.47625,0 0.8255,0.15875 0.359834,0.15875 0.592667,0.42333 0.232833,0.254 0.34925,0.59267 0.116417,0.32808 0.116417,0.66675 v 3.54541 h -3.005667 q -0.34925,0 -0.624417,-0.127 -0.275166,-0.13758 -0.465666,-0.34925 -0.179917,-0.22225 -0.275167,-0.51858 -0.08467,-0.29633 -0.08467,-0.635 0,-0.32808 0.09525,-0.61383 0.09525,-0.28575 0.275166,-0.48684 0.179917,-0.21166 0.4445,-0.32808 0.275167,-0.127 0.613833,-0.127 h 1.80975 v -0.10583 q 0,-0.1905 -0.03175,-0.34925 -0.03175,-0.16934 -0.116416,-0.28575 -0.08467,-0.11642 -0.254,-0.17992 -0.169334,-0.0741 -0.455084,-0.0741 h -0.264583 q -0.423333,0 -0.60325,0.127 -0.179917,0.11641 -0.243417,0.37041 z m 1.090083,2.05317 q 0,0.27517 0.105833,0.41275 0.116417,0.127 0.254,0.127 h 1.74625 v -1.0795 H 19.0933 q -0.137583,0 -0.254,0.13758 -0.105833,0.13759 -0.105833,0.40217 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1594" />
|
||||
<path
|
||||
d="m 25.119186,127.62354 q 0.254,0 0.433916,-0.11642 0.179917,-0.127 0.232834,-0.33866 h 1.259416 q -0.09525,0.762 -0.592666,1.21708 -0.497417,0.45508 -1.3335,0.45508 h -0.433917 q -0.455083,0 -0.8255,-0.13758 -0.370417,-0.13758 -0.624417,-0.39158 -0.254,-0.26459 -0.402166,-0.62442 -0.137584,-0.37042 -0.137584,-0.81492 v -1.44991 q 0,-0.45509 0.137584,-0.81492 0.148166,-0.35983 0.402166,-0.61383 0.254,-0.254 0.624417,-0.39159 0.370417,-0.14816 0.8255,-0.14816 h 0.433917 q 0.85725,0 1.354666,0.45508 0.497417,0.45508 0.5715,1.24883 h -1.248833 q -0.0635,-0.23283 -0.232833,-0.35983 -0.169334,-0.127 -0.4445,-0.127 h -0.433917 q -0.338667,0 -0.560917,0.22225 -0.211666,0.21167 -0.211666,0.56092 v 1.37583 q 0,0.34925 0.211666,0.5715 0.22225,0.22225 0.560917,0.22225 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1596" />
|
||||
<path
|
||||
d="m 32.137754,128.84062 h -1.396999 l -1.820334,-2.05316 v 2.05316 h -1.248833 v -7.20725 h 1.248833 v 3.52425 l 1.7145,-1.70391 h 1.471083 l -2.592916,2.48708 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1598" />
|
||||
<path
|
||||
d="m 32.337184,123.45371 h 0.994833 v -1.82034 h 1.248833 v 1.82034 h 0.994834 v 1.21708 H 34.58085 v 4.16983 h -1.248833 v -4.16983 h -0.994833 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1600" />
|
||||
<path
|
||||
d="M 37.457863,128.84062 H 36.20903 v -5.38691 h 1.248833 z m 0,-5.969 H 36.20903 v -1.23825 h 1.248833 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1602" />
|
||||
<path
|
||||
d="M 40.866523,128.84062 H 39.68119 l -1.629833,-5.38691 h 1.17475 l 1.037166,3.41841 1.005417,-3.41841 h 1.185333 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1604" />
|
||||
<path
|
||||
d="m 44.382506,128.84062 h -1.248833 v -5.38691 h 1.248833 z m 0,-5.969 h -1.248833 v -1.23825 h 1.248833 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1606" />
|
||||
<path
|
||||
d="m 45.028914,123.45371 h 0.994833 v -1.82034 h 1.248834 v 1.82034 h 0.994833 v 1.21708 h -0.994833 v 4.16983 h -1.248834 v -4.16983 h -0.994833 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1608" />
|
||||
<path
|
||||
d="m 50.879844,130.68212 h -1.164167 l 0.53975,-1.86266 -1.629833,-5.36575 h 1.17475 l 1.026583,3.43958 1.016,-3.43958 h 1.185333 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';fill:#dda0dd;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1610" />
|
||||
</g>
|
||||
<g
|
||||
aria-label="Cyber Security Labs"
|
||||
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text874">
|
||||
<path
|
||||
d="m 16.209688,130.95581 q 0.09719,0 0.140758,-0.057 0.04692,-0.0603 0.07038,-0.14411 h 0.422275 q -0.01341,0.124 -0.06368,0.23459 -0.05027,0.10725 -0.134055,0.18768 -0.08043,0.0804 -0.194381,0.12735 -0.110596,0.0469 -0.237949,0.0469 H 15.92482 q -0.134056,0 -0.254706,-0.0503 -0.12065,-0.0536 -0.211137,-0.14411 -0.09049,-0.0905 -0.14411,-0.21114 -0.05027,-0.12065 -0.05027,-0.25805 v -0.9518 q 0,-0.1374 0.05027,-0.25805 0.05362,-0.12401 0.14411,-0.21449 0.09049,-0.0905 0.211137,-0.14076 0.12065,-0.0536 0.254706,-0.0536 h 0.288219 q 0.130705,0 0.2413,0.0469 0.110596,0.0469 0.19103,0.1307 0.08378,0.0804 0.134055,0.19103 0.05027,0.1106 0.06368,0.23795 h -0.422275 q -0.01676,-0.0871 -0.06368,-0.14746 -0.04692,-0.0603 -0.147461,-0.0603 h -0.281517 q -0.117298,0 -0.187677,0.0838 -0.06703,0.0838 -0.06703,0.20443 v 0.90823 q 0,0.12065 0.06703,0.20778 0.07038,0.0838 0.187677,0.0838 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1613" />
|
||||
<path
|
||||
d="m 18.051337,131.93441 h -0.368653 l 0.170921,-0.58984 -0.516114,-1.69915 h 0.372004 l 0.325085,1.0892 0.321733,-1.0892 h 0.375356 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1615" />
|
||||
<path
|
||||
d="m 19.965145,129.64542 q 0.147461,0 0.261409,0.0469 0.117298,0.0436 0.197732,0.124 0.08378,0.0804 0.127352,0.19438 0.04357,0.11394 0.04357,0.25805 v 0.45914 q 0,0.14076 -0.04357,0.25806 -0.04357,0.11395 -0.127352,0.19773 -0.08043,0.0804 -0.197732,0.124 -0.113948,0.0436 -0.261409,0.0436 H 19.83109 q -0.147461,0 -0.26476,-0.0436 -0.113947,-0.0436 -0.197732,-0.124 -0.08043,-0.0838 -0.124001,-0.19773 -0.04357,-0.1173 -0.04357,-0.25806 v -0.45914 -0.0268 -1.17298 h 0.395464 v 0.62 q 0.124001,-0.0436 0.261408,-0.0436 z m -0.134055,0.38541 q -0.107245,0 -0.170921,0.067 -0.06032,0.067 -0.06368,0.17092 v 0.44574 q 0,0.11059 0.06368,0.18097 0.06368,0.0704 0.170921,0.0704 h 0.134055 q 0.107245,0 0.174273,-0.0704 0.06703,-0.0704 0.06703,-0.18097 v -0.43568 q 0,-0.1106 -0.06703,-0.17763 -0.06703,-0.0704 -0.174273,-0.0704 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1617" />
|
||||
<path
|
||||
d="m 21.141701,130.25202 q 0,-0.124 0.04692,-0.23125 0.04692,-0.11059 0.124002,-0.19438 0.07708,-0.0838 0.177623,-0.1307 0.100542,-0.0503 0.201083,-0.0503 h 0.382059 q 0.130704,0 0.231246,0.057 0.103893,0.0536 0.17092,0.14076 0.07038,0.0838 0.107245,0.19103 0.04022,0.10389 0.04022,0.20443 v 0.43233 h -1.08585 v 0.0905 q 0,0.12065 0.06703,0.17092 0.06703,0.0503 0.177624,0.0503 h 0.780874 v 0.37536 h -0.86801 q -0.113947,0 -0.214489,-0.0436 -0.100542,-0.0469 -0.177624,-0.124 -0.07373,-0.0771 -0.117298,-0.18433 -0.04357,-0.10724 -0.04357,-0.2346 z m 0.398815,0.10054 h 0.693737 v -0.0168 q 0,-0.1307 -0.06703,-0.21449 -0.06703,-0.0871 -0.180975,-0.0871 h -0.207786 q -0.05362,0 -0.09719,0.0268 -0.04357,0.0235 -0.07373,0.0637 -0.03016,0.0402 -0.05027,0.0972 -0.01676,0.0536 -0.01676,0.11395 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1619" />
|
||||
<path
|
||||
d="m 23.610321,129.99396 q 0.04692,-0.0771 0.124001,-0.13406 0.08043,-0.0603 0.174272,-0.10054 0.09719,-0.0402 0.204435,-0.0603 0.107245,-0.0201 0.214489,-0.0201 h 0.04357 v 0.41557 h -0.04357 q -0.12065,0 -0.248003,0.0503 -0.127353,0.0469 -0.234597,0.12736 -0.103893,0.0771 -0.170921,0.17427 -0.06368,0.0972 -0.06368,0.19438 v 0.71049 h -0.415572 v -1.71926 h 0.415572 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1621" />
|
||||
<path
|
||||
d="m 27.545863,129.93699 q 0.140758,0 0.261408,0.0536 0.124002,0.0536 0.211138,0.15081 0.09049,0.0938 0.137407,0.2279 0.05027,0.1307 0.05027,0.28822 0,0.14746 -0.04692,0.27481 -0.04357,0.12735 -0.127353,0.22119 -0.08378,0.0905 -0.197732,0.14411 -0.113947,0.0536 -0.254705,0.0536 H 26.540446 V 130.929 h 0.918281 q 0.06703,0 0.127353,-0.0168 0.06368,-0.0168 0.107244,-0.0503 0.04357,-0.0335 0.07038,-0.0838 0.02681,-0.0503 0.02681,-0.12065 0,-0.13071 -0.08714,-0.20444 -0.08378,-0.0737 -0.211137,-0.0737 h -0.271463 q -0.170921,0 -0.311679,-0.0369 -0.140758,-0.0369 -0.237949,-0.11729 -0.09719,-0.0804 -0.150812,-0.20779 -0.05362,-0.12735 -0.05362,-0.30498 0,-0.124 0.04357,-0.2413 0.04357,-0.1173 0.12065,-0.20443 0.07708,-0.0905 0.187678,-0.14411 0.110595,-0.0536 0.244651,-0.0536 h 0.94174 v 0.44573 h -0.767468 q -0.06703,0 -0.124001,0.0101 -0.05697,0.007 -0.100542,0.0302 -0.04357,0.0201 -0.06703,0.0637 -0.02346,0.0436 -0.02346,0.1173 0,0.0838 0.05697,0.14411 0.05697,0.057 0.154164,0.057 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1623" />
|
||||
<path
|
||||
d="m 28.741375,130.25202 q 0,-0.124 0.04692,-0.23125 0.04692,-0.11059 0.124002,-0.19438 0.07708,-0.0838 0.177623,-0.1307 0.100542,-0.0503 0.201084,-0.0503 h 0.382058 q 0.130704,0 0.231246,0.057 0.103893,0.0536 0.170921,0.14076 0.07038,0.0838 0.107244,0.19103 0.04022,0.10389 0.04022,0.20443 v 0.43233 h -1.08585 v 0.0905 q 0,0.12065 0.06703,0.17092 0.06703,0.0503 0.177623,0.0503 h 0.780874 v 0.37536 h -0.86801 q -0.113947,0 -0.214489,-0.0436 -0.100541,-0.0469 -0.177623,-0.124 -0.07373,-0.0771 -0.117299,-0.18433 -0.04357,-0.10724 -0.04357,-0.2346 z m 0.398815,0.10054 h 0.693738 v -0.0168 q 0,-0.1307 -0.06703,-0.21449 -0.06703,-0.0871 -0.180975,-0.0871 h -0.207786 q -0.05362,0 -0.09719,0.0268 -0.04357,0.0235 -0.07373,0.0637 -0.03016,0.0402 -0.05027,0.0972 -0.01676,0.0536 -0.01676,0.11395 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1625" />
|
||||
<path
|
||||
d="m 31.491511,130.96586 q 0.08043,0 0.137407,-0.0369 0.05697,-0.0402 0.07373,-0.10725 h 0.398815 q -0.03016,0.2413 -0.187678,0.38541 -0.157515,0.14411 -0.422275,0.14411 h -0.137407 q -0.144109,0 -0.261408,-0.0436 -0.117299,-0.0436 -0.197732,-0.124 -0.08043,-0.0838 -0.127353,-0.19773 -0.04357,-0.1173 -0.04357,-0.25806 v -0.45914 q 0,-0.14411 0.04357,-0.25805 0.04692,-0.11395 0.127353,-0.19438 0.08043,-0.0804 0.197732,-0.124 0.117299,-0.0469 0.261408,-0.0469 h 0.137407 q 0.271463,0 0.428978,0.14411 0.157515,0.14411 0.180975,0.39546 H 31.706 q -0.02011,-0.0737 -0.07373,-0.11395 -0.05362,-0.0402 -0.140759,-0.0402 h -0.137407 q -0.107244,0 -0.177623,0.0704 -0.06703,0.067 -0.06703,0.17763 v 0.43568 q 0,0.11059 0.06703,0.18097 0.07038,0.0704 0.177623,0.0704 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1627" />
|
||||
<path
|
||||
d="m 33.357929,130.96921 q 0.08378,0 0.134056,-0.0201 0.05362,-0.0201 0.08378,-0.0536 0.03351,-0.0335 0.04692,-0.0804 0.0134,-0.0469 0.0134,-0.10054 v -1.06909 h 0.392113 v 1.70585 h -0.392113 v -0.0436 q -0.05362,0.0235 -0.117298,0.0335 -0.06032,0.0101 -0.130704,0.0101 h -0.170921 q -0.150813,0 -0.26476,-0.0503 -0.110596,-0.0503 -0.184326,-0.1307 -0.07373,-0.0838 -0.113948,-0.18768 -0.03686,-0.10724 -0.03686,-0.21449 v -1.12271 h 0.388761 v 1.04228 q 0,0.0603 0.01005,0.11059 0.01006,0.0503 0.04022,0.0905 0.03016,0.0369 0.08379,0.0603 0.05362,0.0201 0.14411,0.0201 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1629" />
|
||||
<path
|
||||
d="m 35.032742,129.99396 q 0.04692,-0.0771 0.124001,-0.13406 0.08043,-0.0603 0.174272,-0.10054 0.09719,-0.0402 0.204435,-0.0603 0.107245,-0.0201 0.214489,-0.0201 h 0.04357 v 0.41557 h -0.04357 q -0.12065,0 -0.248003,0.0503 -0.127353,0.0469 -0.234597,0.12736 -0.103893,0.0771 -0.170921,0.17427 -0.06368,0.0972 -0.06368,0.19438 v 0.71049 H 34.61717 v -1.71926 h 0.415572 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1631" />
|
||||
<path
|
||||
d="m 36.757093,131.35127 h -0.395464 v -1.70585 h 0.395464 z m 0,-1.89018 h -0.395464 v -0.39211 h 0.395464 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1633" />
|
||||
<path
|
||||
d="m 37.279288,129.64542 h 0.31503 v -0.57644 h 0.395464 v 0.57644 h 0.315031 v 0.38541 h -0.315031 v 1.32044 h -0.395464 v -1.32044 h -0.31503 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1635" />
|
||||
<path
|
||||
d="M 39.449583,131.93441 H 39.08093 l 0.170921,-0.58984 -0.516114,-1.69915 h 0.372004 l 0.325085,1.0892 0.321733,-1.0892 h 0.375356 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1637" />
|
||||
<path
|
||||
d="m 42.572517,130.96586 h 1.236663 v 0.38541 h -1.638829 v -2.28229 h 0.402166 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1639" />
|
||||
<path
|
||||
d="m 44.323523,130.18499 q 0.01005,-0.10725 0.04692,-0.20444 0.04022,-0.0972 0.113947,-0.17092 0.07373,-0.0737 0.184326,-0.11729 0.110596,-0.0469 0.254706,-0.0469 h 0.201083 q 0.150813,0 0.261408,0.0503 0.113948,0.0503 0.187678,0.13405 0.07373,0.0804 0.110596,0.18768 0.03686,0.10389 0.03686,0.21114 v 1.12271 h -0.951794 q -0.110596,0 -0.197732,-0.0402 -0.08714,-0.0436 -0.147461,-0.1106 -0.05697,-0.0704 -0.08714,-0.16422 -0.02681,-0.0938 -0.02681,-0.20108 0,-0.10389 0.03016,-0.19438 0.03016,-0.0905 0.08714,-0.15417 0.05697,-0.067 0.140759,-0.10389 0.08714,-0.0402 0.19438,-0.0402 h 0.573088 v -0.0335 q 0,-0.0603 -0.01005,-0.1106 -0.01005,-0.0536 -0.03687,-0.0905 -0.02681,-0.0369 -0.08043,-0.057 -0.05362,-0.0235 -0.14411,-0.0235 h -0.08378 q -0.134055,0 -0.191029,0.0402 -0.05697,0.0369 -0.07708,0.1173 z m 0.345193,0.65017 q 0,0.0871 0.03351,0.1307 0.03686,0.0402 0.08043,0.0402 h 0.55298 v -0.34184 h -0.55298 q -0.04357,0 -0.08043,0.0436 -0.03351,0.0436 -0.03351,0.12735 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1641" />
|
||||
<path
|
||||
d="m 47.041874,129.64542 q 0.147461,0 0.261408,0.0469 0.117299,0.0436 0.197732,0.124 0.08378,0.0804 0.127353,0.19438 0.04357,0.11394 0.04357,0.25805 v 0.45914 q 0,0.14076 -0.04357,0.25806 -0.04357,0.11395 -0.127353,0.19773 -0.08043,0.0804 -0.197732,0.124 -0.113947,0.0436 -0.261408,0.0436 h -0.134056 q -0.147461,0 -0.26476,-0.0436 -0.113947,-0.0436 -0.197732,-0.124 -0.08043,-0.0838 -0.124001,-0.19773 -0.04357,-0.1173 -0.04357,-0.25806 v -0.45914 -0.0268 -1.17298 h 0.395464 v 0.62 q 0.124001,-0.0436 0.261408,-0.0436 z m -0.134056,0.38541 q -0.107244,0 -0.170921,0.067 -0.06032,0.067 -0.06368,0.17092 v 0.44574 q 0,0.11059 0.06368,0.18097 0.06368,0.0704 0.170921,0.0704 h 0.134056 q 0.107244,0 0.174272,-0.0704 0.06703,-0.0704 0.06703,-0.18097 v -0.43568 q 0,-0.1106 -0.06703,-0.17763 -0.06703,-0.0704 -0.174272,-0.0704 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1643" />
|
||||
<path
|
||||
d="m 49.431633,129.9772 h -0.666926 q -0.04357,0 -0.07373,0.0168 -0.02681,0.0134 -0.04692,0.0402 -0.02011,0.0268 -0.03016,0.0603 -0.01005,0.0302 -0.01005,0.0603 0,0.0637 0.04022,0.1173 0.04357,0.0503 0.103893,0.0503 h 0.375355 q 0.117299,0 0.204435,0.0402 0.09049,0.0402 0.147461,0.1106 0.06032,0.0704 0.08714,0.16757 0.03016,0.0972 0.03016,0.20778 v 0.0101 q 0,0.11059 -0.03686,0.20108 -0.03351,0.0905 -0.09719,0.15417 -0.06368,0.0637 -0.150812,0.10054 -0.08714,0.0369 -0.184327,0.0369 h -0.811036 v -0.33178 h 0.697089 q 0.07708,0 0.140759,-0.0436 0.06703,-0.0436 0.07038,-0.13071 v 0.003 q 0,-0.0503 -0.02011,-0.0838 -0.01676,-0.0335 -0.04692,-0.0536 -0.03016,-0.0235 -0.06703,-0.0335 -0.03687,-0.0101 -0.07708,-0.0101 h -0.301625 q -0.147461,0 -0.244651,-0.0469 -0.09384,-0.0469 -0.150813,-0.12065 -0.05362,-0.0737 -0.07373,-0.16757 -0.02011,-0.0938 -0.02011,-0.19103 0,-0.10054 0.03016,-0.19438 0.03016,-0.0938 0.08714,-0.16422 0.06032,-0.0737 0.147461,-0.11394 0.08714,-0.0402 0.197732,-0.0402 h 0.750711 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.35138893px;font-family:'Do Hyeon';-inkscape-font-specification:'Do Hyeon';letter-spacing:0.3175px;fill:#f5f5f5;fill-opacity:1;stroke-width:0.26458332px"
|
||||
id="path1645" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 23 KiB |
68
index.md
68
index.md
@@ -25,11 +25,23 @@ Welcome to the Hacktivity SecGen lab sheets repository. This site contains hands
|
||||
<h3><a href="{{ lab.url | relative_url }}">{{ lab.title }}</a></h3>
|
||||
<p class="lab-description">{{ lab.description | default: lab.excerpt }}</p>
|
||||
<div class="lab-meta">
|
||||
{% if lab.difficulty %}
|
||||
<span class="difficulty">Difficulty: {{ lab.difficulty }}</span>
|
||||
{% if lab.author %}
|
||||
<div class="author">
|
||||
<strong>Author:</strong> {{ lab.author }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if lab.duration %}
|
||||
<span class="duration">Duration: {{ lab.duration }}</span>
|
||||
{% if lab.license %}
|
||||
<div class="license">
|
||||
<strong>License:</strong> {{ lab.license }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if lab.cybok %}
|
||||
<div class="cybok">
|
||||
<strong>CyBOK Knowledge Areas:</strong>
|
||||
{% for cybok_item in lab.cybok %}
|
||||
<span class="cybok-ka">{{ cybok_item.ka }}: {{ cybok_item.topic }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if lab.tags %}
|
||||
<div class="tags">
|
||||
@@ -107,8 +119,52 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const contentBody = document.querySelector('.lab-list');
|
||||
if (contentBody) {
|
||||
// Replace ==text== with <mark>text</mark>
|
||||
// Replace specific highlight types first
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==action:\s*([^=]+)==/gi, '<span class="action-highlight">⚡ $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==tip:\s*([^=]+)==/gi, '<span class="tip-highlight">💡 $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==hint:\s*([^=]+)==/gi, '<span class="hint-highlight">💭 $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==note:\s*([^=]+)==/gi, '<span class="note-highlight">$1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==warning:\s*([^=]+)==/gi, '<span class="warning-highlight">⚠️ $1</span>');
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==VM:\s*([^=]+)==/gi, '<span class="vm-highlight">🖥️ $1</span>');
|
||||
|
||||
// Replace generic ==text== with <mark>text</mark>
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(/==([^=]+)==/g, '<mark>$1</mark>');
|
||||
|
||||
// Replace > TIP: patterns with tip-item divs
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*<em>Tip:<\/em>\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Handle > *Tip: ANYTHINGHERE* (entire content in italics)
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*<em>Tip:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/em>\s*<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Also handle > TIP: without italics
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Tip:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="tip-item">$1</div>'
|
||||
);
|
||||
|
||||
// Handle block-level action, warning, note, hint patterns
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Action:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="action-item">$1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Warning:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="warning-item">$1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Note:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="note-item">Note: $1</div>'
|
||||
);
|
||||
contentBody.innerHTML = contentBody.innerHTML.replace(
|
||||
/<blockquote>\s*<p>\s*Hint:\s*([^<]+(?:<[^>]+>[^<]*<\/[^>]+>[^<]*)*)<\/p>\s*<\/blockquote>/gi,
|
||||
'<div class="hint-item">Hint: $1</div>'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user