2

I am new to Mac and I have the following problem. After I log in after boot/restart, there is always a tab saying osascript wants to make changes which wants my password. I do not want to run this and clicking Cancel or killing this process in Activity monitor helps for the session. I am also able to see the details of it in Activity monitor. But regardless of what I do, after another start, the pop up menu appears again... How can I kill this script or remove it or disable it forever?

Related to that, how do I get to know what exactly is it trying to do? I tried to hit the Sample button in the menu in Activity monitor which gave me a text file of many things starting with the dirs and identifiers of the script and continuing with a lot of information which I don't know how to read/interpret (see below). As I said, I'm new to Mac so any help including the super basics is very welcomed :). Thank you.


EDIT:

Following the comments: Both cd Library/LaunchAgents; grep 'osascript' *.plist and cd /Library/LaunchAgents; grep 'osascript' *.plist output nothing. When I go to the process in Activity monitor and go to the Open files and ports, I get the following:

cwd
/
txt
/usr/bin/osascript
txt
/Library/Preferences/Logging/.plist-cache.xq4DHtYC
txt
/private/var/db/analyticsd/events.whitelist
txt
/System/Library/MessageTracer/SubmitDiagInfo.default.domains.searchtree
txt
/System/Library/Components/AppleScript.component/Contents/MacOS/AppleScript
txt
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
txt
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
txt
/private/var/db/mds/messages/502/se_SecurityMessages
txt
/usr/share/icu/icudt64l.dat
txt
/private/var/db/timezone/tz/2020a.1.0/icutz/icutz44l.dat
txt
/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat
txt
/System/Library/Caches/com.apple.IntlDataCache.le.kbdx
txt
/System/Library/ScriptingAdditions/StandardAdditions.osax/Contents/MacOS/StandardAdditions
txt
/usr/lib/dyld
0
/dev/null
1
/dev/null
2
/dev/null
3
/System/Library/MessageTracer/SubmitDiagInfo.default.domains.searchtree
4
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
5
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc

If needed, I also have clicked the Sample button. That gives this followed by Call graph section (not shown here):

Sampling process 680 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling osascript (pid 680) every 1 millisecond
Process:         osascript [680]
Path:            /usr/bin/osascript
Load Address:    0x1019b7000
Identifier:      osascript
Version:         395.1
Code Type:       X86-64
Parent Process:  bash [508]

Date/Time:       2020-10-22 10:14:04.108 +0300
Launch Time:     2020-10-22 08:27:11.218 +0300
OS Version:      Mac OS X 10.15.7 (19H2)
Report Version:  7
Analysis Tool:   /usr/bin/sample

Physical footprint:         4844K
Physical footprint (peak):  5056K

The output for:

ps auxwww | grep '[o]sascript'

when the pop up window is still active (presumably what you mean by it running) is:

jan                680   0.0  0.0  5765928   9756   ??  S     8:27AM   0:00.15 osascript -e do shell script "/Library/Scripts/WIS/tmp/Scripts/startup.sh" with administrator privileges

Is this the script what it is calling? What does it do?

12
  • Have a look at Add or remove automatic items in Open items automatically when you log in on Mac. If it's not there, then it may be in ~Library/LaunchAgents or /Library/LaunchAgents Oct 22, 2020 at 11:37
  • Hi, there I have already looked, it is not an app so it does not show up in the Login items. About the Library, how do I get to know if it is in LaunchAgents? There are many com. files but I do not know which one is associated with the osascript.
    – My Work
    Oct 22, 2020 at 12:21
  • Open Terminal, which by default opens to your Home directory, and run the following compound command: cd Library/LaunchAgents; grep 'osascript' *.plist and if that doesn't output anything useful, try: cd /Library/LaunchAgents; grep 'osascript' *.plist Oct 22, 2020 at 12:37
  • Those commands are the same but even if the other should be with ~, it gives nothing.
    – My Work
    Oct 22, 2020 at 12:49
  • 2
    With the process active, what is the output of the following in Terminal: ps auxwww | grep '[o]sascript' Oct 22, 2020 at 14:13

1 Answer 1

2

As the parent process of osascript is 'bash', that suggests that a command line script is calling AppleScript.

/Library/Scripts/WIS/tmp/Scripts/startup.sh

is very likely the culprit.

Have you installed anything that this might relate to?

If not, I would delete it, and download Malwarebytes to check for malware.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .