Jun Han Ng

@nszl

Joined on Mar 4, 2022

  • Week 1 Prerequisite reading In order to understand BGP, I picked up this book and learnt here is what I learnt summarized. Before TCP/IP was implemented, computers used circuit-oriented networks like X25 by going through a setup phase, where the path is configured before any communications take place. This creates a singl epoint of failure wheneever a switch fails. For the internet, information and data should be diverted in the event of a failure, which makes it flexible but in return, this will put more load on the host interface which needs to handle things like different speeds, capacity and order of the information. TCP deals with the construction and destruction of packets (smallest unit of network data) and IP deals with the lookup and transmission of the packet itself.
     Like  Bookmark
  • This project is about creating a full machine learning pipeline that trains and predicts brain activity using EEG data. EEG https://neuraldatascience.io/7-eeg/time_freq.html EEG aka Electroencephalography Is it non invasive neuroimaging technique that measures electrical activity in the brain to be used for cognitive research. It is recorded by placing a cap with a number of electrodes on a person scalp, as the subject is experiencing certain stimuli, certain regions of the brain will experience higher or lower electrical activity and the change in activity is captured by electrodes of a certain region. image
     Like  Bookmark
  • Setup I set up a VM with the ISO as a masOs 64 bit OS and I got this interface: image level0 Upon entering, I see this getting printed out : To start, ssh with level0/level0 on 192.168.100.82:4242 level0@192.168.100.82's password:
     Like  Bookmark
  • Create python virtual environment and install dependencies python3 -m venv env && source env/bin/activate && pip install coloredlogs numpy matplotlib Split data into test and training set python3 data_scripts/seperate_data.py dataset/data.csv dataset/ Run training program python3 train/train.py dataset/data_train.csv dataset/data_test.csv -e 100 Generate reports and graphs
     Like  Bookmark
  • The goal of this project is to build a classification algorithm using the one vs rest machine learning algorithm; as well as to build some intuition on the basics of data science by introducing a problem from the Harry Potter series - the sorting hat. We are given a training dataset of students scores in multiple subjects as well as their assigned houses. We will be using this dataset to create a logistic regression model to predict the houses of some other students, as they provide their own score. It is assumed to have basic understanding of linear regression at this point. Learning materials Intro to LR Intro to LR Logistic regression with gradient descent
     Like  Bookmark
  • Regression Regression is when we havea dataset which consist of a dependant variable (the outcome) and an independant variable (the things we can change / control) which we are trying to find the relationship between them. After the relationship is found, we can use that to predict the outcome for a given change. There are multiple regression types image Linear regression is regression using a straight line image
     Like  Bookmark
  • This project is about making a simulation of an infectious virus propogation represented by a web game made with Ocsigen's eliom This document assumes basic programming and ocaml knowledge Installation and project initialization An eliom project is initialized using the ocsigen-start CLI tool; which is a bootstrap software to get started with eliom projects. opam install ocsigen-start sudo apt-get update sudo apt-get upgrade
     Like  Bookmark
  • This project is about creating a finite state automata that recognizes regular languages under the scope if a user defined grammar. In this context, we will create a program that reads from a file to read the keymaps and the states and transitions our finite state automata will adopt to; We will then parse the information to a machine-like structure and simulate the execution on that structure by running a shell where the user inputs the input string to the finite state machine structure. Week 1 Grammar format The grammar will be defined like so
     Like  Bookmark
  • The goal of this project is to create a turing machine in OCaml, a functional programming language as well as write a few simple programs that can be run on said turing machine. Week 1 Ocaml reading To get things started, we need to install Opam which is the package manager for OCaml bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)" sudo apt-get install bubblewrap opam init eval $(opam env --switch=default)
     Like  Bookmark
  • Web Flag Holding We are given a link to a website with no other resource. http://18.184.219.56:8080 Upon opening, I see this: image I modify the request to include a "Referer" request header:
     Like  Bookmark
  • level08 objdump -M intel -d level08 objdump -s -j .rodata level08 main 4009f0: 55 push rbp 4009f1: 48 89 e5 mov rbp,rsp 4009f4: 48 81 ec b0 00 00 00 sub rsp,0xb0 4009fb: 89 bd 6c ff ff ff mov DWORD PTR [rbp-0x94],edi 400a01: 48 89 b5 60 ff ff ff mov QWORD PTR [rbp-0xa0],rsi 400a08: 64 48 8b 04 25 28 00 mov rax,QWORD PTR fs:0x28
     Like  Bookmark
  • level00 (enumeration and info gathering) int main() { int input; puts("***********************************"); puts ("-Level00 -"); puts("***********************************"); printf("Password: "); scanf("%d", &input);
     Like  Bookmark
  • level00 objdump -M intel -d level00 objdump -s -j .data level00 -> -s stands for full content, -j stands for section main 8048494: 55 push ebp 8048495: 89 e5 mov ebp,esp 8048497: 83 e4 f0 and esp,0xfffffff0 8048494 to 8048494 Sets up the stack frame by moving the stack pointers away from the parents esp to the current ebp 8048497 Stack alignment to the closes 8 bytes. The esp moves up by 8 bytes.
     Like  Bookmark
  • bonus0 Here is the objdump for the program 080484b4 <p>: 80484b4: 55 push ebp 80484b5: 89 e5 mov ebp,esp 80484b7: 81 ec 18 10 00 00 sub esp,0x1018 80484bd: 8b 45 0c mov eax,DWORD PTR [ebp+0xc] 80484c0: 89 04 24 mov DWORD PTR [esp],eax 80484c3: e8 e8 fe ff ff call 80483b0 <puts@plt>
     Like  Bookmark
  • Setup I created a virtualbox VM with the ISO installed, and booted the VM. However I got a UEFI shell which is not the expected output, and I need to disable the EFI in the system configuration to boot normally Once that is done, I get the following, which is nice Path 1 - ISO enumeration -> Puzzles -> Buffer overflow with shellcode injection @ Env vars ISO enumeration I have no information about any users to login to this, so I decided to inspect the iso. I mounted the ISO on my host machine to check out the file contents using
     Like  Bookmark
  • Week 1 Provisioning and level00 After some fails, I figured that the ISO given was for Mac OSX 64 bit and I launched to the following interface after booting. I created an SSH tunnel and is able to connect through my local machine. I ran the getflag command expecting to get the flag, but looks like the challenge starts for 00 already I ran a strings command on the getflags binary and here is what I get. I dont think this is anything useful. /lib/ld-linux.so.2 __gmon_start__
     Like  Bookmark
  • This is done in a DEBIAN machine clone the repo for the images git clone https://github.com/neosizzle/badass.git && cd badass/p1 run install-tools.sh to install docker, docker-compose and gns3 bash install-tools.sh load the images so GNS3 is able to find it using systems docker
     Like  Bookmark
  • Week 1 Sandbox provisioning One of the tools that was suggested is Ansible, which is an automation tool (something like a remote command executor). Like any other new tech that invovles infra, I made a virtual machine as a sandbox to experiment with it. I also found this book which I will be using as my guide. I also installed ansible according to the book, which this command handled everything for us sudo pip install ansible
     Like  Bookmark
  • Week 1 Kubernetes reading and VM setup I have found this book book online that explains the kubernetes ecosystem, and I will be reading it as my primary resource from now Docker installation apt-get install ca-certificates curl gnupg lsb-release mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
     Like  Bookmark
  • Week 1 Implementation of rebooting and halt For halting, just use the hlt instruction, which stops the CPU until an interrupt is received. image alt For a reboot, just jump to the address 0FFFFh:0, which is the Reset Vector image alt
     Like  Bookmark