Skip to main content

Posts

Showing posts with the label linux

Setup Nginx as Proxy Reverse

Continuing the journey of Web Server Application, today we would setup Nginx as Proxy Reverse. If you want to start with how to install Nginx and configure it with SSL/TLS, read here . This post scoped only in  CentOS  7 and I'm using  Alibaba Cloud  as my cloud provider. Using other Operating System (OS) or cloud provider may need some adjustment to be matched, but I'll describe in general. If you have a trouble during follow this tutorial, don't hesitate to ask in the comment. Let's dive in! Step 1 Run Go Application To make this tutorial simple, we gonna use go application to be proxy reverse by our Nginx. Since go application are binary, so they could directly running on our server without need to install any dependency. I have prepared the pre-compiled binary of go application that listen http request on port 8080 for linux OS. So let's download it (because we're not in administrative task, I recommend you to use normal user instead of root user). $...

Install Nginx and Setup SSL/TLS with Certbot

Hello there, sorry for delay to post almost 2 months. Since covid-19 outbreak have significance impact to my working rhythm. Today I'll continue the journey of initial setup for CentOS 7. After securing our connection into the server (see here ), right now the most used application should we install is the Web Server. There are two most known, one is Nginx (read: Engine X) and Apache HTTP Server (also known as Apache WebServer or httpd ). Personally I recommend you to use Nginx instead of httpd , because the basic architecture of Nginx is using event-driven approach, instead of creating new thread for each request that doing in httpd . So Nginx could handle more concurrent request within small amount of threads. Also today, the event-driven approach are widely adopted, for example the famous ReactiveX library in the programming side is the leading asynchronous API library for programming languages. So more application are now evolved to use event-driven style instead of blockin...

Installation OpenVPN Server on Centos 7

OpenVPN is the most known open source SSL VPN (Virtual Private Network) in the world. OpenVPN implemented OSI Layer 2 or 3 by securing network extension using SSL/TLS protocol. They allow you to connect securely to an insecure public network such as wifi in the cafe or public area. For Corporate and Enterprise they commonly used to allowing/blocking connection for back-office application or even secure connection to the server itself. When you has been read my post before , you can escalate this method to more secure than before, since before we have the SSH Port still exposing to public (although only public key authentication are allowed). This post scoped only in  CentOS  7 and I'm using  Alibaba Cloud  as my cloud provider. Using other Operating System (OS) or cloud provider may need some adjustment to be matched, but I'll describe in general. If you have a trouble during follow this tutorial, don't hesitate to ask in the comment. Go go go! Step 1 Fin...

Initial Server Setup on CentOS

As I came from Software Engineering background since my first employment, it's my big step to jump in DevOps area. Because at my recent employment, I trusted by the CIO to manage this area. I think all of the knowledge and practice them out, need to be well documented and I remember that I have a blog here. So this is my first time to documented all of the knowledge that I've practice before, in all of the environment ( development , staging , sandbox or even production ) in my recent employment. CentOS Logo I'm starting with the fundamental one, initial server setup with CentOS . This post scoped only in  CentOS  7 and I'm using  Alibaba Cloud  as my cloud provider. Using other Operating System (OS) or cloud provider may need some adjustment to be matched, but I'll describe in general. If you have a trouble during follow this tutorial, don't hesitate to ask in the comment. Go! Step 1 Add Non-Root User Once you have created instance, you need to...

How do I deliver ALAMI's Prod

Back to two months ago when ALAMI still under registration process by Financial Service Authorities in Indonesia (OJK), all of team has been fight to fit our platform application with OJK regulations. After the final stage, we're still doesn't have a devops for creating an infrastructure of our application to be in production (live). So the CTO ask me to learn quickly about devops and creating minimal system to be used for our application in production. And then the journey has began. Actually we have our old server but the Management doesn't happy with the provider, so we are searching new provider. How lucky we are, since our office are located at coworking space, there're many startups and one of them have a cloud service named ZettaGrid . After some meetings, the Management team interested to use their services. I got the free-trial Virtual Data Center (VDC) to exploring all of features that they have. But time is running low before we're going live, so I nee...

