Code Monkey home page Code Monkey logo

Comments (14)

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

As far as I can tell prey runs as a root cron job, it should not need someone to be logged in... but I have not delved into the code too much.
How could you tell that it was not running?

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024

I set the laptop as missing and none of the alerts would play or image be captured from the inbuilt webcam

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

Just to verify,
1-When a user is logged in to the device and the device is marked as stolen you were able to get this information.
2-When no user was logged into the device and the device is marked as stolen you were not able to get this information.

Did it work if you were logged in, but at the login window?
I'll put it on my 10.6.3 and try all three scenarios now.

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024

1- correct
2- correct
3- don't recall

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

Are you on wireless?

I have had issues with the Mac's wireless disconnecting when I either go to the login screen (when multi user is on), or when I logout (even if I have the setting enabled to keep me logged in to wireless when logged out).

When I was on a wireless only connection I was able to reproduce this issue. I believe that the problem lies in the fact that the wireless keys are stored in the local user's profile, and thus the wireless is not connected when the use logs out, or goes to the login screen.

A workaround would be to be on a wired connection, or to add a wireless password at a system, or login-window level.

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

I was not able to reproduce this issue on a wired connection.

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024

I tested originally on a wired connection.. did you test on clean boot if it worked?

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

Worked on a cold boot, mid boot (even with no GUI up yet).
Worked on a warm boot.
Worked on a logout.

Do you have the latest version of prey? (sorry I have to ask)
How comfortable are you with editing cron, and do you have full admin privileges?

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024

There may heve been new releases since I posted the issue.

I have admin, and reasonably comfortable with editing cron.

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

Try the latest version, if that doesn't work then try:
1: Running prey manually from the terminal as root:

sudo su
whoami
/usr/share/prey/prey.sh

Then look for errors. (feel free to post the output)

or

2: Edit the root's cron to be

/5 * * * * /usr/share/prey/prey.sh &> /var/log/prey.log

This will cause prey to run every 5 minutes and to log to */var/log/prey.log
.
Then you can tail the log with:
tail -f /var/log/prey.log
from the terminal (again, feel free to post the output).

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024

I Installed Prey 0.3.73, now on Snow Leopard 10.6.4

With Missing set to No:

sh-3.2# /usr/share/prey/prey.sh 
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-changed.its.university.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

 -- Looking for connection...
 -- Got network connection!
 -- Checking URL...
 -- Got XML. Parsing...

 >> Reading configuration...

 -- Delay in sync.

 >> Reading module configuration...

 ** Got instructions for alert module.

 >> Verifying status...

 -- Got status code 200!
 -- Nothing to worry about. :)

With Missing set to yes:

sh-3.2# /usr/share/prey/prey.sh 
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-changed.its.university.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

 -- Looking for connection...
 -- Trying alternate method...
 -- Got network connection!
 -- Checking URL...
 -- Got XML. Parsing...

^[[1m >> Reading configuration...^[[0m

 -- Delay in sync.

^[[1m >> Reading module configuration...^[[0m

 ** Got instructions for network module.
 ** Got instructions for session module.
 ** Got instructions for webcam module.
 ** Got instructions for geo module.
 ** Got instructions for alert module.

^[[1m >> Verifying status...^[[0m

 -- Got status code 404!
 -- HOLY GUACAMOLE!!
 -- Running active modules...

^[[1m >> Running network module!^[[0m

 -- Getting public IP address...   
 ++ Adding trace for network: public_ip
 -- Getting private LAN IP address...
 ++ Adding trace for network: internal_ip
 -- Getting gateway IP address...
 ++ Adding trace for network: gateway_ip
 -- Getting MAC address, routing and Wifi info...
 ++ Adding trace for network: mac_address
 -- Tracing our complete route to the Internet...
 ++ Adding trace for network: complete_trace

^[[1m >> Running session module!^[[0m

 -- Getting current logged in user name...
 ++ Adding trace for session: logged_user
 -- Getting computer uptime and a list of running programs...
 ++ Adding trace for session: uptime
 -- Grabbing screenshot of the running desktop...
 ++ Adding file for session: screenshot -> /tmp/p24177/prey-screenshot.jpg

^[[1m >> Running webcam module!^[[0m

 -- Taking a picture of the impostor...
 ++ Adding file for webcam: picture -> /tmp/p24177/prey-picture.jpg

^[[1m >> Running geo module!^[[0m

 -- Trying to get list of nearby Wifi access points...
 -- Got it! Now lets try to get a location fix...
 ++ Adding trace for geo: lat
 ++ Adding trace for geo: lng
 ++ Adding trace for geo: accuracy

^[[1m >> Running alert module!^[[0m

 -- Showing the guy our alert message...
 -- Saying the message out loud...

^[[1m >> Sending report!^[[0m

 -- Packing all gathered traces...
 -- Posting data via http...
button returned:OK.
 -- Report successfully saved.
 -- 1483859 bytes uploaded in 8.255 seconds, at 179757.000 bytes/sec.
 -- Dropping all traces!
 -- Removed /tmp/p24177/prey-screenshot.jpg
 -- Removed /tmp/p24177/prey-picture.jpg

 -- Done! Happy hunting! :)

But if I reboot the computer Prey does not capture anything until I have logged in, I tried disabling Little Snitch altogether and it made no difference

from prey-bash-client.

BrianCanFixIT avatar BrianCanFixIT commented on May 18, 2024

can you give me the output for the following command:

sudo su
whoami
crontab -l

Than can you, reboot your mac, ssh in to your mac, login as root, and run prey manually.

from prey-bash-client.

BrianGilbert avatar BrianGilbert commented on May 18, 2024
macbook:~ realityloopf$ sudo su
sh-3.2# whoami
root
sh-3.2# crontab -l

*/5 * * * * /usr/share/prey/prey.sh &> /var/log/prey.log

After ssh'ing in as root on reboot and running prey from SSH I get the following:

sh-3.2# /usr/share/prey/prey.sh
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-130-194-53-103.its.monash.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

 -- Looking for connection...

It just stalls here, as soon as I enter my password at login prompt it continues with:

 -- Got network connection!
 -- Checking URL...

then stalls until computer finishes starting up, after which I got:

 -- Couldn't determine Content-Type for response. If you're using the Control Panel, please check your settings.

 >> Verifying status...

 -- Got status code !
 -- Nothing to worry about. :)

sh-3.2# 

from prey-bash-client.

drewreece avatar drewreece commented on May 18, 2024

I'm unsure if this is still an issue.

I have just tried with OS 10.6.6 and Prey 0.5.1. I connected to a wifi network & rebooted to the login window. I used the run on demand feature to run Prey from the control panel. It took a screenshot & webcam image & set the reports ok.

I did have the option to 'disconnect wifi on logout' OFF. It is worth checking that setting in the advanced section of the network preferences. Even with this turned ON the Mac still connected to the wifi network and connected to the Control Panel when at the login window.

Can you say if this is still happening with the latest Prey.

PS a few tips on testing this…
On the login window click the grey hostname (below Mac OS X text) until it shows an IP address - An IP that is not 169.x.x.x indicates a connection to a network.
The Mac will also show up in the sidebar of another if it has some sharing services active (I had AFP & screen sharing on).

from prey-bash-client.

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.