Announcement

Collapse
No announcement yet.

Raspberry Pi Trojan [Beware!]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Raspberry Pi Trojan [Beware!]

    My HS3-Pi remote system was recently affected by a Raspberry Pi Trojan, described at this website: https://www.tobsan.se/update/2017/11/06/rpi-trojan.html
    My own fault for not changing default "pi" password from "raspberry" to something else, so beware. I was able to mostly recover from the Trojan by running PuTTY to login to the system, stopping the zmap and other diabolical processes, but my /etc/rc.local file got clobbered by the virus with a nasty entry that started sniffers.

    Can someone share what they have in their /etc/rc.local which auto-startes HS3-Pi so I can have HS3 restart on reboot? I'm assuming it invokes something in /usr/local/HomeSeer.

    Thanks for your help!

    #2
    By default, I don't think there is anything by in rc.local in raspbian. I think you can delete the file. I would (and do) use systemd to start HS.

    Here's a link in the forum on how to setup systemd to start homeseer.

    https://forums.homeseer.com/forum/ho...-using-systemd

    Comment


      #3
      I is what is in my rc.local on a new install

      Code:
      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.
      
      # Print the IP address
      sleep 5
      _IP=$(hostname -I) || true
      if [ "$_IP" ]; then
        printf "My IP address is %s\n" "$_IP"
      fi
      
      /usr/local/bin/gpio -g mode 2 out
      /usr/local/bin/gpio -g mode 3 out
      /usr/local/bin/gpio -g mode 4 out
      /usr/local/bin/gpio -g write 3 1
      /usr/local/bin/gpio -g write 4 1
      /usr/local/bin/gpio -g write 2 0
      
      /usr/local/HomeSeer/led.sh yellow
      
      /var/www/Main/checkkb
      
      modprobe ftdi_sio vendor=0x0403 product=0xc07f
      printf "Setting audio output to analog...\n"
      amixer cset numid=3 1
      
      /usr/local/HomeSeer/led.sh blue
      sudo /usr/local/HomeSeer/autostart_hs &
      echo "HomeSeer is starting..."
      sudo /usr/local/HomeSeer/register_with_find.sh &
      /usr/local/bin/gpio -g write 2 1
      /usr/local/bin/gpio -g write 3 1
      /usr/local/bin/gpio -g write 4 0
      
      exit 0

      Comment


        #4
        Thanks, drhtmal, your /etc/rc.local like what I have on my Zee-S2. Good to see they're consistent.

        Comment


          #5
          AllHailJ: Thanks for the link to the systemd HS3 startup scripts. I've been learning systemd and like this approach to starting HS3. Wondering if HS4 will startup via systemd.

          Comment

          Working...
          X