[FIXED] MySQL-Server 5.7

Affect Distribution Importance Assigned to Status MySQL-Server 5.7 Ubuntu 16.04.1 (x86_64) High h3rucutu Solved Version : 5.7.18 Packages : mysql-server-5.7 (mysql-server-5.7.18-0ubuntu0.16.04.1) mysql-server (mysql-server-5.7.18-0ubuntu0.16.04.1) Bug Description : Upgrading MySQL-Server to 5.7.18 version using apt-get Reproduce : ~$ sudo apt-get upgrade mysql-server-5.7 mysql-server Also Found : launchpad (bug-1605948) Solution : ~$ sudo service mysql start ~$ sudo mysql_upgrade -p ~$ sudo dpkg --configure mysql-server-5.7 ~$ sudo dpkg --configure mysql-server Root Caused : While upgrading mysql-server, mysql-server has been shutting down [ insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6) ]. When the mysql_upgrade running, it's can't connect to mysql-server [ mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket ...

Share Connection eth0 on Kali

When I was still using Backtrack as pentest Operating System on my netbook, I need to configure everything about networking, include sharing connection over eth0 interface. I must type on the terminal to set up the interface, then set the IP and netmask, etc. After setting the interface connection, I also must to configure  iptables to forwarding the internet connection from the other interface into eth0 , and the last step I must turn on forwarding rule. It's really fun, although need several step to do it. But, when I am using Kali Linux, I realise that the step which can I do on backtrack doesn't running on Kali Linux. After learn several option about networking on Kali, finally I can share connection over eth0 on Kali Linux. Okay, the first assume that we must have connected internet (not using eth0 ). Next, when your connection are ready, you can right click on the networking icon, select Edit Connection. Edit Connection When the window "Networking Connectio...

Why Unlisted Developer Repo?

Unlisted Developer is the first of my project on Kali Linux development, we focused on Kali Linux Repository on Indonesia. We offer several advantages about Kali Linux Repository, we don't just mirroring the main Repository of Kali Linux, but we have different management for this Repository. Okay, i'll write down several advantages, why we are better than the other Mirror Repository of Kali Linux. 1. All In One As we know, the default repository of Kali Linux is divided into three section, this is main, contrib and non-free. Main is the main repository which contain the core repository. Contrib is the repository for contribution. And Non-Free is the non-free repository. On the upper level, there are more kind of repository, for example security. It's too complicated, because we must add every repository source which provide each feature. On our repository, you just add one repository source and you will get all of the repository feature, include security, update or...

Fixing Flash Plugin Chrome

Installing Google Chrome is the best way to benefit from surfing on internet. Yes, Google Chrome is the most lightweight browser. As a linux user, we know that there're two type of that browser, Google Chrome and Chromium. Chromium is the opensource version of Chrome, and Google Chrome is the proprietary version. When you installed Chromium, you can't installed plugins where available on the Chrome Store, but on Google Chrome it can be. But, there's a problem on Kali Linux, when you installed the latest version of Google Chrome. It's because the newest version of Plugins Flash Player which included on the Google Chrome was not compatible or not stable yet. That version is 11.7 r700. Okay, here i will tell you to fix it. Maybe you want to install Google Chrome at first (read Installing Google Chrome ). Before it, you must be installing Hexedit, because on Kali Linux, Hexedit wasn't installed by default (read Installing Hexedit on Kali Linux ). After that, on Google...

Installing Privoxy beside Tor

Privoxy is tools for configuring proxy on your system. It's needed for anonymous concepts. So, your identity when you using internet keeping from the other person who want to determine what your activity. Usually, i using Privoxy with Tor. Tor is providing the bouncing method with international network, and privoxy will forward it into your local machine with HTTP method. So, if you just use Tor, you can't connect to your local network. Then after you installed Privoxy beside Tor, you will be connected into your local network. Let's begin. The first assume, you running on Kali Linux and you have an installed Tor in your system (see how to install Tor ). If you have the default repository of Kali Linux, you need to add the Debian or Kali Main repository (in this tutorial i will use Debian Main repository), open the sources.list. root@h3:~# vim /etc/apt/sources.list Add the new source of the repository below, save and exit. deb http://kambing.ui.ac.id/debian wheezy main ...

Modifying Kali Linux Interface

GNOME is still running on Kali Linux, but the interface of GNOME on Kali Linux is different with GNOME on Backtrack. On Backtrack we can modify it very easy as adding panel, changing the button layout of window manager, etc. As a Backtrack user, i always remember what the desktop environment on Backtrack, and maybe need more time to adapt with the new desktop environment on Kali Linux. But, to still keeping you so that you don't need time to adapt, you can modify the interface of Kali Linux. So you can enjoy the new environment of Kali Linux without afraid about your habit before using Kali Linux. One of more the differences between Backtrack and Kali Linux is the button layout at window manager. At Backtrack, you will found that the button layout located at the left, but at Kali Linux, it will be send back to right. Don't be afraid, let we send back (again) the button layout of window manager to the left. You can use dconf (looks like gconf-editor) to modify it. Run dconf f...

Installing Hexedit on Kali Linux

Hexedit, is tool to edit the hex file. Hex file may contain a binary package which can be execute, after it has been compiled from the source code. Remembering on the last Backtrack, this tool still packaged with about over 300 another tools which ready to doing pentest action. But when I have installed Kali Linux, I did not see that tool again. Although there is another tool like GVim, but I more like Hexedit than another tool. Because Hexedit is lightweight. So we don't need a big resource to using that tool. Okay, because I did not found Hexedit on Kali Linux, I will installed it from the Kali or Debian repository. It the best way to installed Hexedit on Kali Linux. First, you need to open the source of your repository at /etc/apt directory. root@h3:~# leafpad /etc/apt/sources.list Second, add the new source of Kali repository (see recommended repository for Kali Linux ), save and exit. deb http://mirror.nus.edu.sg/kali/kali kali main Third, you can running update of apt...

Iceweasel Flash Plugin on Kali

Iceweasel is the default web browser on Kali Linux, not longer Mozilla Firefox. But it's still based on Firefox Engine. When you first running your Kali Linux, there's not a flash player plugins which installed on Iceweasel. You can open Youtube to verify that. If you can playing any video there, maybe your Iceweasel has been installed flash player plugins. But, when you can't playing any video, you will need to install flash player plugins first. Okay, now go to the  https://get.adobe.com/flashplayer  for downloading the flash player plugins from Adobe with Iceweasel. When the page loaded, select tar.gz for the other Linux , then click Download. Downloading Flash Plugins Lets get into your terminal and go to the directory where the file has been downloaded. You can extract the tar.gz file with command below. root@h3:~# tar xvf install_flash_player_11_linux.i386.tar.gz Next, move the plugins (*.so) into the plugins lib of Icewasel. root@h3:~# mv libflashplaye...

Repository for Kali Linux

Kali Linux, still have an experimental issue on any configuration. One of them is their repository. Beside supporting of the Debian Repository, but I prefer using the original Repository which maintenance by Kali Developer. Because it's optimize for Kali, although it's not the complete Repository like Debian have. On the end of March, Kali Developer has been written on their blog ( https://www.kali.org/blog ) which make a bleeding edge repository contain update from several tools. But remember that this repository is still very experimental, so I don't add that repository into my source. Then, what's the repository would we use?? Okay, below I have list of the Kali Linux Repository which I used too. You can choose one of them, but don't use it together. sources.list (default) #Kali Security deb http://security.kali.org kali/updates main contrib non-free sources.list (Kali Server) #Kali Security deb http://security.kali.org kali/updates main contrib non-free #K...

Fixing Ralink Driver on Kali Linux

Okay, now i'm going to make Kali Linux as primary OS on my laptop, not longer Backtrack. Yes, i have decided to migrate from Backtack into the new version of Backtrack, named Kali Linux. This is my first tutorial of Kali Linux on my blog. So let's begin to fixing an error about Ralink wireless driver when we installing Kali Linux. Kali Linux Desktop When we are on the network configuration page from installation Kali Linux, the PC which used Ralink wireless will be notice that the driver need external source to be installed at installation of Kali Linux, in order to the wireless work normally. To satisfy that condition, we need the external source which contain anything about Ralink driver. As we know, Kali Linux is based on Debian Wheezy, so i was searching all about Ralink wireless driver. Ahaaa, when i had read from one of them, i found the package (see  http://wiki.debian.org/WiFi ). Let's try to identify where our file which we needed. On this tutorial, we w...

Upgrading w3af into GitHub

Mengingat kedatangan Kali atau yang disebut-sebut reinkarnasi Backtrack 6, telah mendorong semua tools yang biasa dipaketkan dalam backtrack berbondong-bondong menggunakan GitHub sebagai repository mereka. Salah satu software audit web yang terkenal ialah w3af. Meski merupakan open-project , w3af bisa disejajarkan dengan perangkat pentest web lainnya semacam acunetix. Bahkan acunetix sendiri merupakan perangkat berbayar. Disini saya akan menguraikan bagaimana menggunakan repository GitHub dari w3af, setelah sebelumnya menggunakan svn. Pertama-tama kita bisa memindahkan atau menghapus file w3af yang lama (dalam contoh ini saya menghapusnya). root@h3:~# rm -rf /pentest/web/w3af Kemudian kita clone git dari repository GitHub w3af (sebelumnya masuk ke direktori /pentest/web terlebih dahulu). root@h3:~/pentest/web# git clone https://github.com/andresriancho/w3af w3af Untuk menunjang instalasi w3af, kita butuh python-pip, instalasikan. root@h3:~/pentest/web# apt-get install pyth...

Updating BeEF using Github

BeEF (The Browser Exploitation Framework Project) adalah salah satu tools yang sering saya gunakan di backtrack dengan teknik  Social Engineering . Tools ini kaya akan fitur untuk membantu kita memanfaatkan korban yang sudah menjadi zombie kita. Dengan hanya menyisipkan script pada sebuah file yang sedang diakses korban, maka korban pun akan segera masuk dalam daftar zombie kita, untuk selanjutnya kita eksplorasi lebih dalam. Berbagai metode siap dilancarkan, bahkan boleh jadi anda memanfaatkan BeEF ini sebagai batu loncatan untuk menuju alat eksploitasi lainnya, semisal metasploit. Secara default, versi dari BeEF yang terinstalasi secara default pada backtrack sudah bisa menjalankan berbagai serangan kepada zombie kita, namun alangkah baiknya jika kita senantiasa meng- update BeEF dengan versi terbaru. Apalagi, BeEF ini menggunakan repository Github, yang sangat memudahkan kita dalam meng- update . Kini saya akan menjelaskan bagaimana kita akan meng-update BeEF menggunakan...

Running Apache in another Port

Dalam keadaan default, apache2 akan berjalan pada port 80, yaitu port dimana protokol http biasanya diakses. Namun bagaimanakah kita bisa memanfaatkan port lain agar apache2 ini bisa berjalan pada port selain port defaultnya?? Saya akan membahas di sini bagaimana agar apache2 bisa berjalan pada port selain 80. Pertanyaan mendasarnya adalah, mengapa kita harus mengubah port default dari apache2 ini?? Untuk kebutuhan-kebutuhan khusus, mungkin anda akan sangat membutuhkan untuk menjalankan apache2 pada port lain. Semisal suatu kasus, saya telah berhasil mendapatkan hak akses administrator router dari sebuah jaringan lokal (LAN), selain melakukan aktivitas hacking di dalam jaringan lokal tersebut, saya juga ingin melakukan aktivitas hacking yang berinteraksi dengan internet, misalkan suatu server yang juga terhubung ke jaringan internet. Sehingga saya butuh port forwarding pada router tersebut untuk menggunakan IP Publiknya, sementara port 80 telah dipakai oleh komputer lain, sehingga...