Coder Social home page Coder Social logo

Out-word.ps1 error about nishang HOT 11 CLOSED

samratashok avatar samratashok commented on August 15, 2024
Out-word.ps1 error

from nishang.

Comments (11)

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

error

from nishang.

samratashok avatar samratashok commented on August 15, 2024

Do you have MS Word installed on the machine where you are running the Out-Word script?

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

Yes I have office 13

from nishang.

samratashok avatar samratashok commented on August 15, 2024

Does Out-Excel throws a similar error?

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

Reinstalling MS office solved the part. but when i open the word file nothing happens.
so i tried putting single quote then this happened
PS C:\Users\eMO\desktop> out-word -Payload " powershell.exe -noexit -c Invoke-Expression $(New-Object IO.StreamReader ($
(New-Object IO.Compression.DeflateStream ($(New-Object IO.MemoryStream (,$([Convert]::FromBase64String(''c08t0Q0oyk9OLS7
m5QIA'')))), [IO.Compression.CompressionMode]::Decompress)), [Text.Encoding]::ASCII)).ReadToEnd();"
At line:1 char:201

  • ... Base64String(''c08t0Q0oyk9OLS7m5QIA'')))), [IO.Compression.CompressionMode]::Dec ...
  •                ~
    

Missing ')' in method call.
At line:1 char:201

  • ... Base64String(''c08t0Q0oyk9OLS7m5QIA'')))), [IO.Compression.CompressionMode]::Dec ...
  •                ~~~~~~~~~~~~~~~~~~~~~~
    

Unexpected token 'c08t0Q0oyk9OLS7m5QIA''' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInMethodCall

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

Reinstalling MS office solved the part. but when i open the word file nothing happens.
so i tried putting single quote then this happened

PS C:\Users\eMO\desktop> out-word -Payload " powershell.exe -noexit -c Invoke-Expression $(New-object IO.StreamReader ($(New-Object IO.Compression.DeflateStream ($(New-Object IO.MemoryStream (,$([Convert]::FromBase64String(''c08t0Q0oyk9OLS7m5QIA'')))), [IO.Compression.CompressionMode]::Decompress)), [Text.Encoding]::ASCII)).ReadToEnd();"

error in the pic

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

error

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

Microsoft Word 2010
This document was edited in a different version of Microsoft Word.
To load the document, please Enable Content

this is what i get when i dont include single quotes

from nishang.

samratashok avatar samratashok commented on August 15, 2024

That is a trick to entice a user to enable Macros. The payload gets executed. Have a look at running processes you will see an additional powershell.exe process.

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

my script which is 400 lines, when i try to encode it with invoke-encode it give me the same result for for
-outcommand and -postscriptcommand

. ./invoke-encoded.ps1
invoke-encode -DataToEncode main.ps1 -Outcommand

when i run this i get Output as PostScriptCommand
PS : Generated PostScriptCommand is valid. but i am not able to get the right form of output

Interesting thing is, small scripts work fine

from nishang.

srihari-humbarwadi avatar srihari-humbarwadi commented on August 15, 2024

error

from nishang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.