Tag: Mac

Linux Command

Top 10 Linux Command Examples

Today let’s focus on a Linux command list that will be useful to a newbie who is just starting off with Linux. It doesn’t matter whether you are a web developer or software engineer if you are going to use Linux you have to learn these. These commands are used day to day to get done work.

I don’t want to talk about the typical command list that is on the internet rather I would like to go beyond that and introduce couple of useful Linux commands. For the below commands you can find tons of tutorials.

  • cd
  • mv
  • cp
  • ls
  • pwd
  • ifconfig,
  • mkdir

So let’s move on.
– Read More –

Web Shell – WSO – Security – #ImAWhiteHat

So WSO!!!

By attempting any of the things listed in this blog post you accept full responsibility for your actions and I will not be held responsible whatsoever. This tutorial is strictly for penetration testers only. 

Today we are going to talk about a slightly different topic. I’m pretty sure you are going to love it if you are techie like me. This post is strictly dedicated to security personals out there who are white hats(neither black hats nor grey hats). Hacking or in other terms exploiting a vulnerability is an interesting topic that is also a massive area to be studied. The topic comes under computer security. This blog post will focus on controlling a remote server via a small script which is called a web shell. A popular one has a variation and is known as the ‘WSO Web Shell’. Today we’ll see what we can do with it and how.

So a web shell can also be defined as a type of Remote Administration Tool (RAT) or Backdoor. The web shell can be a full featured administrative GUI which has all the features you need to own/run/destroy a server or as simple as a single line of code that simply takes commands through a browser’s URL and execute it in the server. Beauty is web shells can be written in any language that a server supports. As an example WSO, the one we are going to look at today is written in PHP. So let’s assume that you are running Apache with PHP you will be vulnerable for PHP web shells such as this mighty WSO if you don’t have proper security in place. Most dangerous part is when the shell is installed, it will have the same permissions and abilities as the user who put it on the server. Now you know what’s a web shell is. If you are looking for a list of web shells that are being used in the tech world you can find them right here. Also makes sure that you have harden the Apache server as given this this blog post. – Read More –

class diagram

Class Diagram From PHP Code Using phUML

Today we are going to talk about UML Generator called phUML which is written in PHP. phUML is one of the best tools I have encountered to generate a class diagram from the existing PHP code. This is a common need when it comes to agile methodology. At some point we all have to write code 1st then do the documentation such as draw class diagrams for future references which is crucial for project success. There are tons of tools but most of them are paid or else not working properly but this tool is golden. Okay now if you ask me what’s phUML is, the answer is right below.

phUML is fully automatic UML class diagramm generator written PHP. It is capable of parsing any PHP5 object oriented source code and create an appropriate image representation of the oo structure based on the UML specification.

The image below here is the generated class diagram which phUML created when run on a particular codebase.

phuml generated class diagram

phUML generated class diagram

Okay let’s get down to business. – Read More –

Apache with mod_proxy as a reverse proxy

So mod_proxy

This module implements a proxy/gateway for Apache. It implements proxying capability for AJP13 (Apache JServe Protocol version 1.3), FTP, CONNECT (for SSL), HTTP/0.9, HTTP/1.0, and HTTP/1.1. The module can be configured to connect to other proxy modules for these and other protocols.

This post also can be named as “How to setup a proxy passer(ProxyPass, ProxyPassReverse) in Apache2” because today we are going to look at is how to setup mod_proxy as a reserve proxy in your linux environment. You might be wondering what’s the difference between a forward proxy server and a reverse proxy server? the answer is here. There could be many situation where you want to set up a reserver proxy, couple of them are mentioned below.

  • Front an application server as tomcat or JBoss with Apache
  • Application running on a different port other than 80 or 443(we usually only expose 80 or 443 to the public)
  • Mask the underlying server/Stop direct access to the underlying server

If you are more info on why Apache should be used in front of JBoss/Glassfish/Tomcat? Check this link out. Below image depicts what we are going to do today.

Reserve proxy

Reserve proxy example, Image courtesy : stackoverflow.com

– Read More –

Soap Request Curl Linux

Let’s make a SOAP request from command line(curl)?

Hellow there folks! These days most of the web services are exposed as REST or SOAP. There could be a chance where you need to make a request from your command line rather than installing a tool such SOAPUI. Tools are really helpful but there are times where you can’t use tools. I’ll be using curl to make the request. if you don’t know about curl it can transfer data using various protocols. If you don’t have curl installed use the below command.

sudo apt-get install curl

 

SOAP Request Flow

SOAP request

Image Courtesy : java-forums.org

– Read More –

Older Posts