preload
四月 19

我的動物機 PCI NAS-01G 在使用的 backdoor
紀錄一下備忘

存放路徑:/mnt/Share/backdoor

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
 
#################安裝debian#####################
#if [ -e /mnt/Share/nas01g_debian.tar ]; then
#cd /mnt
#tar xf /mnt/Share/nas01g_debian.tar
#mv /mnt/Share/nas01g_debian.tar /mnt/Share/nas01g_debian.installed.tar
#fi
##############################################
 
#####################安裝並啟動dropbear (SSH)#########################
#cp /mnt/Share/dropbear /mnt
#cp /mnt/Share/dropbearkey /mnt
#mkdir -p /etc/dropbear
#/mnt/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
#/mnt/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
#chmod 777 /tmp
#/mnt/dropbear
#################################################################
 
####################開機就切換至debian並啟動其內建SSH##################
if [ -d /mnt/debian ]; then
/mnt/debian/bin/chroot /mnt/debian /etc/rc3.d/S20ssh restart
if [ ! -e /mnt/debian/proc/cpuinfo ]; then
mount -t proc proc /mnt/debian/proc
fi
#################################################################
 
###########################啟動其他各類服務#########################
#if [ -e /mnt/debian/etc/init.d/apache2 ]; then
#/mnt/debian/bin/chroot /mnt/debian /etc/init.d/apache2 restart
#fi
 
#/mnt/debian/bin/chroot /mnt/debian /etc/init.d/mysql restart
#fi
 
#if [ -e /mnt/debian/usr/share/zoneinfo/Asia/Taipei ]; then
#/mnt/debian/bin/chroot /mnt/debian cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
#fi
#if [ -e /mnt/debian/usr/sbin/ntpdate ]; then
#/mnt/debian/bin/chroot /mnt/debian /usr/sbin/ntpdate clock.stdtime.gov.tw
######################################################################
 
fi

溫故知新

載入中…

歷史上的今天..

相關文章:

Tagged with:

2 Responses to “[NAS-01G] backdoor script”

  1. VEric TAIWAN Internet Explorer Windows Says:

    請教大大
    小弟在PCI NAS-01G 內使用的 backdoor 並寫上
    /mnt/debian/bin/chroot /mnt/debian /etc/init.d/apache2 restart
    但我卻無法 順利的自動啟動 apache2

    若使用ssh 連入 並切換至 su 帳號下 就可以順利啟動
    不知大大是用什麼方式 才能自動啟動

    煩請大大解惑 thx

    Lauct TAIWAN Safari Mac OS Reply:

    試試看

    if [ -e /mnt/debian/etc/init.d/apache2 ]; then
    /mnt/debian/bin/chroot /mnt/debian /etc/init.d/apache2 restart
    fi

Leave a Reply