Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

POP UPS

Everytime i go to some websites new pop ups of safari open up and they have pornographic material. How can i stop this?

Posted on Apr 19, 2014 10:14 PM

Reply
2 replies

Apr 19, 2014 11:02 PM in response to Scruff Rugger

You probably installed a trojan. I would ask you to post a screenshot, but that's not feasible in the circumstances.

1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem.

2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.

There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

3. Below are instructions to run a UNIX shell script, a type of program. All it does is to collect information about the state of the computer. That information goes nowhere unless you choose to share it. However, you should be cautious about running any kind of program (not just a shell script) on the advice of a stranger. If you have doubts, search this site for other discussions in which this procedure has been followed without any report of ill effects. If you can't satisfy yourself that the instructions are safe, don't follow them. Ask for other options.

Here's a summary of what you need to do, if you choose to proceed:

☞ Copy a line of text in this window to the Clipboard.

☞ Paste into the window of another application.

☞ Wait for the test to run. It usually takes a few minutes.

☞ Paste the results, which will have been copied automatically, back into a reply on this page.

The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.

4. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.

5. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.

6. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.

Triple-click anywhere in the line of text below on this page to select it:

PPATH=/usr/bin:/bin:/usr/sbin:/sbin;clear;c01='\nRAM details\n%s\n';c02='pmset -g';c03='boot-args';c04=(/ "");c05=(System User);c06='user %s%%, system %s%%';c07='/usr/libexec/PlistBuddy -c Print';c08='%s\n\t(%s)\n';c09='defaults read';c10=networksetup;c11='^[[:space:]]*((127\.0\.0\.1|::1|fe80::1%lo0)[[:space:]]+local|(255\.){3}255[[:space:]]*broadcast)host[[:space:]]*$';c12='com.autodesk.AutoCAD com.evenflow.dropbox com.google.GoogleDrive';c13=(Desktop L*/Keyc*);c14=(20 7);c15=(100 25);c16=(down up);c17=(recvfrom sendto);c18='\n%s\n\n%s\n';c19='\n%s: %s\n';c20='s/^ *//;5p;6p;8p;12p';c21='/ Id/s/.+: //p;/Mem/{s/[^0-9]//g;p;}';c22='1,5d;/[my].*:/d;p';c23='5,6p';c24='/Cy|Cond.*: [^N]/s/^.*://p';c25='/:$/{s/ *:$//;x;s/\n//;/Apple|Genesy|Intel|SMSC/d;s/\n.*//;/\)/p;};/^ *(V.+ [0N]|Man).+ /{s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;}';c26='/id: N|te: Y/p';F01(){ ((s00==0));};F02(){ o=;a=;((s01==0));};F03(){ system_profiler SP${1}DataType|sed -En "$2";};F04(){ o=`echo $o`;[[ ! "$o" =~ ^0?$ ]]&&printf "$c19" "$1" "$o";};F05(){ o=$((o<$2?o:0));F04 "$1";};F06(){ [[ "$o" ]]&&o=`sed -E '/^ *$|CSConfigDot/d;s/^ */ /;s/[-0-9A-Fa-f]{22,}/UUID/g;s/(ochat)\.[^.]+(\..+)/\1\2/;/Shared/!s/(\/Users\/)[^/]+/\1-/g'<<<"$o"`&&printf "$c18" "$1" "$o";};F07(){ o=$((o>=$2?o:0));F04 "$1";};F08(){ $c07\ :CFBundleIdentifier "$1";};F09(){ $2 launchctl list|awk 'NR>1&&!/0x|\.[0-9]+$|com\.apple\.(AirPortBaseStationAgent|launchctl\.(Aqua|Background|System))$/{print $3}'|grep -Fv "$1";};F10(){ find -L "$1" -type f|while read f;do file -b "$f"|egrep -lq XML\|exec&&echo $f;done;};F11(){ o=`grep -v '^ *#' "$2"`;l=`wc -l<<<"$o"`;((l>25))&&o=`head -n25<<<"$o"`$'\n'"and $((l-25)) more line(s)";F06 "$1";F12 "$1";};F12(){ o=`file -b "$1"|egrep -v '^(A.{16}t$|cann)'`;F04 "${1##*/} format";};F13(){ o=`$c07 "$2"|awk -F'= ' \/$3'/{print $2}'`;F06 "$1";};F14(){ [[ "$a" ]]||return;n=$((${#a[*]}-1));c="${a[*]}";a[$n]=${a[$n]%[.+-]*};o=$((a[n]/$1));F07 "Current $3 activity by process \"${c% ${a[$((n-1))]}*}\" with UID ${a[$((n-1))]} ($4)" $2;};F15(){ echo "No $1 access"$'\n';};id -G|grep -qw 80;s00=$?;F01&&sudo true;s01=$?;s02=`date +%s`;clear;s03=$((s02-`sysctl -n kern.boottime|cut -c9-18`));{ F01||F15 admin;F01&&! F02&&F15 root;F03 Software "$c20";a=(`F03 Hardware "$c21"`);o=$a;F04 Model;o=${a[1]};F05 "Total RAM (GB)" 4;o=`F03 Memory "$c22"`;[[ "$o" =~ s:\ [^EO]|x([^08]|02[^F]|8[^0]) ]]&&printf "$c01" "$o";o=`F03 Diagnostics "$c23"`;[[ "$o" =~ Pass ]]||F06 POST;a=(`F03 Power "$c24"`);o=$a;F07 "Battery cycles" 300;o="${a[1]}";F04 "Battery condition";for i in FireWire Thunderbolt USB;do o=`F03 $i "$c25"`;F06 $i;done;o=`$c02 therm|sed 's/^.*C/C/'`;[[ "$o" =~ No\ th|pms ]]&&o=;F06 Heat;o=`$c02 sysload|grep -v :`;[[ "$o" =~ =\ [^GO] ]]||o=;F06 "System load";o=`nvram $c03|awk '{$1=""};1'`;F04 $c03;o=`fdesetup status|sed -En '/Of/!{s/^.+is |\.//g;p;}'`;F04 FileVault;for i in 0 1;do o=`cd ${c04[$i]}L*/Lo*/Diag*||continue;for j in *.{cr,h,pa,s}*;do [[ -f "$j" ]]||continue;d=$(stat -f%Sc -t%F "$j");[[ "$j" =~ h$ ]]&&grep -lq "^Thread c" "$j"&&j="$j *";echo "$d ${j%%_2*} ${j##*.}";done|sort|tail`;F06 "${c05[$i]} diagnostics";done;grep -lq '*$'<<<"$o"&&printf $'\n\t* Code injection\n';o=`syslog -F bsd -k Sender kernel -k Message CReq 'caug|dead[^l]|GPU |hfs: Ru|last value [1-9]|n Cause: -|NVDA\(|pagin|proc: t|Roamed|rror|ssert|Thrott|timed? ?o|WARN' -k Message Ane 'SMC:' -o -k Sender fseventsd -k Message CReq 'SL'|tail -n25|awk '/:/{$4=""};1'`;F06 Log;o=`df -m /|awk 'NR==2{print $4}'`;F05 "Free space (MiB)" 5120;o=$(($(vm_stat|awk '/eo/{sub("\\.","");print $2}')/256));F07 "Pageouts (MiB)" 1024;a=( `sar -u 1 10|sed '$!d'` );((a[4]<85))&&o=`printf "$c06" ${a[1]} ${a[3]}`||o=;F04 "Total CPU activity"&&{ a=(`ps acrx -o comm,ruid,%cpu|sed '2!d'`);F14 1 0 CPU %;};o=`iostat -n1|awk 'NR==3{printf "%d",$3}'`;F07 "Average I/O (MB/s)" 5;F02&&a=(`sudo iotop -C 10 1 -m/|awk '$8~/[RW]/{print $4,$1,$9}'|tail -1`);F14 10000000 5 I/O MB/s;a=(`top -R -l1 -n1 -o prt -stats command,uid,prt|tail -1`);F14 1 25000 port \#; s05=`pkgutil --regexp --only-files --files com.apple.pkg.*|sort|uniq|sed 's:^:/:'`;s06=`egrep '\.(kext|xpc)/(Contents/)?Info.plist$'<<<"$s05"|while read i;do [[ -f "$i" ]]&&F08 "$i";done`;o=`kextstat -kl|grep -Fv "$s06"|cut -c53-|cut -d\< -f1`;F06 kexts;s07=`egrep 'Launch[AD].+\.plist$'<<<"$s05"`;s08=`while read i;do [[ -f $i ]]&&$c07\ :Label $f;done<<<"$s07"`$'\n'"$s06";F02&&o=`F09 "$s08" sudo`;F06 Daemons;o=`F09 "$s08"`;F06 Agents;o=`for i in {/,}L*/Lau*;do F10 $i;done|grep -Fv "$s07"|while read i;do j=$($c07\ :Label "$i")||j="No job label";printf "$c08" "$i" "$j";done`;F06 launchd;o=`for i in /{S*/,}L*/StartupItems;do F10 $i;done`;F06 "Startup items";s09=`sed -E '/^.+Lib.+\/Contents\/Info.plist$/!d;s/\/Info.plist$//;/Contents\/./d'<<<"$s05"`;s10=`egrep '^/usr/lib/.+dylib$'<<<"$s05"`;s11=`lsbom -pfc /var/db/*/*.BSD.bom|sed -En '/peri.+\/.+\./s/^\.\/[^/]+//p'`;[[ "$s09"&&"$s10"&&"$s11" ]]&&{ o=`find -L /S*/L*/{C*/Sec*A,E}* {/,}L*/{A*d,Compon,Ex,In,iTu,Keyb,Mail/B,P*P,Qu*T,Scripti,Sec,Servi,Spo}* -type d -name Contents -prune|grep -Fv "$s09"|while read i;do j="$i"/Info.plist;[[ -f "$j" ]]||continue;k=$(F08 "$j")||k="No bundle ID";printf "$c08" "${i%/Contents}" "$k";done`;F06 Bundles;o=`find /usr/lib -type f -name *.dylib|grep -Fv "$s10"`;F06 dylibs;o=`find -L {,/u*/lo*}/e*/periodic -type f -exec cksum {} \;|awk '{print $3"\t"$1}'|grep -Fv "$s11"|awk '{print $1}'`;F06 periodic;:;}||echo $'\nReceipts missing';o=`for i in Ic10ERT_LIBRARIES LIBRARY_PATH;do launchctl getenv DYLD_$i;done`;F06 "Inserted dylibs";o=;$c09 /Library/Preferences/com.apple.alf globalstate|grep -q 0||o=On;F04 Firewall;o=`scutil --proxy|egrep 'Prox.+: [^0]'`;F06 Proxies;o=`scutil --dns|awk '/r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./{print $NF;exit}'`;s12=`route -n get default|awk '/e:/{print $2}'`;s13=`$c10 -listnetworkserviceorder|sed -En '/ '$s12'\)$/{x;s/^\(.+\) //p;q;};x'`;s14=`$c10 -getdnsservers "$s13"|awk '!/^T/{printf "not ";exit}'`;F04 "DNS (${s14}from DHCP)";o=`$c10 -getinfo "$s13"|awk '/k:/&&$3!~/(255\.){3}0/;/bi:/&&$2!~/A/'`;F06 TCP/IP;[[ "$s13" =~ [AW]i ]]&&{ o=`/S*/*/P*/*/*/*/*/airport -I|awk '/lR/{print $2}'`;F05 RSSI -86;};s15=(`netstat -b -I $s12|tail -1|awk '{print $7,$10}'`);for i in 0 1;do o=$((s15[i]/s03/1024));F07 "Average ${c16[$i]}load activity (KiB/s)" ${c15[$i]};F02&&a=(`sudo dtrace -n 'syscall::'${c17[$i]}':return {@[execname,uid]=sum(arg0)} tick-10sec {exit(0)}'|tail -1`);F14 10240 0 ${c16[$i]}load KiB/s;done;F02&&o=`sudo profiles -P|grep :|wc -l`;F04 Profiles;i=auto_master;[[ `md5 -q /etc/$i` =~ ^b166 ]]||F11 $i /etc/$i;for i in fstab sysctl.conf crontab launchd.conf;do F11 $i /etc/$i;done;i=/etc/hosts;F11 hosts <(egrep -v "$c11" $i );F12 $i;F11 "User launchd" ~/.launchd*;F02&&F11 "Root crontab" <(sudo crontab -l);F11 "User crontab" <(crontab -l);F02&&o=`sudo $c09 com.apple.loginwindow LoginHook`;F06 "Login hook";s16="$(`find /S*/*/F* -type f -name lsregister|head -n1` -dump)";o=`for i in $c12;do [[ "$s16" =~ $i ]]&&echo $i;done`;F06 Apps;F13 "Global login items" /L*/P*/loginw* Path;F13 "User login items" L*/P*/*loginit* Name;F13 "Safari extensions" L*/Saf*/*/E*.plist Bundle|sed -E 's/(\..*$|-[1-9])//g';o=`find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)|wc -l`;F07 "Restricted files" 50;cd;o=`find .??* -path .Trash -prune -o -type d -name *.app -print -prune`;F06 "Hidden apps";o=`F03 Fonts "$c26"|wc -l`;F04 "Font issues";o=`find L*/{Con,Pref}* -type f ! -size 0 -name *.plist|while read i;do plutil -s "$i" >&-||echo $i;done`;F06 "Bad plists";for i in 0 1;do o=`find "${c13[$i]}" -type f -maxdepth 1|wc -l`;F07 "${c13[$i]##*/} files" ${c14[$i]};done;o=;((UID==0))&&o=root;F04 UID;o=$((`date +%s`-s02));F04 "Elapsed time (s)";} 2>/dev/null|pbcopy;exit 2>&-

Copy the selected text to the Clipboard by pressing the key combination command-C.

7. Launch the built-in Terminal application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.

8. If you see an error message in the Terminal window such as "syntax error," enter

exec bash

and press return. Then paste the script again.

9. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return three times at the password prompt. Again, the script will still run.

If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.

10. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be nothing in the Terminal window and no indication of progress. Wait for the line

[Process completed]

to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report the results. No harm will be done.

11. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.

At or near the top of the results, there will be a line that begins with "System Version." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.

If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.

12. When you post the results, you might see the message, "You have included content in your post that is not permitted." It means that the forum software has misidentified something in the post as a violation of the rules. If that happens, please post the test results on Pastebin, then post a link here to the page you created.

Note: This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.

________________________________


Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Terms of Use of the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

POP UPS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.