Computer Engineering Computer Engineering course computer engineering Welcome to the home page for computer engineering at HPA, Spring 2025 Class description: With the advent of AI, new fields are emerging, and to prepare you for this future, you will need hands-on experience with the tools that run AI, cybersecurity, ethical hacking, and the systems these run on. Starting with building our own computer system, then expanding to include networking, hacking, machine learning, then a deep dive into the tools of AI, you will be prepared for a future we can only imagine. While some computer experience is useful, it is not required, as we will start with hardware and move into software, then into the use of AI for programming and engineering. Where traditional computer science courses focus on programming, we will cover a broader scope, with access to emerging tools and skills. Prerequisites: 9-12, semester course Level check: Know what a computer is? Code experience? Hardware in a computer ID? Built a pc before? Worked with networking or wireless? class expectations notes taken every class, emailed at end of class weblogs will be available soon to post these bring your own paper, pencil, etc. phones are left outside you have access to expensive stuff and sensitive data, AUP is in effect unless otherwise specified Start with Why: start with flying drone: Why? what is going on? at what levels? how so fast? what does it enable? how is this different from robotics? how from the internet? why do we need things to react faster than humans (chernobyl)? Mars delay? what “senses” are in this drone? It “looks” alive, what senses and reactions are biophilic? what levels or systems are in play here? motion/distance sensors, speed/load sensors, comm with pilot, visual feed, GPS, altitude. What is next? predictive, adaptive? telemetry example: elab what is measured? who cares? why trends not just a speedometer? what is actionable intelligence? what is the next level (adaptive,  predictive)? what is the range in distance, time and granularity for telemetry? what does the research on Mars delay enable here on earth (concentrators, PLC)? How do these mimic life? (ganglion). AI example: Tailwind AI server GPT4all what is on the web? written vs. scanned? since when? is there real time data in there? what is the math behind an LLM? what is indexing and embedding? what is an 8B model? how is this different from search (spotlight)? what is next? Imagine life without google, without spotlight, without command -F. What is a card catalog? where? what did it enable, and what were the limits? in person, curated? Why the big deal, hasn’t this been around already (spellcheck, grammarly, word)? what about instant translation? Social aspects: is this new? what was social media 100 years ago? what was media in general? who controlled? editors, writers, curators? encyclopedia different how? content, access, news delivery, self contributions AI in education: Data vs. knowledge vs. wisdom? do we teach process or product? Local talent: Sam, Greg, Steve, IT retirees Internet: binary, starlink-huge if true https://www.youtube.com/watch?v=Q089i8RQPB0&t=3s esri mapping AI: how it works, why is it different? Quantum computing: how it works, how is it different from classical computing? Starlink internet, cel phone metaphor, implications https://www.youtube.com/watch?v=EOPLN-MVKY4 Notes: Python C++ SQL R Hardware: BASYS3 Vivado parrot os sense HAT hifiberry DAC+ POE HAT uptime UPS nodered rpi debian/ubuntu docker MAMP Additional migrated files Files present in the Apple export but not embedded in a page: Download arduino parts.pdf (application/pdf, 102.9 KB) Download TC 1.0.pdf (application/pdf, 637.9 KB) Download Screenshot 2025-02-02 at 12.41.10 PM.png (image/png, 62.2 KB) Download Screenshot 2025-02-02 at 12.42.37 PM.png (image/png, 50.9 KB) Download arduino-ide_2.3.4_macOS_arm64.dmg.zip (application/zip, 175.5 MB) Download Screenshot 2025-04-14 at 5.33.13 PM.png (image/png, 459.8 KB) Download Screenshot 2025-04-19 at 8.29.20 AM.png (image/png, 633.5 KB) Download Screenshot 2025-04-19 at 8.32.27 AM.png (image/png, 225.3 KB) Download comp-eng terminal fun.pdf (application/pdf, 29.4 KB) Download comp-eng meter unit 2.pdf (application/pdf, 2.4 MB) Download network.png (image/png, 347.8 KB) Download TC 2.0.pdf (application/pdf, 1.5 MB) Download Screenshot 2026-03-25 at 5.56.42 AM.png (image/png, 1.9 MB) Download Screenshot 2026-03-25 at 5.59.10 AM.png (image/png, 2.0 MB) Download Screenshot 2026-04-27 at 3.18.36 PM.png (image/png, 149.1 KB) Download Screenshot 2026-04-29 at 7.21.17 AM.png (image/png, 187.9 KB) Download Screenshot 2026-04-29 at 7.51.47 AM.png (image/png, 1.3 MB) Migrated from Apple Server Wiki. Original page ID: q5v7Q1q0 VOM meter basics VOM/DVM Fluke 114: FLUKE 114 TREM.png Fluke 101: 6000.png V~ means AC voltage V-- means DC voltage (red +, black -) mV means millivolts (caution with this one) Ω means ohms ||| means sound for continuity (114) -||- means capacitor check (101) Hz means frequency (101) Part one: record your results and email along with diagrams and photos of your work test DC voltage with different batteries how can larger batteries have the same voltage? test AC voltage (V) at several outlets test V also between each AC side and ground which side of the outlet is “hot”? what color is this behind the wall? (look this up) test continuity with the sound tester on metals and plastic what makes good conductors/insulators? test Ω across your body why does this change? measure mV across your body, why does this change? test various electrical devices for resistance: lightbulbs, hot water heaters, appliances (across the cord) determine the voltage of at least three AC and three DC sources, with explanation of each (solar panel, plugs, power supplies) if available, test the voltage of the 12V battery in a non-EV car start the engine, what does this tell you? turn on the headlights, what happens? Arduino parts part: Each kit should have these. Count them out into a new bin for your next kit: Screenshot 2025-01-09 at 6.44.43 AM.png Download arduino parts.pdf (application/pdf, 102.9 KB) test jumper wires for continuity, and count them out into a new bin test the resistance of an LED forwards and backwards. Why? confirm the resistance of both resistors Don’t test the diode it will burn out measure the resistance of the potentiometer (volume control) while moving the knob. It has three wires, measure across and from the middle to the ends measure the resistance of the photoresistor in dark and light-explain look up what a piezo element is, and what it does, then find a way to test it skip the temp sensor and the transistor, you could burn them out with the meters check the motor for both resistance and voltage (only when you spin it) diagnose which terminals on the pushbutton switch do what leave the servo, relay and integrated circuit for later Full Arduino manual next: Download arduino.pdf (application/pdf, 6.4 MB) Migrated from Apple Server Wiki. Original page ID: e2B9d9w AI primer What can you do that AI cannot do? What can students do now that they could not pre-AI? Not about what AI can do, but what it cannot do... New terms: Artificial Intelligence (AI) Machine learning (ML) Neural networks: “neural nets” Artificial general intelligence (AGI) Cloud computing Quantum computing Generative AI: GPT: Generative Pre-trained Transformer Large language models (LLM) Phase I: Finger counting to AI: how did we get here? This summary was created entirely by a human, without AI Fingers: digits, counting to ten (ten fingers, ten toes) Digits to binary 1 or 0, heads or tails Symbols to binary: letters as 1 or 0 Binary + logic = computing (and/or, if/then) Cloud computing: computers elsewhere, trading 1/0 Quantum computing: no longer 1 or 0, could be any combination, parallel processing, many answers Sequential, linear brains: neural nets: potentiate what is learned, new pathways Neural nets in computing: "scoring" instead of potentiated pathways Machine learning: give it data, tell it a goal, seek that goal (chess, X-rays), recognize patterns, pattern prediction Artificial intelligence: give it huge amounts of data (e.g. the web), notice patterns, large learning models: LLMs (e.g. GPT), repeat patterns seen that match (pattern matching) generative AI like GPT: Generative Pre-trained Transformer Artificial general intelligence: learning to learn: AI + neural nets + machine learning + cloud computing + eventually quantum computing, perhaps equal or exceeding human intelligence Generative AI is a subset of machine learning in which systems are trained on massive information sets – often including personal information – to generate content such as text, computer code, images, video, or audio in response to a user prompt. This content is probabilistic, and may vary even in response to multiple uses of the same or similar prompts...:”  What these lack: Context, humor, irony, spontaneity GPT can tell you all about Athens and Sparta, but only a teacher will introduce the simile between China and the US (context). AI seems “smart” because it can combine things humans have created on request, seeing possible links (pattern matching), but only what is requested. Artificial general intelligence (AGI) will have the ability to go beyond pattern recognition, not independent thought, but flexibility not seen in AI: teaching a robot to throw a ball is very difficult, even with Machine learning (ML). Artificial general intelligence (AGI) will enable this to happen faster, with more data, and with Quantum Computing, much faster than linear brains like ours can match. TRY IT OUT—— Examples: GPT4 Make me a photo of a planet Hello, I want to learn how to code in python, how should I start? Give me a breakdown that I can understand  Explain relativity like I’m: 5 years old,  Now explain it like I'm a graduate student in physics Make me an image that represents chemistry Dolphin and human surfing SORA. https://www.youtube.com/watch?v=2fAPgOCjToA Otter on a plane: https://www.oneusefulthing.org/p/prophecies-of-the-flood?utm_source=substack&utm_medium=email#media-4977884d-b628-4b1e-b90f-d4f6403b82de Surprise yourself!  https://openai.com/ Phase II: how students see this The “new google”: faster, more direct, simpler to use Drop pdf to read, “Explain to me what this is” GPT4: “make me a photo of a planet”  Good for creating drafts, formal emails “Prompt engineering”-learning to ask-Iliad article Paraphraser-changes AI generated text into their “voice” “Show the steps” is commonly used for homework (good/bad) Three phase exploration: problem, answer, solution Create an environment where they can use the tools, and learn Example: testing at Cal Poly vs. HPA Synthesis of process and thinking, not recall AI will enhance this, not prevent it 22 year old mind in college different from 14 year old HPA student Content with context is important (only teachers can provide this) Test questions: math, science, history examples “show your work” M.D. vs. engineer: recall vs. creation Essay example: general topic, ask for central claim, outline the claim, rewrite in your voice Ideas from GPT, prose from the student Options: embrace AI essays OR separate AI assisted from pure human work Possible uses in education: Personalized study guides, homework, tutors Curated learning: teacher+AI Truly differentiated learning (advanced and those needing assistance) Educational Issues:  Only as good as the data fed in: biases (e.g. only white doctors) Statistical so there is no “zero probability”=>hallucinations College students should go into applied statistics and machine learning (ML) Prompt engineering should be required for all students HPA response: Magic School HPA Challenge: lower anxiety and fear among faculty about using AI  Simple platform with templates Collaboration with single platform (sharing) Ability to discern early-adopters. advanced users (feed the beast, teams) TRY IT OUT———  https://student.magicschool.ai/s/join?joinCode=yqoZ8Q Phase III: Past present and future what is “generative” AI? When? where it is going: large language model learning text, audio, video (SORA demo) getting smarter: all AP, SAT answers included (free) everything on google docs, amazon scanned books, libraries live images from all security cameras, videos, youtube criteria testing vs. synthesis evaluation? how can we prepare our kids? Phase IV: What is possible? Personalized study guides, homework, tutors Curated learning: teacher+AI Local GPT: Tailwind Why a local GPT server? our documents guardrails speed privacy green-solar powered! TRY IT OUT——— What’s next: RLHF Reinforcement learning with human feedback Self driving vehicles-first large mechanical impact Natural language entropy https://www.youtube.com/watch?v=5eqRuVp65eY GPT4: o1, o3=AGI? December 2024 (!) Migrated from Apple Server Wiki. Original page ID: 12E7r4 Raspberry Pi basics Raspberry Pi Debian Buster basics update to bullseye 1.25.22—— update to bullseye 9.23.23--- update to bullseye 1.14.25— What you will need: computer of some sort with a terminal application internet connection on the local area network permission from the owners of the computers you are working on permission from the system admin (Dr. Bill) to do this, at a specific time and place (so our intrusion detection system does not block you) Module 1: first steps (see notes below) download a terminal app you may need to add sudo to the front of any command at this point test the app by using the ping command to 10.14.1.4 one of the elab routers record the ping time in your notes using either ifconfig or ip addr show in terminal find your IP address write this on the board ping the other units, record your results Module 2: ssh secure shell is a means of securely accessing the command line (“terminal”) of a computer to enable ssh on your rPi, you will need to go to terminal and type sudo raspi-config find the interfacing options command select enable ssh use the command ssh 10.14.253.x or updated address to reach another rPi unit you should be “in” your pi unit now, look at the prompt from that prompt, try the ping command as you did before to the other pi units, record your results Module 3: commands from your ssh terminal, type pwd, which shows the path you are now located at, record this try the ls command, this lists the files near you in the current directory try the cd .. command, which should take you up one directory, repeat pwd and notice the difference.  cd back to the directory you were first in, likely it is /home/pi Module 4: nomachine (if no desktop access) install nomachine on your laptop connect to your pi unit right click to see the directory or file system find the folder “pi” go back to your ssh terminal and type ls in various directories, verify that they show up the same way in the folder window Module 5: nano text editor from your ssh window, in the pi directory, type: sudo nano test type some stuff hold control while typing the o key and return hold control while typing the x key and return you have just created a document in the folder, find it on the nomachine window Module 6: what’s going on? who? try these commands: top, ps, who, last, history, record your results try these commands: traceroute, ifconfig, record your results Module 7: commands, modifiers from your ssh window, try using the secret version of ls: ls -la note that all commands can have modifiers, like ls -la, l means long, a means all files try creating a new file with nano, and name it something with a period in front see if it shows up in the file manager window see if it shows up using ls -la Module 8: creating directories using your ssh window, enter the command mkdir followed by some name watch what happens in the file manager window create a text document in this new folder look up the cp, mv and rm commands using man cp and so on Module 9: update your computer, install apps using the sudo apt-get update command, update your computer use the sudo apt-get upgrade to upgrade the computer use the sudo apt-get install hardinfo -y to install hardinfo type hardinfo and record your results compare with cat /proc/cpuinfo install the wavemon program the same way, test and record Module 10: control x and control z control x means stop control z means halt, no nice manners try this with ifconfig to determine your IP addresses (wired and wireless) Migrated from Apple Server Wiki. Original page ID: 81_5165 Module 1: terminal commands Download TC 1.0.pdf (application/pdf, 637.9 KB) Module 1: Terminal first steps Using terminal on the raspberry pi: Start with ping: ping sends a data packet to a machine on the internet, and tells you how long it takes to return, like sonar try pinging 10.14.0.1 Time listed will be in milliseconds, so 1000 ms means one second ping www.apple.com Notice different ping times Stopping stuff: ctrl-c means cancel ctrl-z means halt (stop everything, not gracefully) Tracing around the internet: traceroute www.apple.com (note hops and delays) Evil stuff: ping flood attack: ping flood, only use here as a test sudo ping -f (notice that you have to use sudo, which means "superuser do" or treat me like computer god for this) What's going on in your terminal: who also whoami last last command, also the up arrow top lists all processes, useful with kill (see later) history: shows recent commands like this, useful for retracing your steps or seeing who might have been in your machine: 1 ping 10.14.0.1 2 ping www.hpa.edu 3 traceroute 4 traceroute www.hpa.edu 5 ifconfig 6 ping 10.14.252.22 7 sudo ping -f 10.14.252.22 8 last 9 who 10 ping 10.14.252.47 11 history 12 ssh pi@10.14.252.47 13 netstat 14 man netstat 15 man ping 16 history navigation commands: cd change directory, usually followed by a directory name, like "cd var/www/html/" ls list directory, see also ls -l which lists all files in long form. Try also ls -lh *human long form" ls -la lists even invisible files (the -a flag means "all") You can also hide files by adding . to the beginning pwd print working directory, shows where you are in the file system (directory) Try navigating to the desktop this way: pwd (print working directory, "where am I") ls (shows what is at this level) cd or cd .. (cd to a directory, cd .. means one level up) Here is where your desktop is: /home/pi/Desktop Shortcut: cd /home/pi/Desktop try ls and see what is there, should be nothing. Creating a directory: mkdir creates a directory mkdir test This should create a folder on your desktop called "test" click on this to see a directory browser, go nuts Permissions ls -la will show you permissions in the format drwx, for directory, read, write and execute read is 1, write is 2, execute is 4, so all added up 1+2+4 =7 chmod change "mod" or permissions of file, 777 is everything, see drwx format below and the 421 rule You may also find this under chmod u+x on a file, which means make the file or program executable Manual pages: man pages are manual pages, so "man ping" would give you manual pages on the ping command less means look into a file (contrast with "more") * means wild card, so if you want to see all files ending in jpg, you would say *.jpg Secure shell login: ssh means secure shell login, like ssh pi@10.14.88.81 Mac specific commands: fsck -yf after command-s startup (single user mode) say command after ssh login Migrated from Apple Server Wiki. Original page ID: V1v8j1 Module 2: wild cards, man pages, deleting files Module 2: wild cards, man pages, deleting files This is how wild cards work: Instead of typing out herobrine, you could type h* just make sure that nothing else matches the h part. Another example: These files are in a folder called test: malcolm mary tom if you type rm m* it will delete mary and malcolm if you type rm mal* it will delete only malcom if you type rm * it will remove everything. You can also use this to delete certain types of files (jpg, txt, mp4) rm *.jpg will remove every jpg file in the folder Now you try it: open terminal navigate to your desktop (remember, it is called Desktop) create a folder using mkdir called test navigate into that folder create three text files using sudo nano, the first will be called malcolm, then mary, then tom read each one using less or more take a screenshot of this folder from the gui (graphical user interface), command-3 takes a screen shot, command-4 is a screenshot of only what you select. copy this screenshot into your weblog, so you can remember how you did this remove one file at a time using the rm command, take more screenshots Ok, at this point, you can navigate around, login to remote computers, create and delete text files. What's next? Internet... Migrated from Apple Server Wiki. Original page ID: k5Z1E8p5 Module 3: internet Module 3: Internet Your computer needs 4 things to be able to get onto the internet: IP address, example 10.14.8.4 Subnet mask, example 255.255.0.0 Gateway/router, example 10.14.0.1 Domain name server (DNS), example 10.9.250.13 Here's what each one does: IP address: All traffic on the internet or local area network (LAN) is in the form of packets of information, like mail envelopes with a letter inside. Each letter you mail has two important things: the address you want it to go to, and the message inside the envelope. TCP/IP is the format of these, which stands for Transmission control protocol and internet protocol. The TCP part is the message, and the IP part is the envelope, with an IP address on it. Check the IP address of your machine: From the GUI: open system preferences, network From the terminal: type ifconfig Subnet mask: Imagine you want to stay in one of two large 254 room hotels. One has long hallways, and very few floors, the other has many floors, but short hallways. If you want to sleep, you don't want many people walking down the hall in front of your room. You want many floors with fewer rooms per floors. This is what subnet masking does on a network. Each of the four segments can hold 254 addresses. At home, you probably have a network that looks like this: IP: 192.168.1.49 mask: 255.255.255.0 router: 192.168.1.1 dns: 192.168.1.1 This means that the last zero can hold up to 254 addresses (from 192.168.1.1 to 192.168.1.254) HPA has this sort of mask: 255.255.0.0 which means that 10.14.0.0 is the elab, which can have 254 x 254 addresses It makes for a quieter network, also providing some security as others cannot see you easily. Router/gateway: This is the gateway for all of your traffic, usually the access point at your home. The technical difference between these words is that a router routes traffic between two networks of the same type (like ethernet), while a gateway is between different types of networks (like a cable modem or DSL gateway) Domain name server: This is the computer on your network or outside that translates names into numbers, like a digital phone book. Try this in terminal: nslookup physics.hpa.edu when you get the address, write it down open a browser go to physics.hpa.edu now go to the numbers you wrote down. Try this with another name, either on campus or off Ping and traceroute: Imagine you want to find out if a machine is responding (you can block this by using "stealth mode") In terminal ping one of the IP addresses in your class ping an address out on the internet what is the difference? now try this: traceroute www.apple.com It should give you a trace of the path your connection took. Try this with other addresses on and off campus. NSLOOKUP: Say you want to find out the name of something, or the IP address from the name. try this: nslookup (you will get a funny > sign) type: server 10.9.250.13 type: physics.hpa.edu what do you get? where is this machine? Try again using 8.8.8.8 as the server The best use of this is to find out what OTHER people might call a machine. We have several DNS servers at the elab, the main one is at 10.14.1.5 Others to try: 4.4.4.4 8.8.8.8 10.14.1.2 you can get out by typing exit or control-z (halt) Migrated from Apple Server Wiki. Original page ID: a88675h826 Module 4: web servers Module 4: web server and web pages (html) see also https://elab.hpa.edu/cs/TC/TC%205.0%20HTML.pdf Background: html stands for hypertext markup language it is a markup language, not really programming like python or C it manages how information is presented ("marked up") for viewers others include xml and xhtml, both managing data as well as format (more on this soon) Installing a web server: On the raspberry pi, run the following commands: sudo apt-get update (this updates your computer) sudo apt-get install apache2 -y (this installs apache web server on your computer, answering yes to all prompts) Go your browser and enter 127.0.0.1 (which means "me" on the internet) Now type ifconfig in your terminal and look for your internet address, which should start with 10.14.x.y Look at this address using your browser Setup your web folder, edit a page: On the terminal, navigate to the following directory: cd /var/www/html/ run the ls command, you should see a file called index.html You can edit this, either by using the nano command (cooler) or later using text editor (simpler) sudo nano /var/www/html/index.html This is a complex bit of html, so just look for something you recognize from the 127.0.0.1 test and change it nano is a text editor, so ctrl-o means overwrite, and ctrl-x means exit If you are using a text editor, it might not let you save. Back to permissions---- type chmod 770 /var/www/html which makes everything in the html directory read and writable to everyone (including you) the index.html page is the default that every web browser looks for FIRST you can specify other names in your browser to look around listing the files in a directory is very useful, but also dangerous for hackers Making a new web page: cd to the /var/www/html directory and look around (ls -la) Using either nano create a new page: sudo nano /var/www/html/test.html You'll notice this is blank. Add the following to your new web page: test Wow, this is really easy remember to overwrite (ctrl-o) and exit (ctrl-x) Now go to your browser and enter http://127.0.0.1/test.html What do you see? Create your own pages in your html folder and testUsing a text editor to edit and create pages: use the folder browser to navigate to the /var/www/html folder open a text editor and create a page called test2.html add code as you did with the nano editor save and test create a new folder on your web server  create a document there with secret content challenge your friends to find this pageRemote web page creation: ssh into 10.14.88.81 (pi-alpha.hpa.edu) as pi/papaya77 navigate to the /var/www/html folder create a folder with your name (short version all lowercase, no spaces) create a document in html inside the folder browse from your station to verify your new web site! challenge your friends to read your secret message  Next steps: https://www.w3schools.com/ create some pages using the w3schools tutorials copy this code into your local web server, test copy this code into the pi-alpha server, test Migrated from Apple Server Wiki. Original page ID: w2Z0s3H0A TC pdf directory https://elab.hpa.edu/cs/TC/ Migrated from Apple Server Wiki. Original page ID: C319U4u Class notes Wednesday, 1.15.25 Hre's a summary you may want to include in your notes: use the wifi icon to get IP address and wifi speed (option) use command-space to find terminal use ifconfig to verify your IP address (more on this next) ping to see if others are awake ctrl-c to cancel ctrl-z to halt ssh admin@10.14.254.xyz for secure shell sudo shutdown -r now to reboot say some clever stuff to say some clever stuff traceroute to determine path to servers or others sudo: super user do (later you can try su, or "make me root")Friday, 1.17.25 home/pi directory structure sudo nano: create a file ctrl-o: overwrite ctro-x: exit ls: list files (list) ls -la: list even invisible, hidden files (list, long, all) pwd: where am I? (print working directory) cd: change directory cd .. or cd up: cd up one level nslookup file browser Herobrine game more, less install dnsutils: sudo apt install dnsutils -yWednesday, 1.22.25 note pages on weblog for terminal commandsChallenges: challenge #1: find herobrine on your machine challenge #2: create a new folder (mkdir) inside your Documents folder challenge #3: create a visible and and a hidden file inside this folder challenge #4: create a document inside a folder on the pi-alpha machine challenge #5: find the missing documents in your partner's machine challenge #6: create a folder and a document WITH PERMISSION in your partner's machine challenge #7: edit the file your partner has created on your machineNew commands: mkdir: create a directory shortcut: up arrow means repeat last command... ls -la permissions: rwx, 777 format, 4-2-1 install apps: sudo apt install hardinfo -y who also whoami last last command, also the up arrow top lists all processes, useful with kill (see later) (ctrl-x to quit) ps: processes ps -ax kill: just what it sounds like grep: ps -ax | grep chess  (on the mac) history: shows recent commands like this, useful for retracing your steps or seeing who might have been in your machineNetwork commands: ifconfig ip addr show sudo raspi-config: enable ssh chmod: change permissions chmod +x: makes something executable cat /proc/cpuinfo traceroute (install) netstat or ss wavemon speedtest-cli (install) nmap -sP 10.14.88.0/24 sudo arp-scan 10.14.88.0/24 sudo iftop DNS part 2: nslookup servers IP addresses, subnet mask, gateways cat6 cables, wifi, security, html, www, servers nomachine Mac network utility install apache: sudo apt install apache2 -y2.18.25: Wednesday----Check these pi apps out:Geany (inside your programming folder) pi-apps (will show up in your accessories folder):wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bashinstall sublime textinstall angry IP scanner visual code (editor): sudo apt install code Migrated from Apple Server Wiki. Original page ID: T8L489p6 Network scanning We'll be using the program IPnetmonitor on the mac computers: https://www.sustworks.com/site/prod_ipmx_overview.html Screenshot 2025-02-02 at 12.41.43 PM.png Type command-L to get to the launcher.Let's try a few commands:Find your iPhone on the network: join the elab network on your phone  open ipnm, and choose address scan IP addresses are "leased" to users on the network 10.14.254.0/24 scan the network 10.14.254.0/24 on your phone, look at the connection information for the MAC address (MAC is not a mac thing, it is the identity of the hardware in your phone, it stands for machine access control) see if you can find your phone on the networkHere's what this means: All IP addresses (for now) follow what is known as IPv4, where each address in the world has 4 pairs of numbers between 1-254 (this is from binary versions of 2^n) Inside IP addresses are "fake" meaning they don't show up on the internet Try the DNSlookup tool, for these: www.apple.com www.google.com elab.hpa.edu physics.hpa.edu Notice that the outside "real addresses" have various numbers, but those inside the elab all start with 10.14.x.y The IP address for your phone is borrowed for a short time while in the elab, so we can recycle the addresses. Every address in the elab starts with 10 (HPA) 14 (elab) then two more sets of numbers. Address scan these:  10.14.88.0/24 10.14.6.0/24 10.14.5.0/24 Ok, so what is the 24 all about? Imagine you are in a hotel with 254 rooms all in one long hallway.  Every time someone walks by, you hear them. If you could instead have more floors, and shorter hallways, your room would be quieter We "mask" the network to do this 255.255.255.0 means 254 computers on a network, we call this a /24 network 255.255.0.0 means 254x254 (65516) addresses Try this from the HPA wifi network and see what address you get Now open the network settings on your computer and notice three things: IPv4 address subnet mask router/gateway DNS servers These are the absolute minimum needed to configure any internet device (computer, smartphone, camera, etc.) on a network IPv4 address: the address of your machine, may be set to DHCP, meaning leased address (dynamic host configuration protocol) subnet mask: depends on the "scope" of your network router: the gateway to get out to the internet DNS server: where to go to lookup or translate names into IP addresses Look for the same things on your phone...what do you notice? Next, try the other tools on the launcher, like link rate and pingYou can use link rate to test your ethernet cables for speed... Hacker Challenges:Find your phone: Address Scan Use the address scan to find your phone, by IP and MAC address compare to what it says on your phone enable "private address" on your phone and repeat why is this useful?Bonjour scan use the bonjour scan to locate the "imac-a" machine find all of the data about it why do some machines have more than one address?Connections tool use the connections tool to monitor the connections your computer makes open several web pages and notice the connections made are these more than just the pages you want? why is the internet so slow?DHCP lease tool use the DHCP lease tool to see your leased address release and renew your address, note the server that gives out the addresses is this the same as the router?DNS lookup tool use the DNS lookup tool to lookup addresses inside and outside our network use the DNS query option to lookup elab.hpa.edu using our DNS server (look on board) and 8.8.8.8 (google DNS) why are these different?interface info open interface info and update what do you notice about inside and external address? which would you use for a minecraft server inside our network? what is your network speed?Link Rate test your link rate to other computers in our lab and outside what do you notice about the speed? if you like, test your ethernet cable for speed, linking to another computer, or a network switch Monitor monitor both your ethernet and your wireless network for traffic is there any time when traffic is zero? browse the web and watchPing ping devices from your address scan above note return time ping from ethernet if availablePort scan be careful with this, it is like a burglar checking unlocked doors scan a device in our room for ports (1-900) notice open ports test with one of our servers, note the ports test on a pc, notice the ports open ask about common ports, you will need theseService scan use service scan on your device and on a server (see board) what can this tell you about a server? why is this blocked by some servers?Subnet calculator pick a 10.14.x.y address set prefix length to 16 notice the network address repeat with a 192.168.1.2 address what do you notice?TCPdump be careful with this tool: you can watch all traffic on the network and see passwords and logins run with several options, browse the web and see if you can identify your traffic why is some traffic not readable?TCP info this tool diagnoses internet connections notice things like dropped packets and retransmits ask about packets, we'll need to understand theseTraceroute trace the route to inside and outside addresses how could you use this to determine slow links? test using UDP, TCP and ICMP ask in class about what these mean Network tools for raspberry pi:We first have to make sure our pi is updated:sudo apt updateNext try the commands ping, traceroute and nslookup (from before) Advanced commands: you may have to install these using sudo apt install nmap for example... wavemon speedtest-cli (install) nmap -sP 10.14.88.0/24 sudo arp-scan 10.14.88.0/24 sudo iftop ping nslookup traceroute netstat or ss cat /proc/cpuinfo hardinfo ifconfig  ip addr show (note MAC address shows up)tcpdump is a powerful tool for watching network trafficunencrypted passwords and logins show up using this tool: sudo tcpdump -i eth0 (capture all on interface ethernet0) sudo tcpdump -c 5 -i eth0 (capture 5) sudo tcpdump -A -i eth0 (ascii format) sudo tcpdump -D (show interfaces) sudo tcpdump -XX -i eth0 (hex and ascii) sudo tcpdump -w 0001.pcap -i eth0. (captures packets to a file for later cracking) sudo tcpdump -n -i eth0 (addresses) sudo tcpdump -i eth0 tcp  (only tcp packets) sudo tcpdump -i eth0 port 22 (only see ssh traffic) sudo tcpdump -i eth0 port 80 (only see web traffic) sudo tcpdump -i eth0 port 443 (only see secure web traffic) sudo tcpdump -i eth0 src 10.14.88.81 (only from one machine) sudo tcpdump -i eth0 dst 10.14.88.81 (only to one machine) If you have permission, go back to the mac and try tcpdump to watch your web traffic... Nmap commandshttps://www.recordedfuture.com/threat-intelligence-101/tools-and-techniques/nmap-commands Migrated from Apple Server Wiki. Original page ID: z585E0m html challenge By now you have been able to create a basic web page, upload to a server, and view either locally or on a remote server. Your challenges:  Part 1: creating a web page on a web server enable apache2 web server on one of our machines or your local machine (mac instructions below)  create an html file on this machine using something from w3schools.com or your own clever code, that you can view, remember to use all lowercase, and end in .html ssh into the class web server (10.14.88.81) and create a folder in the server  upload a NICE web page there and confirm you can see it locally (http://pi-alpha.hpa.edu)Part 2: uploading using scp (secure copy) create an html page on your local computer named final.html copy this file to the cs server using the following command: scp  pi@10.14.88.81:/var/www/html/final/name  where "name" is your first name: abiel, alex, christian, daniel, edel, grady, jiho, max, philipp, vasco test your page by going to http://pi-alpha.hpa.edu/final/name/final.html take a screenshot of this wonderful site, and email it to mePart 3: relative reference, absolute reference (href)How-to: https://www.w3schools.com/html/html_links.asp to create a link, use this format:Visit W3Schools.com! For a local reference, use this format:CSS Tutorial where the folder path is what is linked, relative to where your page isFor example:In your folder named /final/alex, you have an html file called dexter.pngYour link would be:cool photo of dexteryou can see the anchor tag needs to start and end, a href is a special kind of anchor. If you had a subfolder named files, the link might look like this:more dexter stuff Migrated from Apple Server Wiki. Original page ID: q9P1p9 Tools page Download TextMate.zip (application/zip, 21.4 MB) Download IPNetMonitorX.zip (application/zip, 5.6 MB) Download coconutBattery.zip (application/zip, 13.2 MB) Download Network Utility.zip (application/zip, 3.4 MB) Migrated from Apple Server Wiki. Original page ID: E5Q7u9 Telemetry basics Our elab is monitored and controlled using a language called xml, or extensible markup language. You recall html stood for hypertext markup language, well this is another "markup" language that holds data not text. You have also see this in your word documents (.docx) spreadsheets (.xlsx) and slide shows (.pptx), where "x" stands for xml, or a container for data. Part 1: Reading xml data Scan the elab network, looking for devices in the format 10.14.x.1 On each webpage you will see data presented In the browser window, enter the ip address then /state.xml to see the data inside each container Telemetry is the reading of remote data.  Part 2: Controlling devices with xml Control can also be done using xml in the following format: Output State Control: Command Description state.xml?relay1State=0 Turn Output 1 OFF state.xml?relay1State=1 Turn Output 1 ON state.xml?relay2State=0 Turn Output 2 OFF state.xml?relay2State=1 Turn Output 2 ON Pulse Relay: Command Description state.xml?relay1State=2 Pulse Output 1 for the preset time (1.5 seconds). state.xml?relay1State=2&pulseTime1=5 Pulse Output 1 for 5 seconds. state.xml?relay1State=2&pulseTime1=5 Pulse Output 1 for 5 seconds. state.xml?relay1State=2&pulseTime1=5 Pulse Output 1 for 5 seconds. state.xml?relay1State=2 Pulse Output 1 for the preset time (1.5 seconds). You will setup a device for you to control, please only control devices with my permission, as some are mission critical to the elab. Turning on lights and opening windows are fine, but nothing else for now Try reading devices around the elab with the http://ipaddress/state.xml web link Try controlling these devices using the commands above:  10.14.17.1 10.14.18.1 10.14.19.1Part 3: sensorsWe will begin with measuring temperature.Two types of temperature sensors are most common:2 wire sensor: also called a thermistor is a resistor that changes value (resistance) when temp changes. You will see these in some solar thermal controllers, or older pre-digital devices. 3 wire digital sensor: these have three wires:  power (+), ground (-) and data. Each sensor has a digital address. These are much more accurate than 2 wire sensors, but require more advanced circuits to use Temp sensor setup:  get a control by web temperature module, power supply (12V) and a digital temp sensor (metal case) wire the power and sensor to the device, check to see if the power light is on (see below) on a desktop computer, create a network connection for the 192.168.1.0/24 network open a web page for 192.168.1.2, the address of CBW devices out of the box go to 192.168.1.2/setup.html with the login admin/webrelay and change the IP address to the one given by me restart the unit go to the new address, and go to the temperature page add the digital address for the three wire sensor check the web page to see if it records the correct value (warm with your hands to see the change) use xml to check the values: http://ipaddress/state.xml use xml to control the relays in the unit (see above for commands) verify that you can control the unit by watching the web page change expand your system by adding more digital sensors (note they all connect to the same terminals)Temperature module manual: Download temperature_um_v1.6.pdf (application/pdf, 4.6 MB)Advanced next steps: Analog module: measure current and power X-320 module X-420 module 400 series modules (bus controlled) arduino temp sensors raspberry pi sensors Lorawan sensors (fire detection project)Lorawan sensors: Drone project and others...Lorawan stands for long range, wide area network.These units are very low power, very small data systems used for remote telemetry (data sensors and control).Advantages: very low power, some run on batteries for several years, so no need to wire power supplies radio linked using 900 mHz radio, so no need for network wiring long range: can be used up to several miles away, depending on terrain flexibility: move them around as you like, no need to reconfigure location tracking: some have built in GPS We will be testing two types of sensors: SenseCap sensors and Dragino sensors.SenseCap sensors connect to a dashboard provided by the company:https://sensecap.seeed.cc/portal/#/dashboard They can also be connected to non-sponsored systems like The Things Network (TTN) or ThingsboardDragino sensors are a bit cheaper, and can only be integrated into either TTN, Thingsboard or your own MQTT database server.MQTT is a database protocol used by small devices, holding and transferring either messages (like in Meshtastic) or data.We use tools like MQTT explorer to check the data going in and out:https://mqtt-explorer.com/ Temperature data is not usually encrypted (who cares?), but Meshtastic has an encryption option, so messages can be encrypted. Fun fact: if you are a licensed radio operator, you can use higher power on Meshtastic, but you cannot use encryption, per the laws for radio operators.Part 1: SenseCap Login to the sensecap dashboard above and look at the data. You should see a weather station (3.27.25) and several sensors labeled alpha, beta and so on. Check out the graphs available Note the sensors, and possible data on location Look at caltopo.com, this is were we need to add the location of the sensorsPart 2: The Things Network (TTN) Login to TTN here: https://nam1.cloud.thethings.network/console/ Look for sensors and gateways Look at traffic on the gateway, and the data stream Adding a sensor is not easy, we will do this nextPart 3: MQTT Check out the public mqtt server here: https://www.mqtt-dashboard.com/ Note the traffic Using the mqtt explorer, see if you can watch data Try watching Meshtastic messages using the server mqtt.meshtastic.org login meshdev/large4catsPart 4: Mapping Login to caltopo here: https://caltopo.com/p/0NE7J Notice that the map can be shared. Our goal is to create a single page dashboard for all of our sensors Migrated from Apple Server Wiki. Original page ID: T8D7o8 Arduino You will be using a kit from Vilros, with a manual that is linked below. To start, make sure you are using the latest arduino IDE: https://www.arduino.cc/en/software/ You can then download the examples: Download uskcode-master.zip (application/zip, 44.8 KB) The nice thing about the new Arduino IDE is you just click on the example in the folder you want to test, no need to add it to the samples page.Test out the examples, creating each circuit.Here's a pdf of the manual: https://elab.hpa.edu/cs/pdf/arduino%20manual.pdf Migrated from Apple Server Wiki. Original page ID: h7j6t7 Telemetry advanced topics If you have already created a temperature monitor and control module, your next project will be to create a power monitor, much like the ones we have at the elab. You will be using a current transformer (CT) knowns as a Hawkeye 922 analog current sensor: https://www.energycontrol.com/Veris-Hawkeye-H922 This device works with AC current on a single wire to convert AC current into a 0-5 Vdc voltage. The Analog device you will use is one of these: Download analog_um_v1.3.pdf (application/pdf, 2.9 MB) Setup: follow the same steps you did with the temperature module to give your device an IP address (see the manual if you need help) connect the current sensor to the device, with (+) going to A0 (analog input 0) and (-) going to Agnd (analog ground) go to the web page for the device and notice that it should read 0 for the value of A0 unclip the current sensor and clamp it around the single wire provided (we will be splitting a "pig tail" and connecting it to a hot water maker) turn on the hot water maker, and notice the value on the web page change the settings on the CT to the lowest value (0-30A) and notice the change in the manual, there are steps to calibrate the device, begin with the easy method: connect a Kill-a-Watt device to your little system and calibrate the analog device using the values you see there for power or current repeat with the harder method, using calculations in the manual, e.g. slope the reason we need to learn the harder method, is we may know voltage of a circuit that is too large or connected to measure current directly (unless we use sophisticated meters, next step) using a clamp-on current meter, calibrate the analog unit what do you notice about the similarity between the clamp on meter and the 922 unit? Migrated from Apple Server Wiki. Original page ID: g8N7P4U7 Module 5: Cybersecurity Subsections Kali Network Security Firewalls VPNs Wireshark Cryptography Malware Social Engineering The cloud Key terms: Kali linux Pentesting Network security VPNs Firewalls Kali linux What is Kali and why do people use it? Kali Linux is a type of distribution of Linux that has a lot more tools for hacking/pentesting/info gathering. It comes installed with a bunch of tools such as: nmap whois netstat wireshark imagine linux but fine-tuned for hacking image.png remember wireshark and nmap, these two are really popular and used by people in the industry some examples of using these tools (don’t do these, they aren’t legal): I want to see all the traffic going through the network and what people are looking up Kali → Wireshark → sniff for packets being sent on the network → decode the packets and gather info I want to brute force my own password for testing purposes Kali → John the Ripper → get a dictionary full of words → run a brute force attack that tests every possible combination of words and letters against the password I want to see all the people that are connected to the same wifi as me Kali → nmap → network scan → look at all connected devices and their IP addresses people who work in the industry are hired use these tools often, such as: working for a company using these tools to monitor their security and see any potential threats hired by companies to test their security and try to find vulnerabilities which they then report back to the company Pentesting What is pentesting? Penesting (aka penetration testing) is using tools like the ones listed above to simulate real-life attacks on computers, networks, databases, etc. Remember earlier when I said people who work in industry are hired for this? People are paid lots (and I mean lots) of money to simulate hacking into companies, as a hired expert finding a vulnerability is cheaper for a company than actually getting attacked by a group of hackers. These are also known as bug bounties, essentially looking for bugs or vulnerabilities within a company, finding them, then reporting back to the company and getting paid. https://immunefi.com/bug-bounty/ What are some common methods of pentesting/hacking? OSINT (Open source intelligence) Looking for publicly available information about individuals to potentially find sensitive information as leverage to gain access to accounts or privileges. Dictionary attacks Using a list of common passwords to guess login credentials Brute force attacks Using every possible combination of characters until the correct one is found Phishing Sending fake emails, messages, etc to pretend to be someone else and gain sensitive data Man in the middle attacks (MITM) Intercepting online communication between two systems to gain information or steal data Social engineering Tricking people into giving sensitive info, similar to phishing but more human-based and less technical Network Security What is a network? image-2.png A network is a connection of two or more devices that send information to each other As you know from previous modules, IP addresses are used by computers to send information to each other and create a network Network Security involves protecting the connections between devices so that third parties cannot steal data or get info illegally Try running these commands on your computers: Mac: lsof -i -n -P | grep LISTEN Windows: netstat -ano | findstr LISTENING this tells you open ports, processes going on, and other info about what your computer is actively doing Some people use VPNs (virtual private networks) to create secure connections between their computer and other devices to conceal their real IP and identity image-3.png People also use Firewalls to protect their stuff, and your computer by default most likely has a basic firewall setup to prevent you from downloading and running malicious programs like viruses. Firewalls work by monitoring traffic on your computer and deciding what to allow or block. Important to remember: Firewalls work by viewing packets, just like how wireshark is used to sniff packets being sent across the internet. Firewalls exist for both hardware and software (both physical computers and applications) and are built into routers, pc parts, and common apps image-4.png Network security is of course much more complex than these short definitions, but it can all be boiled down to information being sent to and from computers, and how we protect that information. Wireshark Wireshark is a tool that lets you view network traffic on both your computer and online networks. the cool thing about a lot of these apps is that they’re open source, just like linux, and thus free to use and easy to understand how they’re built lets try it out! first, download wireshark from the website: https://www.wireshark.org/download.html next, do these steps: open wireshark you’ll see a list of available network interfaces, such as wifi, ethernet, etc choose a network interface (i.e. wifi) and start a capture this will start capturing all the packets sent on the wifi in real time visit a website online, such as http://neverssl.com (this link works well because it not encrypted) filter the traffic in the filter bar, type “http” or “ip.addr == YOUR_IP” you can find your own IP by typing this in terminal: “ipconfig getifaddr en0” or “ipconfig” for windows this narrows the traffic down to just your device look inside one of the packets click on a packet (look for ones marked “GET”) expand and see all the info from the packet you can now see the website you visited, the size of the packet, the destination IP addresses, and more once you’re done, just click the red stop button and it’ll stop congrats, you just used wireshark for the first time :) Cybersecurity overall plan: learn how to read networks using nmap and ipnetmonitor install wireshark and learn how to read packets learn about the dialog all machines use on the internet (DNS, ARP, ACK-SYN, ICMP) learn how to install a wireless router to create an isolated hacker network (hackz0rz) use this network to attack and defend using metasploit learn how to protect yourself Downloading parrot-os:https://parrotsec.org/docs/virtualization/utm-configuration/Downloading kali linux: https://www.kali.org/docs/virtualization/install-utm-guest-vm/ Local downloads: go to elab.hpa.edu look for computer engineering lower folder (bottom of page) look for installers folder download UTM and parrot-os.utm images install on your own laptop  go to wireshark.org and install the version that matches your computer (windows, mac, apple silicon) open wireshark and begin your challenge Wireshark challenge: Part 1: httpYour challenge is to view the login credentials of an insecure http request using wireshark start wireshark choose an active network interface (look for the squiggly lines) apply the http filter go to the IP address posted on the board start packet capture refresh the page login to the admin pages (see board for credentials) stop the packet capture look through the packets for a POST entry find the login and password you used repeat this with another host repeat using the http.request filterWireshark challenge: Part 2: arp and icmp open terminal run ping to another machine start wireshark with the arp filter repeat with the icmp filter what is the MAC address of the sender and recipient? what was the round trip time for each packet? Wireshark challenge: Part 3: ACK-SYN open a browser and visit a non-https host filter with tcp in wireshark fine a tcp 3-way handshake what does ARP do, and why did it appear before the ping? what do ICMP messages tell us about connectivity? how can this delay help identify potential network intrusions?Server challenge: setup an apache server on one of the raspberry pi units password protect some part of the web server (look up how to do this, either .htaccess or another method) share your IP address with another student (the "attacker") have them watch using wireshark as you login challenge them to gain your password question: why do we gather packets for later use using pcap? Migrated from Apple Server Wiki. Original page ID: z9H6x5i1 Meshtastic notes 5.26.25: Updates to this page are now located at http://10.14.4.85:6875/books/elab/page/meshtastic Or from the elab.hpa.edu main page Why would I use this: Hikers or back country out of direct range to cellular or internet Emergency workers where infrastructure is damaged, overloaded or non-existent  Remote neighborhoods cutoff from outside communication Casual users or events (e.g. marathons, conventions) Background: Meshtastic uses low power radios in a mesh configuration, meaning to communicate with another unit, one only needs to connect to any unit in the mesh. It links to your phone or computer using bluetooth, so there is no internet needed. To link to units beyond the mesh links, a messaging server (MQTT) on the internet can be linked to any mesh, either using your phone connection (cellular to internet) or other broadband internet connection (e.g. satellite or land internet). The radios use a frequency originally used by cordless phones (900 mHz) but with very low power, in a digital mode, using very small bandwidth-all meaning the range can be many miles for very small, very low power units. The wavelength of these units (900 mHz) is "bendy" meaning you may not have line of sight to another in the mesh, but still make a link, much more flexible than normal UHF or SHF radio. Meshtastic units use a free, unlicensed technology called LoRaWan, or LoRa for short, meaning long range, which has been used in the past for data like sensors on a wide area network (LoRaWan). Meshtastic is a free, unlicensed messaging solution that is text only, linked to phones or computers by bluetooth, with options to connect by wifi or usb connection. Meshtastic units are relatively inexpensive, as they are simply modified firmware running on existing small IoT devices, most for around $30 Some kits include battery, screen and a case for around the same price Most small units have a battery life of 4-12 hours, with some units solar powered for remote "repeater" uses. Meshtastic units are programmed using bluetooth to a phone app (meshtastic app) or using a wired usb connection using chrome and the meshtastic web app from meshtastic.org To upgrade meshtastic units, a wired usb connection is easiest and necessary in most cases, using chrome and the web flasher app from meshtastic.org Meshsense is an app from affirmatech.com that runs on computers to map out mesh networks, including those linked by the messaging server Setup:Here are a set of screenshots from a typical mesh setup I have. The easiest device to use in my experience is the ESP32-S3, but the Lilygo T-beam S3 is also quite good. Both have a display, unlike the RAK unit, which is also easy to use, but has no display, but is much better on power, if that’s an issue. My out of the box process: connect antennas if present (critical: if you power up the device without, it can damage the RF chip) connect via usb to computer running chrome (mac or pc, must be newer)-see below update firmware using the app from meshtastic.org (include web server for ESP32 units) remove from computer, power externally, join by bluetooth use app (iPhone, iPad, m1 mac, android) set LoRa region (below) if unit has a screen, go to bluetooth and change code to static (123456) enable MQTT messaging in LoRa enable MQTT under modules if you like We’ll be using the meshtastic app on a mac (m1 "Apple siicon" or newer) computer, which looks the same on my iPhone. Don’t have access to android, but it is similar.We will be using the 2.6.x version of firmware (see below) You can also configure using chrome (web, bluetooth, serial) which I’ll cover next.Download the meshtasic app, should see this: Screenshot 2025-04-14 at 5.22.48 PM.png You may know the MAC (machine ID) for your device, if you have multiples, you can power them off, or wrap in foil (never disconnect antenna under power) Click the device, you should see this: Screenshot 2025-04-14 at 5.24.21 PM.png Upper left shows we are managing the device e72cBig main page follows: Screenshot 2025-04-14 at 5.25.25 PM.png start with LoRa: make sure the region is US: Screenshot 2025-04-14 at 5.26.31 PM.png Even though the max power is 22 dBm, don't mess with the power setting unless you are using a station G2, in which case make this 19 dBm as feed for the PA (power amplifier)Channels is next, you should see at least the primary channel, used for all MQTT and general messages. You can see I've added another channel, more on this later.Click on Primary, you should see this: Screenshot 2025-04-14 at 5.28.45 PM.png You can adjust the location accuracy if you like, but make sure uplink and downlink are enabled.Security is not something you need to mess with unless you want to enable remote admin of your device. Also don't enable legacy admin unless you want to remote admin. Enabling serial and debugging are nice when you use either meshsense or chrome to look at the serial traffic. Screenshot 2025-04-14 at 5.31.11 PM.png QR code is nice if you want to share the QR code for your channel, ignore otherwise.Be careful sharing this, it includes the key for your channel. Next part may be of interest to hams: if you WANT to have your callsign, you don't have to click licensed operator, but if you do, it does it for you. It also disables encryption as per FCC regs, and gives you the "license" to push power beyond 1 Watt (30 dBm) which is the limit for most small amplifiers to 10 Watts max. Make sure the next one is changed to fixed, which will make the bluetooth code 123456. This way you won't have to look at the screen if it is away. For devices with no screen, the default code is 123456. If you change the code to random on a unit with no screen, the only way to rescue it is by the serial connection ("code suicide"). Screenshot 2025-04-14 at 5.45.31 PM.pngDevice is next: Screenshot 2025-04-14 at 5.52.41 PM.pngUnless you need to create a repeater, use client.Simple.Make sure rebroadcast all is enabled.Note the lower buttons for reset, this erases the node info.Steer clear of factory reset unless you really need to start from scratch.Reset NodeDB is useful if you want to clear the database of your nodes, e.g. you relocate and want only fresh contacts Display can be left alone, unless you want to invert the screen for some screen models: Screenshot 2025-04-14 at 5.48.15 PM.png Network is only useful if you have an ESP32 or similar device with wifi (Lilygo T-beam): Screenshot 2025-04-14 at 5.49.41 PM.pngn.b. if you enable this, you will lose bluetooth access. If you lose the wifi connection, you can regain access to the unit using the serial connection part of the Chrome process.This can be useful if you have a device far away, but with internet access.It is also the only way to get a csv file of range test information should you decide to do so. As you can see next, this device has GPS. If it is present, enable it. If not, you can choose "not present" and the device will take the GPS coordinates from your phone where you are at that moment. Works well, especially for locating your devices on a map. (see also meshsense) Screenshot 2025-04-14 at 6.00.54 PM.png Power config is only useful if you are on solar power or want the device to shutdown on power loss: Screenshot 2025-04-14 at 6.01.18 PM.pngThere are many modules, which I'll cover in detail later, but the two most important are MQTT and telemetry (only if you have a device with sensors included, like the T-beam): Screenshot 2025-04-14 at 6.03.39 PM.png From the top: enable MQTT so your traffic can use MQTT servers to share messages.Make sure uplink and downlink are also enabled on the channels page, and OK MQTT is enabled under LoRa.Proxy uses your phone to connect to the MQTT server if you are not in range of any MQTT gateways-this works for solo users testing devices too.One cool use for this is imagine you are in a remote location with many mesh users, only one needs to be using their phone as a MQTT proxy to get EVERYONE onto the MQTT server network.Encryption off enables your traffic to be seen by others, but not a big deal, The impact is really to make your messages go through, change later if needed.JSON is only for home automation, leave off.Enable the map and location.Root topic is like a filter: you don't need to communicate with the US mainland, so I use the smaller "scope" of the MQTT server you see on the image, e.g. msh/US/HI.You can also join other MQTT servers, like those sponsored on the web, or even your own if you want privacy.If you want to see traffic, you can use many free MQTT explorer programs, just enter mqtt.meshtastic.org, user name meshdev, and password large4cats.Cool stuff, you can see your own traffic.Note the comment at the bottom-none of this works without enabling uplink and downlink in Channels above. Telemetry is only for those with devices with sensor, but is really useful: Screenshot 2025-04-14 at 6.08.20 PM.png Chrome setup: Serial connectionWe will be using a USB-C cable to connect a new ESP32-S3 unit to Chrome, on a mac. PC versions are similar, you may need help on the meshtastic site for drivers (ugh). You may also have a device with micro USB, cables vary on these.Step one: open Chrome:go to the meshtastic site, and download the flasher: https://flasher.meshtastic.org/select target device (you can try auto, but it is not reliable): Screenshot 2025-04-15 at 1.57.16 PM.pngYou can see I chose the Heltec V3, which matches this unit. You can choose beta or alpha software, up to you. If you want web access, you have to include the web package as well (see below): Screenshot 2025-04-15 at 1.58.45 PM.pngSome devices run just like it says, others you have to play a "plug and connect" dance. In some cases (RAK) the device shows up as a drive on your computer, where you drop the firmware file.Either way, it should show up in the devices menu of your computer: Screenshot 2025-04-15 at 1.59.53 PM.png This may take a minute or so, when done it will say "leaving" in a petulant tone. Screenshot 2025-04-15 at 2.04.28 PM.pngOnce done, go to client.meshtastic.org on chrome... Screenshot 2025-04-15 at 2.05.07 PM.png choose serial, then a box should appear with devices, if not, search again: Screenshot 2025-04-15 at 2.05.34 PM.pngOne reason to connect by usb is if you have multiple units, you can then label each one with the 4 character code. Nice stuff here: Screenshot 2025-04-15 at 2.06.25 PM.png Same setups as above, main difference is this method ALWAYS works, even if you have disabled bluetooth. This is the only "rescue" way to connect to a unit if wifi is enabled and you lose wifi access. You will also notice the map is much more detailed and includes some fun graphics: When you make changes, click the drive icon in the upper right. You may also notice that on some units, bluetooth does not work if you are connected by serial.  If you use your computer to charge your unit, make sure chrome is off, this solves the issue. You may also notice the long wait between changes and reboots when using the meshtastic app over bluetooth is gone-serial is instant. Meshsense:Meshsense is the best tool for managing multiple units, as well as deep info into your own mesh unit.It is NOT a configuration utility, though it can read config files for confirmation.It IS an excellent dashboard for multiple mesh units with links outlned:https://meshsense.affirmatech.com/ Here is a global view of our interisland mesh network as of April 15, 2025: Screenshot 2025-04-15 at 2.15.45 PM.png And this is the level of detail available for devices (note, this one is miles away, connected by microwave backhaul): Screenshot 2025-04-15 at 2.16.50 PM.png If you are local to the device (not internet or bonjour) you can open settings on the upper right: Screenshot 2025-04-15 at 2.18.47 PM.png Another wonderful thing about meshsense is that it creates its own web server that you can access anywhere on your network, or if you can port forward, you can see this info from anywhere-excellent if you are managing a repeater, router or dedicated client acting as a local gateway. Future topics: remote admin adding channels encryption battery supplies antennas LoRa background-sensors? telemetry range mapsEquipment:Three levels: all should be accessible via bluetooth at least consumer-no tech involved: casual users, hikers etc. hobbyist-some tech, more capabilities explorer-expanding capacityLevel 1: consumerSenseCap tracker: Screenshot 2025-04-19 at 8.30.01 AM.png credit card format limited range (internal antenna) buzzer for alerts special charging cable  cheap, easy to configures5 trekker Screenshot 2025-04-19 at 8.33.54 AM.png Good for hikers, backpackers GPS included screen useful better antenna excellent battery life (>24 hours) rugged can be used with android ATAK system ESP32-S3 guts, can be set to wifi for range testing, etc. USB-micro chargingLIlygo T-echo Screenshot 2025-04-19 at 8.36.43 AM.png USB-C charging  very portable better antenna (dipole) small screen based on NRF52840 chip-excellent battery lifeLilygo T-deck Screenshot 2025-04-19 at 8.39.17 AM.png ESP32-S3 chip, web page possible, wifi included touch screen keypad GPS included larger, less portable shorter battery life USB-C chargingLevel two: HobbyistSome of these are kits, some you can make your own case for (3d printed), all have more capacity than consumer level devices, depending on firmware Lilygo T-Beam  Screenshot 2025-04-19 at 8.43.04 AM.png my go-to board for testing good antenna add battery to the back, excellent battery life  ESP32-S3 chip, includes wifi and web page access internal sensors for temp, rh, air quality GPS included same guts as in the Trekker above, without the caseRAK WisBlock board: RAK19007 base and RAK4631 LoRa module Screenshot 2025-04-19 at 8.46.28 AM.png very small, good on power fun to play with, can attach sensors to board or with modules from RAK core of later repeater and router modules CAUTION: power connection is reverse of all known plugs includes solar charging plug can be adapted to external antennasESP32 V3 board: Screenshot 2025-04-19 at 8.49.06 AM.png my favorite board for portable use easy to put together, get the kit with the battery fun to give to friends includes screen when used without the case, can be a powerful repeater or router includes wifi antenna firmware supports web page, rangetest tracking Level three: explorerStation G2: Screenshot 2025-04-19 at 8.51.38 AM.png USB-C or wired power If external power or PD level USB-C can run power amplifier power amplifier to 4 Watts (vs. 0.164 W of others) if used as power amplifier, must set module power to 19 dB to not overload PA best for remote repeaters, routers, hilltop units extremely long range (e.g. Waikii on Big Island to Oahu)RAK solar repeater/router: Screenshot 2025-04-19 at 8.54.53 AM.png setup and drop at remote locations (by drone?) essentially a RAK board with solar panel and 3000 mAh battery excellent dipole antenna (look for wire inside to tell) very long range (Waikii on Big Island to Oahu) configure via USB-C (rubber plug port on side) testing drone delivery of these... 400 grams total (drone folks)Antennas:There are essentially 4 types of external antennas possible, beyond the internal ones on some devices: whip (stick) antenna: look for screw on with no internal wiring, needs ground plane whip dipole antenna: much better, needs no ground plane, often flexes 90° 8 dB omni antenna: various vendors, stay away from high dB claims, should be quite large, not cheap 13 dB yagi antenna: looks like a fish skeleton, very directional, only used for long haul links Migrated from Apple Server Wiki. Original page ID: f2K4o8a Wireshark Wireshark lab: find your IP address: ipconfig or ip a on linux open wireshark find your interface-look for squiggly lines double click on the interface to start notice the flow of packets, everything you see Network scanning is a bit like burglary: who lives where: ARP are they home? ICMP ping what is their street address? do they answer the door? ACK-SYN what doors or windows are open? netcat One could also make the analogy with a "man on the inside": if inside your home is the same as your LAN (local area network), then being able to plant a spy inside defies all of your security (firewalls in a network).Malware is like sending a letter to your house, someone opens it thinking it is safe, and it maps out where your valuables are, in some case throwing them out the window do be collected.  part 1: ARP ARP stands for address resolution protocol It checks MAC hardware addresses against IP addresses “resolving” them run the same wireshark flow, but with the arp filter what do you see? hacker note: how could you “spoof” your MAC address? why would you want to? look up ARP poisoning-why would someone do this? part 2: Ping ping is what we use to see if a machine is active ping uses a protocol called ICMP or internet control messaging protocol ping a device you know if active on the network repeat the flow above with the icmp filter what did you see? look up what length and ttl mean hacker note: how could you hide your computer on a network? why would you do so? part 3: DNS you know that DNS is how we convert names into addresses on the internet DNS servers can be local like on a LAN for internal machines “point me to elab.hpa.edu inside the building” or external “point me to google.com” you can test this using the nslookup tool on your computer open terminal, use nslookup to lookup a local address like elab.hpa.edu repeat looking for an external address like google.com in the nslookup window, type server 8.8.8.8 and repeat the two steps what do you notice? try loading a web page hacker note: why would a hacker want to intercept your DNS query? (think of airports and Starbucks) type exit to leave the nslookup program part 4: ACK-SYN http and most web traffic uses a system called “ACK-SYN handshake” in the following order: SYN is sent from the client to the web server, synchronizing the conversation and opening ports needed (like port 80) ACK is sent from the server to the client, acknowledging the port is open SYN-ACK is sent from the client saying “got it” connection is open, data transferred FIN is used to end the link example: web pages open wireshark, start a capture browse to a web page, capture packets look for ACK what type of packet is this? repeat with the tcp filter (hit return after applying the filter) repeat going to a machine serving xml what do you see? hacker note: how could you infect another computer using this? part 5: netcat netcat is a program that allows a user to establish a connection with another machine it can be used for a machine to machine chat without using the internet (e.g. we cannot see your conversation without wireshark) open wireshark, in the filter window enter tcp.port == 1234 on a client machine, type netcat -l 1234 in a terminal window on your machine, run netcat 1234 then return type some text does it show up on the client machine? look for the packets on wireshark can you see the text in each packet? try these flags: n is the ip address l means listen v means verbose p means port number did you notice there was no password needed? why would it be dangerous to leave nc -l open? look up a reverse shell and explain how to do this hacker note: how could malware open this, and what could it do then? part 6: netcat port scanning netcat can be used to scan for ports use the format nc -v -n port-port end open wireshark, start a capture run the command nc -v -n 8.8.8.8 1-100 filter using this filter: ip.addr == 8.8.8.8 what do you see? repeat with a local address (web server, device) go to the device (e.g. port 80) and watch packets hacker note: how can a hacker use this command to look for open ports? how could you detect it happening if you are a white hat or sysadmin (system administrator)? if you had access inside a network, how could this be useful? if this were packaged into malware, how could it be useful? Migrated from Apple Server Wiki. Original page ID: u3F713S1d zero days cybersecurity notes https://elab.hpa.edu/cs/videos/zero%20days.mp4 00-21:00 cyber background 21:00-38:00 what are centrifuges, how the code will be used 38:00- 57:00  cyber command, NSA, governments 57:00-  NSA hackers terms: airgap C2 SCADA PLC zero day exploit DLL questions: what is a zero day exploit? how did they know the code was from a nation state not a hacker? what is a digital certificate? why is learning about PLCs so important? (Arduinos are PLCs) was there a C2 element in Stuxnet? why were gas centrifuges so important? did they just destroy these, or was it more complex? did the operators know what was going on? why was this important to the malware attack? what is yellowcake uranium? what is it turned into, and for what? if you have seen Top Gun: Maverick, what is similar? How did the PR film the Iranians made help to identify the code? Look at the “balloon code”-do you see anything like the arduino code? Why is it so scary to link code to “real world physical destruction”? What is a DLL in the windows operating system? What is the 4th dimension of warfare, according to the film? What is the NSA? What was buckshot yankee? Compare the NSA use of remote computers with botnets Migrated from Apple Server Wiki. Original page ID: 69F4a2x module 5.2: Cybersecurity Download Module 5 Pt 2.pdf (application/pdf, 435.2 KB) Module 5: Cybersecurity Pt. 2 Key Terms: Malware Types of malware C2 servers Examples Protocols Definition Common protocols DNS Cryptography Hashing Encryption Usages Malware Malware is a word most people know nowadays from tech stuff, movies, etc. Malware = Malicious Software Screenshot 2025-04-24 at 8.37.55 AM.png Module 5: Cybersecurity Pt. 2 1 We’ve talked a bit about different types of hacking/pentesting in the first part of the module, so lets look at some real-life examples of malware used for hacking: Virus Malware that inserts itself into legitimate programs to look real Worm Self-replicating malware that spreads itself to as many computers as possible Trojan Malware that disguises itself as “real” software Ransomware Malware that encrypts user files/data and locks it until the user pays money Keylogger Malware that records what the user types and sends it back to the hackerIn all of these cases, the main purpose of malware is to gain access into networks so that the hackers can leverage authentication to steal money, data, info, etc Module 5: Cybersecurity Pt. 2 2 In the cybersecurity field, we don’t really use the word hacker ever, instead we call them threat actors. What is a C2 server? A Command and Control (C2) server is like the mission control center for any malware. It is where all the stolen data is sent to from malware once it is successfully put on a users computer/network. How it works: 1. A threat actor will put malware onto a persons computer successfully and compromise it 2. The malware will try to connect back to the attacker’s C2 server (which is typically hidden) 3. The C2 server will then send commands, receive stolen data, and remotely update/change the malware itself. Common Protocols Used: HTTP/HTTPS (blends in with normal traffic) DNS (used for covert tunneling) IRC (older botnets) Custom encrypted protocols over TCP Screenshot 2025-04-24 at 8.38.35 AM.png Module 5: Cybersecurity Pt. 2 3 Malware isn’t only used by individual people, but governments are also known for using malware to spy on each other and in some cases cause physical damage, such as: Stuxnet (2009-2010) One of the most famous pieces of malware ever written of all time, designed by the United States government as a cyberweapon to sabotage Iran’s nuclear enrichment facilities. The malware would slowly over time make their physical centrifuges run faster and faster until they actually broke down into pieces. https://en.wikipedia.org/wiki/Stuxnet WannaCry (2017) Ransomware that was spread globally to over 300,000 machines, demanding bitcoin from the users in order for their data to be decrypted Caused a lot of money in damages and messing up computers all over the world https://en.wikipedia.org/wiki/WannaCry_ransomware_attack Module 5: Cybersecurity Pt. 2.4 watch this video on stuxnet, insane stuff: https://www.youtube.com/watch?v=WyBlh8Tq6_Q Protocols What are protocols? Screenshot 2025-04-24 at 8.38.57 AM.png Protocols are basically a set of rules of how computers talk to each other.  Every time you do something on a computer like opening a website, sending a text, or streaming a video, your computer is using multiple protocols to make sure that everything is sent, received, and understood properly. Common Protocols: TCP Used when accuracy matters (ex: loading a website or sending an email) Slower, but reliable — makes sure every packet is received HTTP example Module 5: Cybersecurity Pt. 2 5 UDP Used when speed matters more than reliability (ex: video calls, games) Packets might get dropped or arrive out of order No handshake Used by websites to send data like HTML, images, and scripts Works on port 80 Doesn’t encrypt anything — all data is sent in plain text ARP Used by your computer to determine the MAC address of devices locally before sending or receiving data Essentially helps your computer determine where to send packets/info ICMP Used to send error messages, tests (such as pings), and status updates Helps determine and diagnose smaller problems This will be on the next quiz, so remember this example very specifically (essentially a free point if you’re reading the modules): When you visit a website: HTTP sends the webpage ICMP says “This device is online” or “The page isn’t loading because the network isn’t responding” Recap on stuff you learned earlier: DNS (Domain Name System) Module 5: Cybersecurity Pt. 2 6 DNS converts names like google.com into IP addresses like 142.250.190.78 Happens every time you visit a site Real Examples: You connect to a website: 1. DNS resolves domain 2. TCP handshake starts 3. HTTP or HTTPS request is sent You join a game: 1. UDP is used to send quick game state updates Hashing, Cryptography, and Encryption Screenshot 2025-04-24 at 8.39.30 AM.png Module 5: Cybersecurity Pt. 2 7 So what do we even do if there’s a million ways for viruses to steal our info? When we talk about network security, we’re really just talking about protecting information and making sure it doesn’t get stolen, changed, or seen by anyone we don’t know. Think of it like this: Hashing = locking something in a box and throwing away the key Encryption = locking something in a box with a key, so only the right person can open it Hashing: A hash takes any input and turns it into a long sequence of letters and numbers. example: "mypassword" → ef92b778bafe771e89245b89ecbc08a44a4e166c06659911881f Why do we use it? To store passwords safely To check file integrity (if a file changes at all, the hash will completely change) An example is SHA256, try it out: https://emn178.github.io/online-tools/sha256.html type in your name or anything you want, then change just one letter and see what happens Module 5: Cybersecurity Pt. 2 8 Encryption: Encryption takes an input and gives you the encrypted version along with a specific key to decrypt it. Types of Encryption: 1. Symmetric Encryption (One key) a. The same key is used to encrypt and decrypt (lock and unlock) b. Fast and easy to use c. Since there is only one key, sharing the key with people has to be done safely 2. Asymmetric Encryption (Two keys) a. You have a public key and a private key b. Anyone can use your public key to lock a message for you c. Only your private key can unlock it Some examples of people/businesses that use encryption are: Messaging apps (WhatsApp, iMessage, Signal) Banking websites (Chase, Wells Fargo, etc) Cloud services (AWS, Azure, GCP) If you’ve gotten to the end of this, make sure you know these for the upcoming quiz: Malware and types of malware Module 5: Cybersecurity Pt. 2 9 C2 servers Stuxnet HTTP and ICMP (look at the example I put above) Hashing and Encryption Module 5: Cybersecurity Pt. 2 10 Migrated from Apple Server Wiki. Original page ID: i4R0n8Y arduino notes Download comp-eng arduino module.pdf (application/pdf, 3.9 MB) comp-eng arduino module We will be creating two foundational devices in comp-eng: the arduino and the raspberry pi. What is the difference? Arduino is what is known as a PLC or programmable logic controller. If you load a program into it (usually by a cable connected to a computer) it will do one thing over and over. These are great for simple sensors, or in some robotics applications. Many automated things in your life are actually PLCs. Raspberry pi is a complete computer running a version of linux OS called Raspian, a raspberry pi version of the most popular linux distribution called Debian, developed by a guy named Ian, named after his wife, Deb. Arduinos are great tools for learning about the process of writing code, compiling code (making it into a language hardware can comprehend) and uploading to the device, which do simple things like blinking lights, or could measure the temperature of this room, or to run a motor based on some sensor, like in robotics. Pi is great for learning about computers, the internet, cybersecurity, web pages and much more, so we’ll be using them next. Arduino part: Look at this: ARDUINO.png On the left, you see a USB connection, which connects to a computer to load the programs. On the lower left is a power socket, if you need to power things like motors On the bottom are sockets for analog inputs, e.g. values like voltage or resistance that have a range of many values On the top are the digital inputs and outputs, which match what you have learned about 1 and 0, T and F, and all of those concepts, usually 0 or 5 Volts DC. PWM is a fancy way of using digital signals (1 and 0) in fast repeats to simulate an analog signal output. If you want to show off this is called Pulse Wave Modulation, and it is how many digital devices in your life work. You will be using this book for this project: arduino.pdf https://elab.hpa.edu/cs/arduino.pdf (see below as well) The format of the book is setup at the beginning (read carefully) then projects with diagrams of the components and how they are wired to the breadboard (white part) connect your arduino to a computer and load the first program, which makes the arduino flash at a certain rate compile the program, then upload: you will see flashing lights as the program loads into the arduino the light should flash at a certain rate go back to the program and change some of the values from 1000 to 500 or 2000. re-compile, re-load and see how you have changed the system continue with the other modules, which involve wiring the components according to the diagrams you are now an official computer programmer! Arduino steps: 1. Open Arduino app (green icon) 2. Tools->arduino uno, connect Uno 3. Port->usbmodem (when plugged in) 4. File->examples->USK guide code 5. open circuit 01 6. Sketch->verify/Compile 7.  Sketch->upload 8. Modify code, repeat Migrated from Apple Server Wiki. Original page ID: U9P3z4D0 VOM meter notes Download comp-eng meter unit.pdf (application/pdf, 2.4 MB) comp-eng meter unit VOM/DVM Fluke 114: - 0009..png Fluke 101: FLUKE 101 MOY CATER.png V~ means AC voltage V-- means DC voltage (red +, black -) mV means millivolts (caution with this one) Ω means ohms ||| means sound for continuity (114) -||- means capacitor check (101) Hz means frequency (101) test DC voltage with batteries how can larger batteries have the same voltage? test AC voltage with outlet (instructor must be present) test also between each AC plug side side and ground (instructor must be present) which is “hot”? what color is this behind the wall? (look this up, either black or white) test continuity with the sound tester what makes good conductors/insulators? test Ω across your body test across several of your friends holding hands why does this change? measure mV across your body, why does this change? how would it be different for a person having a heart attack? if available, test the voltage of the battery in a car (instructor must be present) start the engine, what does this tell you? turn on the headlights, what happens? test various electrical devices: lightbulbs, hot water heaters, diodes (both directions), resistors, capacitors (both directions) Download arduino parts.pdf (application/pdf, 102.9 KB) when measuring resistance (Ohms)make sure to hold each component separate from your hands, which you found conduct current a bit start with the resistors, see if they match the resistance marked on the color code on each one move on to the photoresistor: measure in light, then cover it-why would this be useful? try with the LEDs, but your meter may not have the needed current to push the LED into flow, try reversing the wires the potentiometer is a fancy name for a volume control. measure from the middle pin to either end and turn the volume up and down investigate the push button with resistance, then with the beep (continuity) function if your meter has one (it will beep) switch to DC volts and connect to the DC motor. spin the motor in one direction, what do you see? reverse and what do you see? Migrated from Apple Server Wiki. Original page ID: e335v3 1.1 Fun with terminal comp-eng terminal fun setup: raspberry pi 400 units running raspian 12 (trixie) one victim machine running raspian student laptops with terminal running, homebrew if mac, WSL if PCIMPORTANT: NEVER share your login info with others: your passwords are like your underwear: nobody should see it, change it often, and don’t leave it on your desk take notes on every step for future quiz IMPORTANT: With great power comes great responsibility: the tools you learn today are powerful, and if used correctly can make you a computer ninja. Abusing them can get you in trouble with HPA or in the outside world, with greater consequences. Attacking or invading another computer without permission is grounds for dismissal at HPA, according to the student handbook and acceptable use policy at HPA.  What we do in the elab, stays in the elab. First notes: Why do we mess with terminal? it is seen everywhere it can be done remotely it give you god-like powers it looks coolI really want you to learn to play with these commands, they give you total control of any computer, anywhere in the internet... Stopping stuff: ctrl-c means cancel ctrl-z means halt (stop everything, not gracefully) Part one: internet tools: ping, traceroute, nslookup, dns ping:  what is it? sends a data packet to a computer and records the time it takes to echo back to your computer: Screenshot 2026-03-25 at 5.39.42 AM.png Note that it repeats, sending a packet 64 bytes in size to the computer at 10.14.84.12, taking about 1.85 ms (milliseconds) to return. 1000 milliseconds =1 second 1 second, so this computer is likely on your network, wired and responsive Try this: open terminal on your computer ping 8.8.8.8 and notice the return time use control-z to stop this ping 10.14.1.4 and notice return time-why are they different? try ping to your neighbors, their IP addresses may be listed on the board how can you tell if someone is connected by wire or by wireless from their ping? why are gamers interested in ping? look up a ping flood attack-who might use this and why? how many bits make up a byte?traceroute: what is it?  traces the path to a computer, listing the time each packet spends at each node: Screenshot 2026-03-25 at 5.43.21 AM.png Notice that each of these has a name attached to it. In the internet, each number is an address, and a domain name server (dns) converts these from names to numbers and reverse. Notice that each name has a number in parentheses after it Notice also that there are times listed after each one-this is the time spent at each node between your computer and www.apple.com what is the IP address of the www.apple.com server? what is the name of the server at 10.14.1.4? which node is in Honolulu? traceroute to www.apple.com ctrl-z to stop notice all of the steps between, and the times for each step traceroute to a local IP address, like 10.14.4.1 now try the same thing to elab.hpa.edu-how are they different? traceroute to a site of your choice, note the paths to that machine why would gamers like to have short paths?nslookup: what is it? looks up and translates names into numbers, using DNS servers, either the one setup on your computer, or others you can choose, so you can see what IP address a name represents from what DNS server (internal or external) Screenshot 2026-03-25 at 5.48.24 AM.png Ok, lots going on here: first you see 10.14.1.4, which is the DNS server in the elab, which translates names  like www.apple.com into numbers like 23.2.84.211 Do you see the same number in the traceroute test? There are other more complex addresses like 2600:141a:8000:18d::1aca, which is something called IPv6 Why? We are running out of original IP addresses on the internet in the form of 255.255.255.255, so we use "fake" IP addresses inside homes, schools, and businesses, in the form 192.168.1.x or 10.14.x.y you can query (ask) either internal name servers like ours at 10.14.1.4, or you can ask outside name servers why are they different? look below: type nslookup, wait for the weird < character type server 10.14.1.4 then enter www.apple.com enter elab.hpa.edu now type: server 8.8.8.8   (this is the google DNS) enter elab.hpa.edu   why is this different? open a browser and enter http://10.14.4.1  type exit to exit look up your name using the internal dns look up your address using the same tool in reverse Part two: secure shell (ssh) what is it? a secure connection in terminal between your computer and another computer Screenshot 2026-03-25 at 5.59.10 AM.png Ok, first thing I did here was ssh into 10.14.84.2 as pi notice the format: ssh who@IPADDRESS it then asks me if I'm ok trading secure keys with this maching you say "yes" then the key is added to both machines in a hidden file (ask about this if you are curious) it permanently adds 10.14.84.2 to the list of "known hosts" what is not obvious is that the green bit at the bottom is actually INSIDE the second computer you are now inside the second computer and can run commands-from anywhere in the world look on the whiteboard for the IP address of the victim computer make sure your laptop (yours or ours) is on the elab wifi network ping the IP address for the victim traceroute to the victim nslookup for the IP address of the victim ssh into the victim machine: ssh admin@IPADDRESS, login info on the board what do you see? where “are” you? type: say “hello guys” if you can ssh into a mac, play with different voices using say -v “hello” look up the say command on osx and learn how to say different voices Part three: secure shell commands who also whoami last your last command, also the up arrow top lists all processes, useful with kill (see later), looks very cool if you are POS history: shows recent commands like this, useful for retracing your steps or seeing who might have been in your machine login to the victim as above type who, it should say who you are repeat with the whoami command. what is the difference? type last, it should show you who last logged in, and from where why is this useful in determining if your computer has been hacked? WITH PERMISSION: type sudo shutdown -r now this is an example of a linux and unix command:  sudo means treat me like the admin for the machine (superuser do) shutdown says shutdown the machine -r is called a “flag” it modifies the previous command, meaning in this case “reboot after shutdown” if you did this command without the -r, the machine would stay off try the top command, this shows what is going on in the machine try the history command, this is a list of past commands, very useful if you are working on a project, as you can copy this to your other work or records Part four: where the heck am i? New commands: ls means "list files here" pwd means print working directory, or "where am I?" cd means "change directory" cd .. means "go up a floor" Screenshot 2026-03-25 at 6.07.42 AM.png Screenshot 2026-03-25 at 6.07.59 AM.png Screenshot 2026-03-25 at 6.08.25 AM.png in the first frame, notice the folders with capital letters like Desktop or Documents note the red one, this is an app to be installed rpdiags.txt is a text file in the second frame, we are in the directory /home/pi the ~ character means your home directory, you can use this on your mac as well to do cool stuff in the third frame, I changed from /home/pi to /home/pi/Desktop to change back, I could use cd .. ssh into the victim machine  type ls (list files), this shows the listing of files where you are in that machine type pwd (print working directory), this shows what “floor” you are on in a building type cd /home/pi to "change directory" to your home directory type cd ..  (change directory up one) and repeat pwd, what do you see? repeat these steps in a new terminal window on your own computer, and verify by looking in your own home directory open the file browser (yellow icon at the top) and see if what is there matches what you see in terminal question: if there is a nice GUI (graphical user interface) like file browser, why do I need to learn terminal? cd to your desktop and use ls list the files there-what do you see? Part five: creating files New commands: nano is a text editor in the terminal less means "show me what is in a file" more means the same thing, just more detailed Screenshot 2026-03-25 at 6.14.59 AM.png on your raspberry pi, use terminal to navigate to your home directory: cd /home/pi type sudo nano test in the open window, type some wise words type ctrl-o (overwrite) and return exit using ctrl-x on your pi, navigate to your home directory using the file browser and see if there is a new text file there, and open it using the terminal, navigate to your home directory, and type less test, you should see the same document this also works with the more command Part six: creating directories (folders) New commands: mkdir means"make a new directory" which is a folder with that name on it Screenshot 2026-03-25 at 6.21.28 AM.png Challenge: Linux folder challenge navigate to your home directory: cd /home/pi change directory to your desktop: cd Desktop use ls to list what is there-does it match what you see on your desktop? type sudo mkdir awesome (make a directory called awesome) change into this directory using the cd command create a new text file using the nano command inside that folder with your name confirm the new folder and text file show up in the GUI (graphical user interface=your desktop) checklist: awesome folder with text file inside in your namePart seven: put it all together!Challenge: ssh and folders we will be working in pairs for this part ASK PERMISSION FIRST ssh into your neighbor's computer and look at the who command to see who is logged in and from where: ssh pi@10.14.84.x  or ssh pi@name.hpa.edu password who last navigate to their desktop and create a file there called "payload" cd /home/pi/Desktop sudo nano payload type a note to them, make it nice! ctrl-o, return, ctrl-x have them verify that you sent them a little message with their file browser create a folder on their computer called "stuff" cd /home/pi/Desktop pwd ls mkdir stuff cd stuff pwd ls sudo nano herobrine type your name in the message ctrl-o, return, ctrl-x Have them look in the new folder and open the herobrine document shutdown their computer using the shutdown - r now command thank them for letting them invade their computer checklist: payload folder on another computer, herobrine text file inside with a messageChallenge: Find Herobrine login to victim.hpa.edu (login info on the board) locate the herobrine file write a note in the same folder with your name on it checklist: in the victim.hpa.edu computer a note with your name on it in the same folder as the herobrine fileChecklist: at this point you should know how to use each of these: ping  traceroute nslookup ctrl-c ctrl-z network icon sudo shutdown -r now ifconfig who top history ls pwd cd  cd .. sudo nano mkdir sudo apt update -y sudo apt upgrade -y ssh pi@10.14.84.20 IP address, netmask, gateway, dns Migrated from Apple Server Wiki. Original page ID: u4a1W5r8D Ethernet cables If you want to learn about driving, you first have to understand what a road is. In this case, network "roads" are cables, but can also be fiber optics or wireless networks We need to understand how to create one of these "roads" from scratch We will be using either category 5 "cat5" or category 6 "cat6" cables cat5 has a max speed of 1 gb/s, especially if it is labeled "cat5e", or "cat5 extended, cat5e" cat6 has a max speed of 10 gb/s The RJ-45 cable ends for these are not interchangeable, as one wire is a bit thinner than the other (cat5 is 24AWG while cat6 is 23AWG, a bit thicker) The ends are called RJ45 and have 8 slots, with the flat side facing you, and the hole at the bottom, see below. When viewed with the flat side towards you, these are the colors: Screenshot 2026-01-30 at 12.50.35 PM.png This is NOT random The first two orange pairs (1 and 2) are for data transmit The green pairs (3 and 6) are for data receive The blue pair is for power over ethernet (POE) plus (+) The brown pair is for POE negative (-) This color is different from 8 conductor (4 pair) telephone cables which may look exactly alike Reason? Phone cables start with 4-5 as line one, then 3-6 as line two, 2-7 as line three and 1-8 as line four Each of these has up to 90 volts on each pair (when a telephone rings) so we separate our color code for computers Reason? Plugging a computer into a phone outlet will not burn out the network card on the computer this wayCreating an ethernet cable:We will be using pass-through connectors for our cables, along with cat5e cableParts: RJ-45 cat5e pass-through cable connectors (make sure these are the correct size for cat5e) at least 1 meter long length of cat5e cable (cat6 uses different RJ-45 ends) cable strippers (optional if you use the Klein tool below) Klein combo cable crimper tool (yellow) strip one end of the cable about 3cm from the end cut off the tension thread (this prevents stretching when pulling cable) arrange the wires according to the ATT 568B pattern with orange-white on the left side cut the arranged wires flat using the Klein tool or wire clippers about 2 cm from the cable sheath holding the RJ-45 cable end with the flat side facing you, and the open bit facing down, thread the wires into the connector check the order to make sure it matches the image above crimp with the crimping tool repeat with the other end of the cable test with the continuity tester if available, test with the speed tester Migrated from Apple Server Wiki. Original page ID: V7K8W3X3 AI unit 2026 Let in January-February 2026 by Jonathan Grayson: Download AI Unit homeworks.pdf (application/pdf, 95.7 KB) Download Binary Arithmetic.pptx (text/html, 389.6 KB) Download Boolean Logic.pptx (text/html, 488.7 KB) Download AI Unit_Session 1.pptx (text/html, 364.1 KB) Download AI Unit_Session 2.pptx (text/html, 355.9 KB) Download AI Unit_Session 3.pptx (text/html, 370.6 KB) Download AI Unit_Session 4.pptx (text/html, 341.3 KB) Download AI Unit_Session 5.pptx (text/html, 353.7 KB) Download AI Unit_Session 6.pptx (text/html, 545.4 KB) articles: Download SI unit conversion revision.pdf (application/pdf, 102.1 KB) Download Why We’re Not Using AI in This Course, Despite Its Obvious Benefits.pdf (application/pdf, 236.3 KB) Download AI as conspiracy.pdf (application/pdf, 2.0 MB) Migrated from Apple Server Wiki. Original page ID: 979219K1r Arduino unit 2026 These were led by Jonathan Grayson January 2026 Download comp-eng arduino module.pdf (application/pdf, 3.9 MB) Download comp-eng arduino module 2.pdf (application/pdf, 3.9 MB) Download comp-eng arduino module 3.pdf (application/pdf, 3.9 MB) Download arduino.pdf (application/pdf, 6.4 MB) Download arduino parts.pdf (application/pdf, 102.9 KB) Download comp-eng arduino module-markup.zip (application/zip, 7.4 MB) Migrated from Apple Server Wiki. Original page ID: n4n2K4p8 Internet unit 2026 Download CE_ Internet Structure part 2.pptx (text/html, 344.0 KB) Migrated from Apple Server Wiki. Original page ID: 0271T846m Meter unit 2026 Download comp-eng meter unit.pdf (application/pdf, 2.4 MB) Download FLUKE 114 TREM.pdf (application/pdf, 149.3 KB) Migrated from Apple Server Wiki. Original page ID: Y1S367 1.0 Linux intro-Pi400 Question: what is the most powerful and dangerous thing you know? In the computer world, this is linux, which you will be learning on the pink Raspberry pi 400. What is a pi400? Screenshot 2026-03-12 at 8.04.05 AM.png Keyboard and computer in one box attach mouse (white port) attach monitor (HDMI port) attach power (usb-c port) attach your ethernet cable (ethernet port) Download BEGINNERSGUIDE-4THED-ENG_V2.pdf (application/pdf, 34.3 MB)Look up the parts about pi400, chapter 3 First steps: turn the unit on with the power switch on the cord you should see a desktop show up, (make sure the monitor is on) you will notice that experienced users do two things first:  open terminal (black icon in the menu bar) ping 4.4.4.4 what is going on here?Terminal is where most of our work on linux will take placePing is a universal command sending a "ping" or packet to a serverThis is useful in several ways: it shows that the terminal, keyboard and everything is working it shows that your pi400 is connected to the internet it shows that you can reach a DNS (name to number) server on the internetPi400 specifics:This is your home screen: home screen.pngnetwork settings: hover over the wifi icon: network.pngTerminal window: terminal window.pngsystem controls: system controls.pngset browser choice: browser choice.pngChromium settings: chromium settings.pngFile browser: home directory  file browser home directory.png Unix->linux->debian->raspian (debian on a raspberry pi)In 2026, we will be using a version of linux called debian, named after the programmer's wife (Deb) and written by the programmer (Ian).Debian is just one of the flavors of linux you could use, and since ours is running on a raspberry pi, the version is called "raspian"Our 2026 version of raspian is called version 12 or Trixie.See if you can find why these are named this way: https://en.wikipedia.org/wiki/Raspberry_Pi_OSYou might also hear about another popular linux "distro" called Ubuntu, which is popular as a desktop computer alternative. About linux: The short story is that most computers on the internet use linux, which was developed from an older program called UNIX, developed at the University of California Berkeley (Go Bears) in 1980. Linus Torvalds wanted a smaller, free version of this program and developed Linux, or "Linus version of Unix" Unix later became OSX which is what runs on your mac. Who cares?You may find that the terminal on your mac runs many of the same commands as your Pi400.For your mac to run ALL linux commands, we install a program called Homebrew, which you can find here:https://docs.brew.sh/Installation So what can you do with linux? We will learn how to setup networks, web servers, web pages, and anything you can imagine happens with computers on the internet. Oh, and we'll be using your Pi400 as a "victim" you will attack from your mac laptops when we learn cybersecurity. Huh? We don't want to use your personal computer for anything that might compromise your personal data or ability to use your computer for your work. Attacking a Pi is fun, and if something goes wrong, we just replace the hard drive... What hard drive?The SD card on the back of your pi is the drive your computer uses. Take it out and your Pi400 becomes useless. Possible Pi projects: short list web server media server programming python, java, and others robotics AI server, AI bot home automation cybersecurity host or attackerSo, why is it called a "pi"? The terminal Just like an airline terminal, it is the end of a trip, or a place where you can change flights, arrive or depart. The terminal in our case is named after computer terminals that were at the end of a long line to a mainframe server, often in another location.  You may see the abbreviation "tty" around some terminals, this means "teletype" or a typewriter attached to a computer. Dr. Bill first learned on one of these, which punched little holes in green paper tape. Every 8 holes (a "bit") was a character (a "byte")-good for you to remember this... Have you seen the terminal? Sure! Any hacking movie has terminal screenshots, most of them fake, except for a few (look these up) Mr. Robot is one... RootOk, who is this person "root"? Imagine the computer as a tree upside down-the branches are the file systems, and "root" is the superuser that has access to all files. We will sometimes use root, but more often we will use "superuser" or "su" in this format: sudo apt update -y This means: Treat me like the superuser ("superuser-do"), open the free place to update files on the web (apt), and update my computer (update). What is the -y about? Any command followed by a space then a - character is a "flag" In this case -y means "say yes to anything you ask me" Looking around at the pi desktop:  home screen.png find these: apps drawer: upper left corner fruit icon menu bar: top network settings: hover over the wifi icon updates (may show as a pair of arrows) bluetooth pi connect (you can access your pi over the internet) terminal app (black box) file browser (yellow folder) internet browser (globe icon) globe=internet browser (choose below using raspi-config) customize your pi: in your terminal app, type this:sudo raspi-config setting up with raspi-config  pick your browser give your pi a name on the network (this may not work with latest versions) enable ssh (for later) enable VNC (for remote access) who is sudo?"superuser do" use terminal to reboot: sudo shutdown -r now examine that command: shutdown, restart flag, when? Migrated from Apple Server Wiki. Original page ID: U3V4y5b4 1.2 Linux advanced strand Advanced strand:  from “running commands” → “thinking like a system admin / engineer” internal vs. global dns NAT outbound and inbound port forwarding  private addresses look in known_hosts file, repairs why MTM warnings matter mulit-hop remote access (cuckoo’s egg situation) scp processes, kill -9  ps aux | grep blah. (pipes) absolute vs. relative paths wildcards file permissions, ownership  chmod ls -la editing config files reading logs shell scripts making scripts executable crontab -e updating, upgrading, dpkg systemctl start, stop, status ufw status Private addresses: any machine on the internal network likely has a "fake" address in the form of 192.168.x.y, or 10.x.y.x, or in some rare cases 172.16.x.y (nobody uses this believe me) why? look this up compare the IP4 address for the elab-wiki server (see below) to the IP6 address many machines can also be reached by elab.local for example, with no DNS involved challege: look up the default network configuration for several commercial routers: what do you notice?Internal vs. global DNS for internal network users, you can run an internal DNS that resolves names to numbers test this by using NSLOOKUP to look up the elab.hpa.edu server change the DNS lookup server by typing server 8.8.8.8  repeat the command and compare challenge: repeat this process for elab-wiki.hpa.edu and xserve.hpa.eduNAT outbound when you browse the internet, there must be a way to convert your 192.168.x.y address into something else that the web servers can recognize this is done through network address translation or NAT outbound, where your address is translated into the address of your router on the way out this router is what the servers see this process is reversed on the way back in, sending the web page back to your protected internal machineInbound port mapping-firewalls the reverse of this is inbound port mapping, where an outside user contacts your router and is pointed to your internal machine, usually on a defined port, for example to run a game or host a web page challenge: look at the page below and describe how outside users might see the elab-wiki server: Screenshot 2026-03-31 at 1.01.03 PM.png SSH issues: when you establish a secure shell connection, two things are added: one to your machine, the other to the host machine. in your machine, a host file is where these are stored, listing the IP address of the host and a key that the host has shared with you if the IP address of the host changes, you will be faced with a serious message in the terminal that such a host cannot be trusted to solve this, you must find the .known_hosts file on your computer, open the file with nano, and delete the previous IP address + key line in practice, you could just erase the entire file, but any connection you have setup before this will have to be re-established challenge: find the .known_hosts file on your mac and copy a line from it challenge: do the same with the piMan in the middle attack (MTM): it is possible for a hacker or bot to watch the network you are on, and masquerade as the host you are sharing a key with first they watch the keys being transferred, and copy these they then kick the host off the network (usually a wireless attack) they then use the key to interact with your computer, posing as the host MTM warnings check the .known_hosts file and if the IP address does not match, it refuses to connect challenge: ssh into the control computer, then change the IP on the computer and repeat explain why an MTM warning mattersMulti-hop remote access: ssh into one of the pi units in the lab from that machine, login to another machine create a text file in this machine, on the Desktop enter some text and ctrl-o, return, then ctrl-x look up "the cuckoo's nest" by Cliff Stoll  explain how the hacker was tracked and what was the resolutionSecure copy:  on your pi, create a text file called "payload" in your home directory: /home/pi using nano secure copy this file over to another computer using this command: scp /home/pi/payload pi@10.14.84.20:/home/pi go to that machine via ssh and verify that the file has been transferred verify from the GUI as wellprocesses, kill -9 type ps -aux to see a list of processes open some app on your pi look again at the ps command result kill the process by using the kill -9 n.b. be careful with kill -9 it is like an assassination: it kills with no warning, and no mercyprocesses, pipes let's say you are looking for a process, but can't find it piping means sending the result of one command to another like this: ps aux | grep blah this means: "show me all processes and when you get that list grep (search) for the process called blah" try this out with the example abovefiles, wildcards let's say I want to edit the file awesome in the home directory I could type sudo nano awesome or, since I am almost as lazy (faul) as a mathematician, I use: sudo nano awe* this only works if there are no other files in that directory starting with awe, so use this with cautionfiles, listing files the ls command for list is something you will use constantly  it is a summary, to see more, use the ls -la flag: l means long form, or all of the data a means all of the files, even the hidden ones challenge: use the ls -la command on your directory, what do you see? sudo nano .herobrine in your /home/pi directory  enter some text and ctrl-o, return, then ctrl-x use ls on your directory look in the GUI for the file, where is it? repeat with ls -la create a hidden file on a remote machine then challenge the user to find the filefiles, who owns what? in your /home/pi directory, using ls -la you notice lots of other stuff like this: Screenshot 2026-03-31 at 1.36.13 PM.pngwhat does all this mean? d means directory or folder there are then three sets of three letters: r means read, w means write, x means execute these are for three levels of ownership: owner, user, everyone read counts at 1, write counts as 2 and execute counts as 4 (notice how these are all base 2 numbers) we could say a file you could read, write and run as a program was rwx or we could add these to make 7 (1+2+4) chmod is how we change the permissions on a file, so chmod 777 is the same as chmod rwx this would be dangerous, as you have made the file read write and execute for owner, user and everyone you may create a python program you want to run, so you would enter chmod +x program.py this makes the file a program that can be executed challenge: create a text file and notice the permissions cd /var/www/html and notice the permissions on index.html, the home page for your computer on the browser, go to 127.0.0.1 (me myself and I in computer language) sudo nano the index.html file and add some words after "It works" ctrl-o, return, ctrl-x re-visit the home page how could you do this as a remote user?files, installing packages while most apps can be installed using sudo apt get there are others that download into your computer, usually in the /home/pi/Downloads folder to open these, use this command: dpkg -i you might also look at pi-apps, which is an alternate file download project to update your computer, use sudo apt upgrade to upgrade, always add the -y flag: sudo apt upgrade -y Migrated from Apple Server Wiki. Original page ID: T557x3 1.3 html and web servers Module 4: web server and web pages (html) see also https://elab.hpa.edu/cs/TC/TC%205.0%20HTML.pdf Background: html stands for hypertext markup language it is a markup language, not really programming like python or C it manages how information is presented ("marked up") for viewers others include xml and xhtml, both managing data as well as format (more on this soon) Installing a web server: On the raspberry pi, run the following commands: sudo apt-get update (this updates your computer) sudo apt-get install apache2 -y (this installs apache web server on your computer, answering yes to all prompts) Go your browser and enter 127.0.0.1 (which means "me" on the internet) Now type ifconfig in your terminal and look for your internet address, which should start with 10.14.x.y Look at this address using your browser Setup your web folder, edit a page: changing the home page, which is always index.html on any web server: On the terminal, navigate to the following directory: cd /var/www/html/ run the ls command, you should see a file called index.html You can edit this, either by using the nano command (cooler) or later using text editor (simpler) sudo nano /var/www/html/index.html This is a complex bit of html, so just look for something you recognize from the 127.0.0.1 test and change it, like the line "It works!" nano is a text editor, so ctrl-o means overwrite, then return to save, and ctrl-x means exit If you are using a GUI text editor, it might not let you save. Next we have to fix the permissions: the directory where all of your web pages are stored is /var/www/html we need to "open" the directory so you can play in it, and not have to be sudo to change stuff (for now) to change the permissions on a file, we use chmod, short for "change the mode" permissions are in sets of three: read (4), write (2), execute (1) (to run a program) add them all up to get 7 to do everything so chmod 777 means read this file, write to this file and execute it you might also see these in ls -la as rwx for read, write, execute for owner, group, everyone so 777 would look like rwx, rwx, rwx (look with ls -la) type chmod 755 -R /var/www/html this makes everything in the html directory read and writable to you and anyone can read the index.html page is the default that every web browser looks for FIRST you can specify other names in your browser to look around listing the files in a directory is very useful, but also dangerous for hackersMore on permissions: 755: Owner (rwx), Group (r-x), Others (r-x) - Standard for scripts/folders. 644: Owner (rw-), Group (r--), Others (r--) - Standard for files. 777: Owner (rwx), Group (rwx), Others (rwx) - Public -R means recursive, or all folders and files below this point HTML Challenge: Part 1: Making a new web page: cd to the /var/www/html directory and look around (ls -la) Using either nano create a new page: sudo nano test.html You'll notice this is blank. Add the following to your new web page: test Wow, this is really easy,I am now a true webmaster!Beware my awesome computer skills! remember to overwrite (ctrl-o), return to save,  and exit (ctrl-x) Now go to your browser and enter http://127.0.0.1/test.html What do you see? Create your own pages in your html folder and test checklist: test.html with your text in it seen from the browser at your web address: http://victim.hpa.edu for exampleHTML Challenge: Part 2: Create folders so you can browse your files: cd to the /var/www/html directory and look around (ls -la) make a new folder using mkdir mystuff cd into that folder and use sudo nano to create a new file called secret.txt go back to your browser and go to http://127.0.0.1/mystuff/ look for the secret.txt file and open it with your browser cool! you can now download photos, images, screenshots, any file you like into your web server! checklist: folder inside your websiteHTML Challenge: Part 3: Using a text editor to edit and create pages: (may need permissions changed to 777 see above) use the folder browser to navigate to the /var/www/html folder open a text editor and create a page called test2.html add code as you did with the nano editor save and test create a new folder on your web server  create a document there with secret content challenge your friends to find this page checklist: show me the hidden folder in any browserHTML Challenge: Part 4: Remote web page creation: ssh into 10.14.84.20 or victim.hpa.edu navigate to the /var/www/html folder create a folder with your name (short version all lowercase, no spaces) create a document in html inside the folder  browse from your station to verify your new web site! challenge your friends to read your secret message  checklist: a folder on the http://victim.hpa.edu website in your name, with an html document inside Next steps: https://www.w3schools.com/ HTML and w3schools challengehttps://www.w3schools.com/html/default.asp create some pages using the w3schools tutorials: must include: headings paragraphs links images list format copy this code into your local web server, test copy this code into the victim.hpa.edu server, test checklist: seeing your code on the http://victim.hpa.edu website external access: http://sensor.hpa.edu:8090Examples: copy these html codes into your computer using nano and separate name and check the pages with your browser:(to find your hard drive on the mac, click on the desktop, hold command-comma and select hard drive and connected servers) From Leo: leo.html

