karlo

Problem building Virtualbox modules on Centos (cannot generate ORC metadata)

 Uncategorized  Comments Off on Problem building Virtualbox modules on Centos (cannot generate ORC metadata)
Nov 282019
 
Guest Additions 6.0.14 module for kernel 4.18.0-80.11.2.el8_0.x86_64.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.18.0-80.11.2.el8_0.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
Makefile:958: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.
make: *** [/tmp/vbox.0/Makefile-footer.gmk:111: vboxguest] Error 2
Building the main Guest Additions 6.0.14 module for kernel 4.18.0-80.7.1.el8_0.x86_64.thmtrader/status/1199833524699877376

Solution:

yum install elfutils-libelf-devel elfutils-devel

Then rebuild

 Posted by at 08:27

Running compiled code sh: [10665: 4] tcsetattr: Invalid argument error

 Uncategorized  Comments Off on Running compiled code sh: [10665: 4] tcsetattr: Invalid argument error
Nov 162019
 

Compiling exploit and getting the sh: [10665: 4] tcsetattr: Invalid argument error?

It helps to compile on a similar box. Find what linux runs your same kernel version+arch and compile there. Centos 4.4 is a cool one for kernel 2.6.9. That is all.

 Posted by at 11:02

Sample systemd unit file

 Uncategorized  Comments Off on Sample systemd unit file
Nov 122019
 
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target
[Service]
User=sonarr
Group=sonarr
Type=simple
ExecStart=/usr/bin/mono /opt/sonarr/bin/NzbDrone.exe -nobrowser -data /opt/sonarr
TimeoutStopSec=20
[Install]
WantedBy=multi-user.target
 Posted by at 11:43

bash add IP in PWD to variable for easy reference

 Uncategorized  Comments Off on bash add IP in PWD to variable for easy reference
Nov 112019
 

Add to .bashrc:

export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ;} ip=\$( echo \$PWD | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ) "

Now if you browse to/in a directory which has an ipv4 ip, the IP will be stored in the $ip variable.

 Posted by at 21:09

Easy AutoRecon summary (bash)

 Uncategorized  Comments Off on Easy AutoRecon summary (bash)
Nov 112019
 

echo "===SUMMARY===";grep . */report/notes.txt| while read line; do IP=$( echo -ne $line|cut -d'/' -f1| tr -d '\n' ); [[ x$IP != x$PREVIP ]] && echo; echo -n $IP ; echo -n $line | cut -d\] -f2- | grep --color=always ' .* found' ; PREVIP=$IP; done; echo

 Posted by at 21:08

Proxychains on fedora / centos7

 Uncategorized  Comments Off on Proxychains on fedora / centos7
Nov 052019
 

Clone the repo:

https://github.com/rofl0r/proxychains-ng

./configure && make && sudo make install

cp src/proxychains.conf /etc/proxychains.conf && vi /etc/proxychains.conf

echo “alias p=’/usr/local/bin/proxychains4′” >> ~/.bashrc && . .bashrc

p ssh xx@ip

 Posted by at 17:34

Thunderbird hidden option: sync all subfolders

 Uncategorized  Comments Off on Thunderbird hidden option: sync all subfolders
Oct 312019
 

I have a nice procmail setup, but thunderbird by default does not show/update the subfolders:

Open the Config Editor (Hamburger menu (top right) –> Preferences –> Preferences -> Advanced –> General -> Config Editor), and change the mail.server.default.check_all_folders_for_new setting to true.

It’s like about:config for thunderbird :)

Source site
 Posted by at 17:20

Bash while loop input (stdin reading from while-input) fix

 Uncategorized  Comments Off on Bash while loop input (stdin reading from while-input) fix
Oct 262019
 

while read line <&3; do echo “==== $line ====”; yes y | sqlmap -u http://$line/ –crawl=1; read -p press\ enter; done 3< webservers.ip

Using input 3 to read your list, leaving stdin untouched.

 Posted by at 08:11

Go compile error checksum mismatch (lnd)

 Uncategorized  Comments Off on Go compile error checksum mismatch (lnd)
Oct 162019
 
verifying github.com/btcsuite/btcd@v0.20.0-beta: checksum mismatch
        downloaded: h1:PamBMopnHxO2nEIsU89ibVVnqnXR2yFTgGNc+PdG68o=
        go.sum:     h1:DnZGUjFbRkpytojHWwy6nfUSA7vFrzWXDLpFNzt74ZA=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.

Well that is annoying. For me it helped to move the go.sum away (mv go.sum go.sum.bak). Feels insecure, and please research this, but at least it compiled. In this case, the developers let me know it was not a problem.

 Posted by at 05:17

Track data usage using iptables

 Uncategorized  Comments Off on Track data usage using iptables
Oct 122019
 

iptables -I INPUT 1 -s 1.0.0.9 -j ACCEPT


iptables -I OUTPUT 1 -d 1.1.2.2 -j ACCEPT
iptables -Z #CLEARCOUNTERS

 Posted by at 11:07

Openvas service start timeout

 Uncategorized  Comments Off on Openvas service start timeout
Oct 122019
 

Make sure to kill all redis

apt-get purge –auto-remove openvas*

apt-get install openvas

wait for background tasks to complete ( watch ‘ps aux| grep -Ei vas|green|redis’)

run openvas-setup

on kali: the 1% complete problem: reduce concurrency

(reset openvas password: openvasmd –user admin –new-password=karlo )

 Posted by at 10:41

Centos 8 enable cockpit (minimal install)

 Uncategorized  Comments Off on Centos 8 enable cockpit (minimal install)
Oct 112019
 

yum install cockpit && systemctl enable –now cockpit.socket && sleep 4 && ss -nlap | grep 9090 >/dev/null 2>&1 && echo “https://$(hostname -i):9090/”

 Posted by at 14:48