Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In a normal cmd.exe console, console is not privileged
- C:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 3 fail to The token '&&' is not a valid statement separator in this version. https://i.imgur.com/5sUHPeB.png
- C:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- Fails with The system cannot find the path specified. https://i.imgur.com/5sUHPeB.png
- C:\Users\shodan>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Users\shodan>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Users\shodan>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Users\shodan>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 4 work https://i.imgur.com/DVGpJFI.png
- d:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- d:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- d:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- all 3 don't work, "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/60NHWLh.png
- d:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work The system cannot find the path specified.
- Later attempt ??? Not the same result ? d:\ vs D:\ ?!?
- D:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All four fail with "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/c9WcxCp.png
- d:\share>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- d:\share>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- d:\share>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- all 3 work https://i.imgur.com/0be7DkQ.png
- d:\share>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- The system cannot find the path specified.
- Later attempt, not the same results ?!?! again d:\ vs D:\ ?!?
- D:\share>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\share>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\share>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\share>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All four work and elevated properly ! https://i.imgur.com/EtfvRyb.png
- I:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- all don't work, same error, "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/HiJggQ4.png
- This result tried twice, second time same result
- I:\scripts>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\scripts>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\scripts>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 3 work
- I:\scripts>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work The system cannot find the path specified.
- This result tried twice, second time same result
- Double click on I:\Test privilege escalation powershell with arguments.bat
- Does not work, console flashes briefly and disappear too fast to see what the error message was
- It should pause, but doesn't !
- Double clicking on I:\scripts\Test privilege escalation powershell with arguments.bat
- works https://i.imgur.com/lFMD2MI.png
- Drag and dropping a bunch of files onto I:\scripts\Test privilege escalation powershell with arguments.bat
- works, dropped files are arguments https://i.imgur.com/nUXgWbA.png https://i.imgur.com/PtMT91d.png
- Drag and dropping files onto
- https://i.imgur.com/AMMPXzf.png
- Does not work, console flashes briefly and disappear too fast to see what the error message was
- It should pause, but doesn't !
- In a PRIVILEGE console
- C:\Windows\system32>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Windows\system32>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Windows\system32>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\Windows\system32>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 4 work https://i.imgur.com/60owFpJ.png
- C:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- C:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 4 work https://i.imgur.com/sgT3EUx.png
- D:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- D:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 4 work https://i.imgur.com/TJyNGy4.png
- I:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:\scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- I:\>"i:scripts\Test privilege escalation powershell with arguments.bat" 1 2 3
- All 4 work https://i.imgur.com/S1mxGsF.png
- Earlier attempts, less systematic
- d:\share>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- works https://i.imgur.com/ABFyegP.png
- d:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/f2DURU2.png
- I:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/QjgGtn7.png
- I:\scripts>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work, "not recognized as a command"
- I:\scripts>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- works https://i.imgur.com/gpQSMte.png
- I:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/NSdOOcb.png
- d:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/9lrP4e8.png
- d:\share>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- works https://i.imgur.com/tya1pCl.png
- C:\>"i:\Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/CKrAoxl.png
- C:\>"i:Test privilege escalation powershell with arguments.bat" 1 2 3
- does not work "The token '&&' is not a valid statement separator in this version." https://i.imgur.com/DegmN35.png
- full error text
- At line:1 char:82
- + ... Verb RunAs -FilePath cmd -ArgumentList "/c "" cd /d ""d:\" && ""I:\Te ...
- + ~~
- The token '&&' is not a valid statement separator in this version.
- At line:1 char:85
- + ... b RunAs -FilePath cmd -ArgumentList "/c "" cd /d ""d:\" && ""I:\Test ...
- + ~~
- Expressions are only allowed as the first element of a pipeline.
- At line:1 char:87
- + ... -FilePath cmd -ArgumentList "/c "" cd /d ""d:\" && ""I:\Test privile ...
- + ~~~~~~~
- Unexpected token 'I:\Test' in expression or statement.
- At line:1 char:157
- + ... \Test privilege escalation powershell with arguments.bat"" 1 2 3 "" "
- + ~
- The string is missing the terminator: ".
- + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
- + FullyQualifiedErrorId : InvalidEndOfLine
Advertisement
Add Comment
Please, Sign In to add comment