Hello World

From Ana Sofia: ana.html This is my homework!!

This is the first heading of my homework :p

And this is the first paragraph, helloo Dr. Bill

From Dominik: dominik.html Dominik's Page

Welcome to my webpage

Hey, I am Dominik, and I have a dachshund named Luna

here's one that does not work: find out why and repair this cool page:From Rella: rella.html Rella’s wed page/ title> </head> <body> <h1>Welcome to Rella’s web page</h1> <p>I am a student at Hawaii Preparatory Academy.</p> <h2>About Me</h2> <p>I like cheerleading and listening music.</p> <h2>My Favorite Things</h2> <ul>I’m       <li>Cheerleading</li>       <li>Music</li>       <li> Spending time with my family</li> </ul> <p>This is my first HTML page!</p> </body> </html> Migrated from Apple Server Wiki. Original page ID: M9n9_4y 1.4 networks Module 3: Internet Your computer needs 4 things to be able to get onto the internet: IP address, example 10.14.8.4 Subnet mask, example 255.255.0.0 Gateway/router, example 10.14.0.1 Domain name server (DNS), example 10.9.250.13 Here's what each one does: IP address: All traffic on the internet or local area network (LAN) is in the form of packets of information, like mail envelopes with a letter inside. Each letter you mail has two important things: the address you want it to go to, and the message inside the envelope. TCP/IP is the format of these, which stands for Transmission control protocol and internet protocol. The TCP part is the message, and the IP part is the envelope, with an IP address on it. Check the IP address of your machine: From the GUI: open system preferences, network From the terminal: type ifconfig Subnet mask: Imagine you want to stay in one of two large 254 room hotels. One has long hallways, and very few floors, the other has many floors, but short hallways. If you want to sleep, you don't want many people walking down the hall in front of your room. You want many floors with fewer rooms per floors. This is what subnet masking does on a network. Each of the four segments can hold 254 addresses. At home, you probably have a network that looks like this: IP: 192.168.1.49 mask: 255.255.255.0 router: 192.168.1.1 dns: 192.168.1.1 This means that the last zero can hold up to 254 addresses (from 192.168.1.1 to 192.168.1.254) HPA has this sort of mask: 255.255.0.0 which means that 10.14.0.0 is the elab, which can have 254 x 254 addresses It makes for a quieter network, also providing some security as others cannot see you easily. Router/gateway: This is the gateway for all of your traffic, usually the access point at your home. The technical difference between these words is that a router routes traffic between two networks of the same type (like ethernet), while a gateway is between different types of networks (like a cable modem or DSL gateway) Domain name server: This is the computer on your network or outside that translates names into numbers, like a digital phone book. Try this in terminal: nslookup physics.hpa.edu when you get the address, write it down open a browser go to physics.hpa.edu now go to the numbers you wrote down. Try this with another name, either on campus or off Ping and traceroute: Imagine you want to find out if a machine is responding (you can block this by using "stealth mode") In terminal ping one of the IP addresses in your class ping an address out on the internet what is the difference? now try this: traceroute www.apple.com It should give you a trace of the path your connection took. Try this with other addresses on and off campus. NSLOOKUP: Say you want to find out the name of something, or the IP address from the name. try this: nslookup (you will get a funny > sign) type: server 10.9.250.13 type: physics.hpa.edu what do you get? where is this machine? Try again using 8.8.8.8 as the server The best use of this is to find out what OTHER people might call a machine. We have several DNS servers at the elab, the main one is at 10.14.1.5 Others to try: 4.4.4.4 8.8.8.8 10.14.1.2 you can get out by typing exit or control-z (halt) Migrated from Apple Server Wiki. Original page ID: 72g7j5j8 1.5 routers and firewalls As a computer engineer, you will doubtless be asked to setup a home router for your home or one of your friends (you could even make a job of it). Definition of terms: Router: anything that converts one physical form of data transmission like a cable modem or fiber to a wired ethernet network Access point: a wifi station that broadcasts your INTERNAL network for users in your home Switch: anything that connects parts of a wired network to another part, like a hub, only smarter, some routers have a few ports built in, which you can see below Firewall: a special part of most routers that blocks invaders but can also be seen as a "bouncer" at a bar, letting in some people and not others WAN is the wide area network, or the internet in our case LAN is the local area network, your home network that we need to keep safeSome terms to review first: Internet terms: Your computer needs 4 things to be able to get onto the internet: IP address, example 10.14.88.83 Subnet mask, example 255.255.0.0 Gateway/router, example 10.14.1.3 Domain name server (DNS), example 10.14.1.4Look up your network settings on whatever device you are on, you should see all of theseMac: look under system preferences, network: Screenshot 2026-04-22 at 3.31.30 PM.pngPi: look for up and down arrows on the upper right, select "advanced options" and "connection information" Screenshot 2026-04-22 at 3.31.03 PM.png Here's what each one does: IP address: All traffic on the internet or local area network (LAN) is in the form of packets of information, like mail envelopes with a letter inside. Each letter you mail has two important things: the address you want it to go to, and the message inside the envelope. TCP/IP is the format of these, which stands for Transmission control protocol and internet protocol. The TCP part is the message, and the IP part is the envelope, with an IP address on it. Check the IP address of your machine: From the GUI: open system preferences, network From the terminal: type ifconfig Your computer may have an address in the form 10.14.253.x, this means you are "leasing" an address from the system (more below) Subnet mask: Imagine you want to stay in one of two large 254 room hotels. One has long hallways, and very few floors, the other has many floors, but short hallways. If you want to sleep, you don't want many people walking down the hall in front of your room. You want many floors with fewer rooms per floors. This is what subnet masking does on a network. Each of the four segments can hold 254 addresses. At home, you probably have a network that looks like this: IP: 192.168.1.49 mask: 255.255.255.0 router: 192.168.1.1 dns: 192.168.1.1 This means that the last zero can hold up to 254 addresses (from 192.168.1.1 to 192.168.1.254) HPA has this sort of mask: 255.255.0.0 which means that 10.14.0.0 is the elab, which can have 254 x 254 addresses It makes for a quieter network, also providing some security as others cannot see you easily. Router/gateway: This is the gateway for all of your traffic, usually the access point at your home. The technical difference between these words is that a router routes traffic between two networks of the same type (like ethernet), while a gateway is between different types of networks (like a cable modem or DSL gateway). A firewall is just a gateway that has an outside part and an inside part. Your gateway may also distribute IP addresses inside your network. At home this will likely look like 192.168.1.x, where at the elab, our network leases addresses in the form 10.14.253.x. To scan these addresses here, you can use nmap 10.14.253.0/24 Domain name server: This is the computer on your network or outside that translates names into numbers, like a digital phone book. Try this in terminal: nslookup elab.hpa.edu when you get the address, write it down open a browser go to elab.hpa.edu now go to the numbers you wrote down. Try this with another name, either on campus or off you are asking our domain name server (DNS) to resolve the name into a number this also works in reverse, from numbers to names using ARIN.net you can find the location of IP addresses outside your network----tools to use to check your network configuration, or fix a broken one------- NSLOOKUP: Say you want to find out the name of something, or the IP address from the name. try this: nslookup (you will get a funny > sign) type: server 10.14.1.4 type: elab.hpa.edu what do you get? where is this machine? Try again using 8.8.8.8 as the server (this may be blocked by our system) The best use of this is to find out what OTHER people might call a machine. We have several DNS servers at the elab, the main one is at 10.14.1.4 Others to try: 4.4.4.4 8.8.8.8 (google) you can get out by typing exit or control-z (halt) Ping and traceroute: Imagine you want to find out if a machine is responding (you can block this by using "stealth mode") In terminal ping one of the IP addresses in your class ping an address out on the internet what is the difference? now try this: traceroute www.apple.com It should give you a trace of the path your connection took. Try this with other addresses on and off campus.----------------------- A router is a device that physically separates two networks. If the router can also filter traffic in and out of your network, it is also a firewallYou will setup a firewall here, and your friends will try to "break in". Thinking of a selective club or restaurant: there would be the bouncer (usually a very big person guarding the door) who lets some traffic (people) in.The bouncer can also get messages out of the restaurant to the outside, and when the message returns, they can pass it back inside. Router setup: We will first be using the TP-Link Archer C9 home router/access point for your network.  Why? It should be similar to most home routers you will setup for yourself or your friends. Industrial ones for colleges and such may have more options, but the fundamentals are the same.We have others for you to learn on as well, so you will be able to make many $$$ if you want to charge folks... Here's what it looks like: start with the ports: blue is the WAN (wide area network) you connect to the internet yellow are the LAN (local area network) ports for your network. the usb port is for external storage note the antennas, most routers will have many of these, or they may be built inSetup: the WAN for your router will be the HPA elab network, in the form 10.14.254.x, connected to the blue port your router will borrow an address from the elab for the day, which is called DHCP, just as your laptop, iPad or phone borrows an address when you come into the elab the LAN side of the router (yellow ports, pick one) should be in the format 192.168.1.x and will usually be the first in this subnet or 192.168.1.1. the domain name server is usually baked into the router, so same address the router will also give out DHCP address to the LAN side, so you will connect your pi to the LAN side with a wire, and your laptop to the router using the wifi network of the router/access point make sure the router is completely erased, and start from scratch, connecting as above and see what addresses you have go to the admin page and change the wifi network name and password (keep these secret)Inbound port mapping:Suppose you want to have a web server in your home, but you don't want everyone in the world to get into your computer.A firewall can be setup to pass inbound traffic on certain ports, in our case port 80 (web) and port 443 (secure web).We want to be very safe with your computer so first of all, create a temporary web server on your laptop. Enter the following in terminal on your laptop: python -m http.server 8000 Now go to your browser and type in http://localhost:8000What do you see?Repeat using http://127.0.0.1:8000What now? We want to pass inbound visitors (the bouncer again) to your inside web server.Locate the pages that say inbound port mapping.Enter the port 8000 and the IP address your laptop now has from the router wifiapply and save From a computer elsewhere in the elab, go to the outside address of your router on a browser, using the same port:10.14.254.x:8000 See?Wow! you just setup a network with a server at your house!Could this work for hosting a minecraft server?  Next: only letting your friends into your wifi, even if someone gives them your secret password! Challenges: connect a router to the internet (WAN) and a wired computer (LAN) including power and admin user setup a basic wifi network with password show how to monitor who is using your wifi network setup restrictions on your network using MAC addresses (like they do in the dorms) setup port forwarding from the WAN side to your pi web page (port 80) setup port forwarding from the WAN side to your pi port 8000 running python3: python3 -m http.server Homework: 4.27.26 Looking at this diagram, where do you connect the internet? Screenshot 2025-09-03 at 4.37.41 PM.png What is the outside address for this router?  Screenshot 2026-04-27 at 3.16.59 PM.png 3. what is the MAC address for the computer that is not a PI?  Screenshot 2026-04-27 at 3.15.02 PM.png 4. If you were a hacker, how would you know that #1 and #3 are Pi-400 from their MAC address? (hint: copy the MAC address into https://www.wireshark.org/tools/oui-lookup.html) Migrated from Apple Server Wiki. Original page ID: x6e0d8v3_ 1.6 wireless networks Let's start with your wifi connection: On your mac, find the wifi icon on the upper right: Screenshot 2026-04-29 at 7.43.13 AM.png Hold option and click on the icon, you should see this: Screenshot 2026-04-29 at 7.21.17 AM.png Let's decode this a bit: IP address: your address on the wireless network (this may also show up as a client on your router project) Router: usually the IP address of your home router (the one you were creating in the last lab) MAC address: the MAC hardware address of your computer, again something you saw in the router lab Security: encoding scheme, WPA3 is the latest one, WPA means wireless protected access BSSID: the base station ID MAC address, important to know if you are being attacked, or to see if you are connected to the closest access point (AP) Channel: there are two or three frequency bands: 2.4 gHz, 5.8 gHz and lately 6 gHz, each with "channels" Country code: each country has specific channels that are allowed, e.g. in the US, 2.4 gHz has 1-11, but in Japan they have 1-13, so some students use Japanese APs with Japanese computers to get around HPA wifi RSSI: Received Signal Strength Indicator, or how strong your computer "hears" the access point, note it is a negative number, so -69 is better than -89 dBm (decibels above a milliwatt) Noise: this is how noisy your wifi environment is. the lowest I've ever seen is -110 dBm in the middle of the desert near Mauna Loa. subtract the noise from the signal to get the amount your computer can actually use. if you try to talk to someone in the shower, they can't hear you (high noise) but you can hear them (low noise). same reason you can whisper in the library (low noise, low signal) TX rate: transmission rate, or how fast your computer can talk to the access point. if this is low, you are likely seeing it as slow emails, slow web, or impossible streaming. on newer macs, you may see this go slow when you are not using the internet, and then jump very high when you are browsing-try it. PHY mode: the type of encoding your wifi hardware is using, all based on standards set by the IEEE, so 802.11 means wifi, 802.11a or b were the first, we are now at 802.11ax or even 802.11be, which can be faster than ethernet MCS: modulation and coding scheme: a combination of factors between 1-31, with 31 being best connection NSS: number of spatial streams: essentially the number of antennas active on your device, usually 1-3, with more antennas meaning faster connections. my computer above has two antennas working, try your newer macs, they may have 3 or more.Questions #1:  why are these usually hidden from "normal casual" users? what superpower does this information give you as a user? how can you use this information to diagnose wifi issues for your friends? if you were running your router at home, how could you tell if users were having issues? Next try wifi explorer: (installed on the elab macs, you can download free versions)Wifi explorer mac installer (7 day trial):  WiFi Explorer.zip Screenshot 2026-04-29 at 8.05.54 AM.pngLet's decode this image: look first at the lower image: notice the overlapping networks and the channels-this is bad look at the table: note the BSSID for each client, and which network they are attached to note the networks with no name: "hidden network". how could you set this up on your home router? the cute little lock icon means secured network. where would you see a wifi network without this? the vendor at this location is ubiquiti, yours might be TPLINK or Synology signal is how strong each client sees THEIR access point, useful if you are helping a friend with wifi issues channels are same as the lower image, you can click on the top header to organize these by number channel width is like the lanes on a highway: more lanes means more traffic, but is also means if you are in a tiny car (one lane, small bandwidth) a big truck taking up several lanes will wipe you out. these vary from 20 gHz wide to 160 gHz wide and even 320 or 640 on some new wifi7 devices which only the latest laptops can use. band is 2.4, 5.8 or 6 for now generation is the version of 802.11 the client is using, you might hear about wifi6 or wifi7, most of your laptops are using wifi4 or 5, but "stupid" devices like cameras might still use wifi 2 or 3, slowing down the entire network, one reason we segment them to a "slow" network security, as above is the level of security used, which you might see as usually WPA3, but cameras might still be using WPA (no number, just WPA one) which can be cracked on your laptop in about 2 minutes max rate: look at the fastest rate for this computer: 5764 mb/s, which is 5x the speed of your ethernet cable. this does not mean wifi is always faster than wired networks. wired networks can transmit (talk) and receive (listen) at the same time, while wifi networks can only do one or the other (for now). also, wired networks are inherently more secure, as they are physically separated from hackers.Try joining a wireless network then use some of the scanning tools we have on the elab macs: IP net monitor network radar iNet scanner IP scanner network kit Some technical details to review: Wifi uses one of three radio bands:  2.4 gHz: long range, lower data rates, stopped by water, wet leaves, humans 5.8 gHz: shorter range, higher data rates, goes through water better 6 gHz: very short range, humongous data rates, no issues with water Signal and noise: As mentioned above, try talking with someone who is in the shower: you can hear them, they can't hear you-why? Same signal (speech) but your noise level is lower (high signal to noise ratio or SNR). Shower person has high noise (shower), same signal (speech), low signal to noise ratio. This is crucial....MIMO:  Multiple in, multiple out and other ways access points "steer" radio beams You may have noticed several antennas on your routers, these are used for aiming the wifi beam at users If many people are on the same access point, the AP has to keep steering beams to everyone, overloading it. If some users are at the limit of range (fringe users) this slows the entire network slows down: "can you hear me now?"Improving your wifi network: look at the spectrum diagram notice any overlaps change the channel on your AP so that it is not overlapping re-check your signal levels cybersecurity bits: As a hacker, what do you have here that you don't have before?  After setting up your own wifi, what do you see here that you can do to improve the security of yours? How could you use this tool and the OUI lookup tool online to get into a network? Is there a site that lists all of the default passwords for access points?  Find it and lookup a few from your scans...Questions #2: How will this enable you to improve the wifi at home? What did you learn doing this that can improve your user experience? How many "illegal" wireless networks did you find on campus? Please email screenshots of what you findNext: netspot wifi mapping Top Homebrew WiFi Utilities airport (CLI): A powerful command-line tool to scan, manage, and display WiFi network information on macOS. Install: brew tap xwmx/taps && brew install airport WiFiman Desktop (GUI): A comprehensive tool for monitoring and troubleshooting network performance. Install: brew install --cask wifiman Neo Network Utility (GUI): A tool providing detailed network information and diagnostics. Install: brew install --cask neo-network-utility tiny-wifi-analyzer (GUI): A community-driven tool for real-time Wi-Fi network visualization. Install: brew install --cask tiny-wifi-analyzer wifi-password (CLI): A simple tool to display the password of your current WiFi network. Install: brew install wifi-password Bettercap (CLI/Web UI): A framework for testing wireless networks and network security. Install: brew install bettercap Wifite2 (CLI): A tool to automate auditing encrypted wireless networks. Install: brew install wifite Install: brew install wifitui  Network Diagnostic Tools (Brew Formulae)  Wireshark (GUI): Captures and analyzes network packets in real-time. Install: brew install --cask wireshark nmap (CLI): Network discovery and security auditing. Install: brew install nmap tcpdump (CLI): Command-line packet analyzer for network troubleshooting. Install: brew install tcpdump  brew install wifi-password bettercap nmap tcpdump brew install --cask wireshark brew install --cask wifi-explorer brew install --cask netspot cba3ef6a-a55e-a55e-5df6-1aa14395f164 Migrated from Apple Server Wiki. Original page ID: 81N9Z7Y1 1.7 Final project: Capture the flag Capture the flag challenge: You will hide an encrypted message in each of your pi400 computers connected wirelessly to the router you setup with a hidden wifi network. The challenge is for your hacker friends to do the following: find your wifi network (it may be hidden) identify your wifi router by MAC address access the "home" wifi network, using social engineering clues scan your internal "home" network to find both of your pi400 units  get into each pi400 unit find the hidden encrypted file decode the file leave an encrypted message in the same folderPoints will be given for each successful step! Your "home" setup: reset (erase) your router setup your router with a hidden wifi network, and a password that the hackers can find about your team connect each of your pi400 to the wifi network you have created and the wired connection to the router on each of your pi400s, create a hidden folder inside the folder, create a "hashed" SHA256 message using this:https://docsallover.com/tools/sha256-encrypt-decrypt/ example: the word "secret" hashes into 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b  which is how your passwords are actually stored (test this to confirm)Hacker tools:Wifi explorer IPnetmonitor nmap (terminal command)password hash encoder decoder Migrated from Apple Server Wiki. Original page ID: H8A544