Ethical › Module 3 › Lesson 2
Connect Scans vs Stealth Ideas
What SYN/connect mean at a beginner level — no attack playbook for café Wi-Fi.
Visual · connect_vs_stealth_handshake
A connect scan finishes the TCP handshake. A SYN/half-open idea stops early.
Opening
Connect finishes the handshake. “Stealth” is a half-open idea — literacy for defenders, not a café hiding kit.
Lesson 1 named a scan as many connect attempts. Demo asset for writeups: http://192.168.0.1/ — a lab VM / app YOU own. You will not receive an IDS-evasion cookbook, nmap hide-from-SOC flags, or a café scan playbook. Command guides sit next to each idea below — copy them. Teaching bind stays 127.0.0.1. Original Cyberlium — not official EC-Council training. Next: Reading Scan Output Without Crossing Scope.
1. The three-way handshake as a door conversation — completed versus abandoned
TCP does not start as a stream of your HTTP. It starts as a negotiation. Host A wants to talk to a port on Host B. A sends SYN (“I want to start”). If something is listening and willing, B sends SYN-ACK (“I heard you, here is my half”). A sends ACK (“agreed”), and the connection is established. After that, bytes can flow — banners, HTTP, SSH greetings — which is Module 4’s problem, not this one. A connect scan, in Cyberlium wording, is: attempt that full negotiation, notice whether it finished, tear the socket down, try the next port on the SAME allowed host. It is honest. It is also loud in places that log accepted connections: SSH auth logs may stay quiet if you never speak SSH, but a local netstat, a firewall “established” counter, and some application servers will still have seen a client appear and leave.
On http://192.168.0.1/ the “other host” is YOUR lab app only after you identify it is not a router. Completing a handshake with python -m http.server you started is you talking to yourself (SAFE bind 127.0.0.1). Completing a handshake with a café POS is someone else’s door. Do not compare connect versus SYN on a school jumphost. Copy the command guide below, run it, then keep reading.
Command guide
Handshake check — WHAT/WHY for each command (YOUR lab only)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install nmap sudo apt install python3
macOS:
Command — copy this
brew install nmap brew install python3
Windows:
Command — copy this
choco install nmap # or download https://nmap.org/download.html
Download https://python.org/downloads/
2. Half-open as a concept: SYN without the last ACK — not a flag chart
The half-open idea is simple enough to hold without a tool recipe. If a tester sends SYN and then does not complete ACK, the listener may have spent a moment in a half-open state (historically a SYN-flood resource issue as well — you will not practice floods). From a scanner’s selfish view, SYN-ACK still said “something is willing,” and RST said “nothing wants this,” while a silent drop said “filtered or dead.” From a defender’s view, systems that only log completed sessions can miss that knock. Packet capture, stateful firewalls, and IDS that watch handshake abuse may still see it. That split — session logs versus raw TCP — is why the nickname “stealth” exists. The nickname is a warning to defenders, not a grade for students.
This course will not tell you which nmap switch starts a SYN scan. It will not tell you how to fragment packets, decoy, idle-scan, or tune timing to slip past a SOC. Copy the literacy block below — definitions, not a hiding kit. connect_ex on YOUR lab already teaches OPEN versus not.
Command guide
Stealth literacy — WHAT/WHY (no half-open kit)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install nmap
macOS:
Command — copy this
brew install nmap
Windows:
Command — copy this
choco install nmap # or download https://nmap.org/download.html
═══ COMMANDS ═══
Command — copy this
cat >> "$NOTES" << 'EOF' connect_means: completed SYN + SYN-ACK + ACK (full handshake) syn_half_open_means: SYN without the last ACK — a PICTURE for defenders, not homework why_stealth_nickname: some APP/session logs only record completed sessions defender_watch: firewall SYN counters / packet capture on systems YOU own demo_url: http://192.168.0.1/ (STOP if router admin) safe_host: 127.0.0.1 refuse: nmap -sS, timing templates, decoys, cafe, campus IDS hide EOF
3. Defender angle: completed connections are easier to see; half-open can hide from the wrong log
If you administer a box you own, prefer to look at more than one kind of record. A web server access log often shows completed HTTP, not a naked SYN. sshd may log a connection only after protocol greeting. A host firewall might count SYNs separately from ESTABLISHED. That is why a defender who only tails application logs can believe “nobody scanned us” while a packet capture shows a burst of SYNs. Teaching you that gap is ethical: it makes your future detection better. Teaching you how to aim the burst at a campus IDS is not ethical in this course. When you write notes, write the detection sentence: “connect scans are more visible in completed-session logs; half-open ideas exist so I do not trust those logs alone on systems I own.”
Do not invert the lesson into “therefore I should always half-open so I am invisible.” On a café, quiet unauthorized scanning is still unauthorized. Stay honest on YOUR lab (DEMO http://192.168.0.1/ if it is your app; else 127.0.0.1). Copy the local-listener check below.
Command guide
Defender view — WHAT/WHY: listeners vs completed HTTP (this host)
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl
Built-in (iproute2)
macOS: Use: netstat
Windows: Built-in (PowerShell: Invoke-WebRequest) Use: netstat
═══ COMMANDS ═══
Command — copy this
ss -ltn || netstat -ltn
Command — copy this
curl -sS -m 2 -D - "http://127.0.0.1:8000/" | head -n 12
4. What this lesson will not put in your terminal — the refusal list is the skill
Refusal list, write it into the notes: no nmap timing templates as an evasion drill; no guest VLAN; no decoys; no idle scan of a neighbor; no “use SYN so the café does not log me.” Positive list: define connect vs half-open; run the command guides on YOUR lab (http://192.168.0.1/ if it is your app, else 127.0.0.1); chmod 600.
If a video titled with a cert acronym demonstrates those refusals against a public IP, that video is not this lesson. Original Cyberlium teaching mapped to a CEH v13 domain does not import the demo’s target. Completing this file does not grant CEH. If you feel behind because you did not hide from anyone, you are on the path. Lesson 3 will make the output words precise — OPEN, closed_or_filtered, timeout — still about a listener you started or the absence of one on loopback.
5. Wrong vs right: café stealth playbook vs defining both ideas on loopback
Worked failure — same TCP vocabulary, opposite intent. Right never needs a SOC to hide from, because the only host is 127.0.0.1.
Wrong
Collect nmap flag recipes to evade IDS. Time a /24 so café logs look like browsing. SYN-scan a campus jumphost “to compare connect vs stealth.” Skip notes. Call quiet unauthorized traffic advanced CEH. This course is not official training and does not give you that playbook.
Right
Define connect as a completed handshake and SYN/half-open as a conceptual incomplete one. Note that completed connections are more visible in many logs, so defenders must not trust session logs alone. Optional connect_ex on 127.0.0.1 only. Write connect-vs-stealth-notes.txt under $HOME/cyberlium-lab, chmod 600. Next: Reading Scan Output Without Crossing Scope.
6. Hands-on: define both in your own words; optional loopback connect_ex; lock notes
The required artifact is a notes file, not a stealth tool. Fill definitions, the defender sentence, the ethics line, and the legal line. The Python below is optional proof you can still complete a handshake on loopback; it refuses any other host and does not implement half-open packets. Windows: WSL/Git Bash for chmod, or restrict the file in your profile; Test-NetConnection 127.0.0.1 -Port 8000 is still a connect-style check, still loopback only.
Command guide
connect_vs_stealth_notes.sh — definitions + optional loopback connect; no evasion kit
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install nmap sudo apt install python3
macOS:
Command — copy this
brew install nmap brew install python3
Windows:
Command — copy this
choco install nmap # or download https://nmap.org/download.html
Download https://python.org/downloads/
═══ COMMANDS ═══
Command — copy this
cd "$HOME/cyberlium-lab"
Command — copy this
cat > connect_vs_stealth_check.py << 'PY'
import socket
HOST = "127.0.0.1"
PORT = 8000
if HOST != "127.0.0.1":
raise SystemExit("refusing non-loopback — this is not a stealth scanner")
s = socket.socket()
s.settimeout(1.0)
s.close()
print("host:", HOST)
print("port:", PORT)
print("meaning: 0 => completed TCP handshake from this process")
print("stealth_idea: SYN without final ACK may miss session logs — defenders watch more than apps")
print("ethics: 127.0.0.1 only; no cafe; no campus; no IDS evasion cookbook")
PYCommand — copy this
python3 connect_vs_stealth_check.py || python connect_vs_stealth_check.py
Command — copy this
{Mission: connect-vs-stealth-notes.txt in cyberlium-lab (mode 600)
1) In your own words, define a connect scan (completed handshake) and a SYN/half-open idea (incomplete handshake). Write the defender sentence: completed connections are more visible in many logs. 2) Optional: run the loopback connect_ex check. Do not add nmap flags. Fill $HOME/cyberlium-lab/connect-vs-stealth-notes.txt and chmod 600. 3) Ethics line: no café stealth playbook, no IDS-evasion cookbook, no campus SYN comparison. This is original Cyberlium teaching, not official CEH training.
Stuck? Ask Cyberlium AI Mentor
If “stealth means I should hide from café logs” still feels true, ask for a hint — not nmap switches. Try: "Hint only: why a completed connect is more visible in session logs, why half-open is defender literacy rather than a hiding kit, and why I still only scan 127.0.0.1?" You still fill connect-vs-stealth-notes.txt. No timing templates. No SOC-evasion flags.
You now can say connect versus SYN without turning either word into a café playbook. A completed handshake is a real session from the stack’s view and is easier to see in many logs. A half-open idea exists so defenders do not trust those logs alone. Students still only scan 127.0.0.1. Notes are locked. This is original Cyberlium teaching mapped to a CEH v13 domain — not official EC-Council training, not a cert, not exam dumps. Next — Reading Scan Output Without Crossing Scope — treats OPEN, closed_or_filtered, and timeout as facts about YOUR listener, not as permission to hunt the LAN until something answers.
Knowledge Check
APPLY: A classmate wants nmap timing templates and a SYN scan of café Wi-Fi “to learn stealth like CEH.” What did this lesson teach, and what do you do?
Multiple choice
Knowledge Check
APPLY: True or False: Because completed connections are more visible in logs, you should always half-open scan the dorm so application logs miss you.
True or False
Knowledge Check
APPLY: You are filling connect-vs-stealth-notes.txt. Which pairing matches mechanism and ethics?
Multiple choice
Knowledge Check
APPLY: curl of http://192.168.0.1/ shows a home router login (TP-Link / Netgear / Huawei / "Router Admin"). Is that DEMO in scope as a hacking target?
Multiple choice