{"id":17,"date":"2025-10-03T14:38:25","date_gmt":"2025-10-03T14:38:25","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/e_henderson\/?p=17"},"modified":"2025-10-03T14:38:25","modified_gmt":"2025-10-03T14:38:25","slug":"free-friday-10-3-25","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/e_henderson\/2025\/10\/03\/free-friday-10-3-25\/","title":{"rendered":"Free-Friday 10\/3\/25"},"content":{"rendered":"\n<p>So, I decided to start scripting  for windows for cyberpatriot, working on a couple on things;<\/p>\n\n\n\n<p>First, I opened the checklist on Github to see what to look for, then used copilot for extra help when i was confused.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># For windows\n\n# Use PowerShell to open the official Microsoft Defender page in the default browser\npowershell.exe Start-Process \"https:\/\/www.microsoft.com\/en-us\/windows\/comprehensive-security\"\n\n\n# Replace \"Ethernet\" with the name of your adapter\npowershell.exe -Command \"Disable-NetAdapterBinding -Name 'Ethernet' -ComponentID 'ms_tcpip6'\"\n\n# Stop SSDP Discovery Service (UPnP)\nStop-Service -Name SSDPSRV -Force\n\n# Disable SSDPSRV from starting automatically\nSet-Service -Name SSDPSRV -StartupType Disabled\n\n# Block port 1900 (UDP) via Windows Firewall\nNew-NetFirewallRule -DisplayName \"Block UPnP Port 1900\" `\n    -Direction Inbound `\n    -Protocol UDP `\n    -LocalPort 1900 `\n    -Action Block\n\n# List all Windows optional features and their current state\nGet-WindowsOptionalFeature -Online | Select-Object FeatureName, State\n\n# Save as check_features.ps1\nGet-WindowsOptionalFeature -Online | Select-Object FeatureName, State\npowershell.exe -ExecutionPolicy RemoteSigned -File check_features.ps1\n# List current shares\n\nGet-SmbShare | Where-Object {$_.Name -in @(\"Admin$\", \"IPC$\", \"C$\")}\n\n# Optional: Remove shares (use with caution)\n# Remove-SmbShare -Name \"Admin$\" -Force\n# Remove-SmbShare -Name \"IPC$\" -Force\n# Remove-SmbShare -Name \"C$\" -Force\n\n# Optional: Recreate shares (if removed)\n# New-SmbShare -Name \"Admin$\" -Path \"C:\\Windows\" -FullAccess \"Administrators\" -Description \"Admin share\"\n# New-SmbShare -Name \"IPC$\" -Path \"C:\\Windows\" -FullAccess \"Administrators\" -Description \"IPC share\"\n# New-SmbShare -Name \"C$\" -Path \"C:\\\" -FullAccess \"Administrators\" -Description \"Default C drive share\"\n\nSet-ExecutionPolicy RemoteSigned -Scope Process\n.\\manage_admin_shares.ps1\n# Check current firewall status\nWrite-Host \"Checking firewall status...\"\nGet-NetFirewallProfile | Select-Object Name, Enabled\n\n# Enable firewall for all profiles\nWrite-Host \"Enabling firewall for all profiles...\"\nSet-NetFirewallProfile -Profile Domain,Public,Private -Enabled True\n\n# Optional: Disable firewall (use with caution)\n# Write-Host \"Disabling firewall for all profiles...\"\n# Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False\n\n# Create a custom inbound rule to block port 1900 (UPnP)\nWrite-Host \"Blocking port 1900 (UPnP)...\"\nNew-NetFirewallRule -DisplayName \"Block UPnP Port 1900\" `\n    -Direction Inbound `\n    -Protocol UDP `\n    -LocalPort 1900 `\n    -Action Block\n\n# List all custom firewall rules\nWrite-Host \"Listing custom firewall rules...\"\nGet-NetFirewallRule | Where-Object {$_.Group -eq \"\"} | Select-Object Name, Enabled, Direction, Action\nSet-ExecutionPolicy RemoteSigned -Scope Process\n.\\firewall_settings.ps1<\/code><\/pre>\n\n\n\n<p>This is my script for windows so far, but I plan to work on Linux for myself next time<\/p>\n\n\n\n<p>(Still doing my research, hopefully I&#8217;m some-wat prepared for this in 3 weeks.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I decided to start scripting for windows for cyberpatriot, working on a couple on things; First, I opened the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":2,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/17\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}