| 
  
   Size: 4769 
  
  Comment:  
 | 
  
   Size: 6146 
  
  Comment:  
 | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 7: | Line 7: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 27: | Line 27: | 
| Line 32: | Line 30: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 65: | Line 63: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 81: | Line 79: | 
| {{{ | {{{#!highlight sh | 
| Line 83: | Line 81: | 
| send dhcp-client-identifier = hardware; | |
| Line 97: | Line 96: | 
| {{{ | {{{#!highlight sh | 
| Line 112: | Line 111: | 
| {{{ | {{{#!highlight sh | 
| Line 119: | Line 118: | 
| {{{#!highlight sh aplay -l # list sound cards }}}  | 
|
| Line 125: | Line 127: | 
| {{{#!highlight sh aplay /usr/share/sqlmap/extra/beep/beep.wav }}}  | 
|
| Line 145: | Line 151: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 153: | Line 159: | 
| {{{ | {{{#!highlight sh | 
| Line 160: | Line 166: | 
| * apt install mousepad | {{{#!highlight sh apt install mousepad }}}  | 
| Line 163: | Line 171: | 
| {{{#!highlight bash | {{{#!highlight sh | 
| Line 171: | Line 179: | 
== dhcpclient issues == {{{#!highlight sh nmap --script broadcast-dhcp-discover -e wlan0 apt install tcpdump dhcpdump htop }}} * select mode b/g and channel 11 == Links gcc compiler == {{{#!highlight bash ln -s /usr/bin/gcc-8 /usr/bin/gcc ln -s /usr/bin/gcc-8 /usr/bin/cc }}} == docker.io == {{{#!highlight sh apt install docker.io systemctl status docker.service docker ps /sbin/usermod -a <user> -G docker apt install curl curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl chmod 755 kubectl mv kubectl /usr/local/bin/ kubectl version curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube mv minikube /usr/local/bin/ minikube version minikube start --vm-driver=none }}} {{{ 😄 minikube v1.2.0 on linux (amd64) 💿 Downloading Minikube ISO ... 🔥 Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ... 🐳 Configuring environment for Kubernetes v1.15.0 on Docker 18.09.1 💾 Downloading kubeadm v1.15.0 💾 Downloading kubelet v1.15.0 🚜 Pulling images ... }}}  | 
kali
Linux distribution debian based focused on security.
Build bootable USB live
   1 # output /var/log/messages when pen was attached
   2 # Jul  6 18:17:12 nb200 kernel: [10389.761660] scsi 4:0:0:0: Direct-Access     Philips  USB Flash Drive  PMAP PQ: 0 ANSI: 4
   3 # Jul  6 18:17:14 nb200 kernel: [10391.687146] sd 4:0:0:0: [sdb] 15133248 512-byte logical blocks: (7.75 GB/7.22 GiB)
   4 # Jul  6 18:17:14 nb200 kernel: [10391.687845] sd 4:0:0:0: [sdb] Write Protect is off
   5 # Jul  6 18:17:14 nb200 kernel: [10391.715891]  sdb: sdb1
   6 # Jul  6 18:17:14 nb200 kernel: [10391.722619] sd 4:0:0:0: [sdb] Attached SCSI removable disk
   7 
   8 dd if=kali-linux-light-2019.2-amd64.iso of=/dev/sdb bs=512k
   9 
  10 # 1902+1 records in
  11 # 1902+1 records out
  12 # 997208064 bytes (997 MB, 951 MiB) copied, 259.342 s, 3.8 MB/s
  13 
Deprecated networking commands
ifconfig -> ip a , ip address
netstat -at -n -> ss -at -n
route -> ip r , ip route
Make USB live persistent
- Insert pen
 - fdisk -l
 
   1 end=7gb
   2 read start _ < <(du -bcm kali-linux-light-2019.2-amd64.iso | tail -1); echo $start
   3 parted /dev/sdb mkpart primary $start $end
   4 
   5 #Warning: You requested a partition from 952MB to 7000MB (sectors
   6 #1859375..13671875).
   7 #The closest location we can manage is 997MB to 7000MB (sectors
   8 #1947072..13671875).
   9 #Is this still acceptable to you?
  10 #Yes/No? Yes                                                               
  11 #Warning: The resulting partition is not properly aligned for best performance.
  12 #Ignore/Cancel? Ignore                                                     
  13 #Information: You may need to update /etc/fstab.
  14 
  15 #create an ext3 file system 
  16 mkfs.ext3 -L persistence /dev/sdb3
  17 e2label /dev/sdb3 persistence
  18 # create the configuration file to enable persistence
  19 mkdir -p /mnt/my_usb
  20 mount /dev/sdb3 /mnt/my_usb
  21 echo "/ union" > /mnt/my_usb/persistence.conf
  22 umount /dev/sdb3
- Boot using Esc/F9 in HP laptop (legacy)
 - Choose Live USB persistence option
 - Run set xkbmap pt to have portuguese keyboard
 - Applications, settings, keyboard,layout, pt layout
 - adduser your_user
 - change root password with passwd
 
Connect WiFi
connectBitarus.sh
/etc/dhcp/dhclient.conf
   1 send host-name = gethostname();
   2 send dhcp-client-identifier = hardware;
   3 request subnet-mask, broadcast-address, time-offset, routers,
   4         domain-name, domain-name-servers, domain-search, host-name,
   5         dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
   6         netbios-name-servers, netbios-scope, interface-mtu,
   7         ntp-servers;
   8 
   9 timeout 60;
  10 retry 60;
  11 reboot 10;
  12 select-timeout 5;
  13 initial-interval 2;
wpa_supplicant.conf, vodafone.conf
Enable sound with alsa
Adjust default card
/etc/asound.conf
defaults.pcm.card 1 defaults.ctl.card 1
   1 aplay  /usr/share/sqlmap/extra/beep/beep.wav
Set timezone
   1 timedatectl set-timezone Europe/Lisbon
In the XFCE clock select Properties with the right mouse button and set the timezone to Europe/Lisbon.
gcc
test.c
Compile and execute
Xfce battery plugin
Applications, settings, power manager, show system tray icon.
   1 apt install xfce4-battery-plugin
Panel, right mouse button, add new items, Power manager plugin
mousepad text editor
   1 apt install mousepad
Install openjdk 12
dhcpclient issues
- select mode b/g and channel 11
 
Links gcc compiler
docker.io
   1 apt install docker.io
   2 systemctl status docker.service
   3 docker ps
   4 /sbin/usermod -a <user> -G docker
   5 apt install curl
   6 curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl
   7 chmod 755 kubectl 
   8 mv  kubectl /usr/local/bin/ 
   9 kubectl version
  10 curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64   && chmod +x minikube
  11 mv minikube /usr/local/bin/
  12 minikube  version
  13 minikube start --vm-driver=none
😄 minikube v1.2.0 on linux (amd64) 💿 Downloading Minikube ISO ... 🔥 Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ... 🐳 Configuring environment for Kubernetes v1.15.0 on Docker 18.09.1 💾 Downloading kubeadm v1.15.0 💾 Downloading kubelet v1.15.0 🚜 Pulling images ...
