Silent install on a Mac

174 views
Skip to first unread message

Ryan Nix

unread,
Mar 8, 2012, 3:27:24 PM3/8/12
to prey-s...@googlegroups.com
Hello,

I'm currently tracking two stolen laptops using Absolute Manage.  Prey seems to be more comprehensive and I have the ability to "push" the Prey software to the laptops in question.  Is there a way that I can install Prey silently on a Mac/Unix based machine?

Thanks!

Ryan

Drew Reece

unread,
Mar 8, 2012, 4:25:04 PM3/8/12
to prey-s...@googlegroups.com
Are you familiar with repackaging Mac installers?
The installer from prey has a custom app that runs setup so it can't be used for silent installs.
You'll need to install on a test mac whist tracking file system changes. Apples Package maker will do this via it's snapshot feature (in Developer tools).
Then you'll need to put a device ID & API key into the config, a post install script can create the cron job for Prey (the Prey readme has a one liner command for this).

I assume you can run custom shell commands via Aabsolute manage eg
#!/bin/sh
curl -O my-custom-package.pkg
sudo installer my-custom-package.pkg -target /


The config will need a valid control panel device & API id - I guess it could be a list hosted on a remote server so the package is portable.
I haven't deployed Prey to 'non OS X' *nix, but maybe an apt-get (or similar) can grab & all the dependancies, but I think Prey setup will open on install, so please test :^)

Does that make sense? 
Drew 
-- 
------------
Want to help translating Prey to your language? 
Write us: transl...@preyproject.com
------------
You received this message because you are subscribed to the Google
Groups "Prey" group.
To post to this group, send email to prey-s...@googlegroups.com
To unsubscribe from this group, send email to
prey-securit...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prey-security?hl=en_US?hl=en

Ryan Nix

unread,
Mar 8, 2012, 11:07:51 PM3/8/12
to prey-s...@googlegroups.com
Thanks of the reply, Drew.

I am familiar with repackaging and did in fact try that.  I grabbed the /usr/share/prey/ directory in it's entirety, packaged it up in PackageMaker, pushed the installer to a test machine then ran /usr/share/prey/prey.sh --check and /usr/share/prey/prey.sh to no avail.  It seems I have to validate the machine first. How do I do this?

Cheers,

Ryan

Drew Reece

unread,
Mar 9, 2012, 3:49:19 PM3/9/12
to prey-s...@googlegroups.com
The config needs a device & API key.
You'll need them to be setup on the control panel unless you can figure out how the installer does the setup. 

I added the following to a postinstall script.

API_KEY="123456"         # Get from control panel
DEVICE_KEY="ABCDEF"     # Get from control panel
sed -i '' s/api_key=\'\'/api_key=\'"$API_KEY"\'/ /usr/share/prey/config
sed -i '' s/device_key=\'\'/device_key=\'"$DEVICE_KEY"\'/ /usr/share/prey/config
# Add cron job 
(crontab -l | grep -v prey; echo "*/20 * * * * /usr/share/prey/prey.sh > /var/log/prey.log") | sudo crontab -

Drew

Ryan Nix

unread,
Mar 10, 2012, 12:11:07 PM3/10/12
to prey-s...@googlegroups.com
I'll give it a whirl and report back.  Thanks!

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages