vim /etc/sudoers
ubuntu ALL=(ALL) NOPASSWD:ALL
Ref:
root@freeman-laptop:/home/freeman/test1/miniupnpd-1.9.20160222# ./miniupnpd
Usage:
./miniupnpd [-f config_file] [-i ext_ifname] [-o ext_ip]
[-a listening_ip] [-p port] [-d] [-U] [-S] [-N]
[-u uuid] [-s serial] [-m model_number]
[-t notify_interval] [-P pid_filename]
[-B down up] [-w url] [-r clean_ruleset_interval]
[-A "permission rule"] [-b BOOTID]
Notes:
There can be one or several listening_ips.
Notify interval is in seconds. Default is 30 seconds.
Default pid file is '/var/run/miniupnpd.pid'.
Default config file is '/etc/miniupnpd.conf'.
With -d miniupnpd will run as a standard program.
-S sets "secure" mode : clients can only add mappings to their own ip
-U causes miniupnpd to report system uptime instead of daemon uptime.
-N enables NAT-PMP functionality.
-B sets bitrates reported by daemon in bits per second.
-w sets the presentation url. Default is http address on port 80
-A use following syntax for permission rules :
(allow|deny) (external port range) ip/mask (internal port range)
examples :
"allow 1024-65535 192.168.1.0/24 1024-65535"
"deny 0-65535 0.0.0.0/0 0-65535"
-b sets the value of BOOTID.UPNP.ORG SSDP header
-h prints this help and quits.
require-chap
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns
# Secrets for authentication using CHAP
# client server secret IP addresses
# "aliens" * "changeme" *
aliens * changeme *
export KEY_COUNTRY="US"
export KEY_PROVINCE="NC"
export KEY_CITY="Winston-Salem"
export KEY_ORG="Example Company"
export KEY_EMAIL="steve@example.com"
cd /etc/openvpn/easy-rsa/
source vars
# This command will create index.txt(empty) and serial(01) under the folder of keys.
./clean-all
# This script will create ca.crt.
# This is common one for server and client site.
# ca.crt privilege is 644
./build-ca
# key privilege is 600(Private CA key)
# crt privilege is 644 (Public CA key)
./build-key-server myservername
# dh1024.pem privilege is 644
./build-dh
sudo cp /etc/openvpn/sample-config-files/server.conf.gz /etc/openvpn/
sudo gzip -d /etc/openvpn/server.conf.gz
ca ca.crt
cert myservername.crt
key myservername.key
dh dh1024.pem
/etc/init.d/openvpn is a script
/etc/init.d/openvpn start
method 2
/usr/sbin/openvpn --config /etc/openvpn/server.conf
cd /etc/openvpn/easy-rsa/
source vars
./build-key client1
ca.crt client1.crt client1.key
Fri Sep 18 11:39:04 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec 1 2014
Fri Sep 18 11:39:04 2015 Diffie-Hellman initialized with 1024 bit key
Fri Sep 18 11:39:04 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Fri Sep 18 11:39:04 2015 ROUTE_GATEWAY 111.2.1.252/255.255.255.0 IFACE=eth0 HWADDR=08:00:27:4f:b5:fc
Fri Sep 18 11:39:04 2015 TUN/TAP device tun0 opened
Fri Sep 18 11:39:04 2015 TUN/TAP TX queue length set to 100
Fri Sep 18 11:39:04 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Sep 18 11:39:04 2015 /sbin/ip link set dev tun0 up mtu 1500
Fri Sep 18 11:39:04 2015 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Fri Sep 18 11:39:04 2015 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Fri Sep 18 11:39:04 2015 UDPv4 link local (bound): [undef]
Fri Sep 18 11:39:04 2015 UDPv4 link remote: [undef]
Fri Sep 18 11:39:04 2015 MULTI: multi_init called, r=256 v=256
Fri Sep 18 11:39:04 2015 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Fri Sep 18 11:39:04 2015 IFCONFIG POOL LIST
Fri Sep 18 11:39:04 2015 Initialization Sequence Completed
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -I INPUT -s 10.10.0.0/24 -i ppp+ -j ACCEPT
Two Client can ping to each other
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i ppp0 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth2 -o ppp0 -j ACCEPT
route del default eth2
route add default ppp0
bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'
Q :/home/vagrant/metasploit-framework/lib/metasploit/framework.rb:19:in `require': cannot load such file -- robots (LoadError)
A :
vagrant@precise64:/$ ls -al ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-r----- 1 root root 3174 Dec 23 03:19 ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
vagrant@precise64:/$ sudo chmod a+r ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
vagrant@precise64:/$ ls -al ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-r--r-- 1 root root 3174 Dec 23 03:19 ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
Usage :
1. Into msf
msfconsole 2. Check cookie msf > use auxiliary/scanner/http/allegro_rompager_misfortune_cookie
msf auxiliary(allegro_rompager_misfortune_cookie) > show actions Auxiliary actions: Name Description ---- -----------
msf auxiliary(allegro_rompager_misfortune_cookie) > show options Module options (auxiliary/scanner/http/allegro_rompager_misfortune_cookie): Name Current Setting Required Description ---- --------------- -------- ----------- Proxies no Use a proxy chain RHOSTS 192.168.0.1 yes The target address range or CIDR identifier RPORT 80 yes The target port TARGETURI /Allegro yes Path to fingerprint RomPager from THREADS 1 yes The number of concurrent threads VHOST no HTTP server virtual host
Reference:
msf auxiliary(allegro_rompager_misfortune_cookie) > set RPORT 80 RPORT => 80
msf auxiliary(allegro_rompager_misfortune_cookie) > run [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed
#include <stdio.h>
int main()
{
printf("happy.org\n");
return 0;
}
Package: happy
Version: 0.0.11
Section: custom
Priority: optional
Architecture: all
Essential: no
Installed-Size: 1024
Maintainer: happy.org
Description: Print happy.org on the screen
$ mkdir happy-0.0.1/usr/bin/ -p
$ cp happy happy-0.0.1/usr/bin/
$ dpkg-scanpackages debian /dev/null | gzip -9c > debian/Packages.gz
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: happy-0.0.1
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
export LFS=/lfs
mkdir $LFS
cd $LFS
wget http://circu.it/pilfs/ch5-tools-20141203.tar.xz
tar xvf ch5-tools-20141203.tar.xz
mkdir -pv $LFS/usr/bin
cp -v /usr/bin/qemu-arm-static $LFS/usr/bin
wget http://www.intestinate.com/pilfs/patches/qemu-arm-wrapper.c
gcc -static qemu-arm-wrapper.c -s -o qemu-arm-wrapper
cp -v qemu-arm-wrapper $LFS/usr/bin
echo ":arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-wrapper:" > /proc/sys/fs/binfmt_misc/register
chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
C-b: send-prefix
C-o: rotate-window
C-z: suspend-client
Space: next-layout
!: break-pane
": split-window
#: list-buffers
%: split-window -h
&: confirm-before kill-window
': select-prompt
,: command-prompt "rename-window '%%'" -: delete-buffer
.: command-prompt "move-window -t '%%'" 0: select-window -t :0 1: select-window -t :1 2: select-window -t :2 3: select-window -t :3 4: select-window -t :4 5: select-window -t :5 6: select-window -t :6 7: select-window -t :7 8: select-window -t :8 9: select-window -t :9 :: command-prompt
?: list-keys
D: choose-client
[: copy-mode
]: paste-buffer
a: send-prefix
c: new-window
d: detach-client
f: command-prompt "find-window '%%'" i: display-message
l: last-window
n: next-window
o: down-pane
p: previous-window
q: display-panes
r: refresh-client
s: choose-session t: clock-mode
w: choose-window
x: confirm-before kill-pane
{: swap-pane -U
}: swap-pane -D
~: show-messages
PPage: copy-mode -u
Up: up-pane
Down: down-pane
M-1: select-layout even-horizontal
M-2: select-layout even-vertical
M-3: select-layout main-horizontal
M-4: select-layout main-vertical
M-n: next-window -a
M-o: rotate-window -D
M-p: previous-window -a
M-Up: resize-pane -U 5 M-Down: resize-pane -D 5 M-Left: resize-pane -L 5 M-Right: resize-pane -R 5 C-Up: resize-pane -U
C-Down: resize-pane -D
C-Left: resize-pane -L
C-Right: resize-pane -R
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
[Anonymous]
path = /home/happy
browsable =yes
writable = yes
guest ok = yes
read only = no
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
guest account = rober
follow symlinks = yes
wide links = yes
unix extensions = no
[homes]
comment = Home Directories
browseable = yes
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
$ gem update --system
$ gem install compass
3.Create the project .body
display: none
.container
background: red
input
font-size: 12px
5.Compile the style.sass host $ git clone https://github.com/rails/rails-dev-box.git
host $ cd rails-dev-box
host $ vagrant up
What’s In The BoxDevelopment toolsReference:
Blockquote
Git
Ruby 2.1
Bundler
SQLite3, MySQL, and Postgres
Databases and users needed to run the Active Record test suite
System dependencies for nokogiri, sqlite3, mysql, mysql2, and pg
Memcached
Redis
RabbitMQ
An ExecJS runtime