Showing posts with label Hacking. Show all posts
Showing posts with label Hacking. Show all posts

Sunday, May 24, 2015

postgresql Error || ssl.key || server.key || access denied || FIX || - level - Intermediate

Hi, I am Budhaditya, The tech fellow once more, And I am here to talk about some truly carriage issue on Kali Linux here. Its a moderate level post, so in the event that you don't know anything about Linux/CLI/Kali, I would propose to pull out, as you won't comprehend a thing.
|
Its about Postgresql. Postgresql is an open source DBMS which is utilized as a part of Kali linux to keep up its database. Recently I had a hopeless night altering a sudden issue with postgresql startup. It said that it is having issues with getting authentication to server and ssl keys. I never had this issue nor I am myself a genius to see every one of these things. So discovered each web journals, discussions and so on however discovered nothing straight forward and helpful except for got a thought regarding what to do. Its a basic issue on evolving authorizations.
|
Databases and SSL manages encoded private keys, which I don't know much about, however I will say, that, as it is private, they doesn't permit everybody to utilize it. the Root client, or the Postgresql Administrator will just have the privilege to utilize it. So the principle mystery is, you need to discover those keys and change the Permissions. Presently in Linux frameworks, there are various indexes, containing comparative documents which is elusive without great experience. Today was hellfire of an affair, so I am sharing it.
|
You need to go to filesystem -> var -> lib -> postgresql -> Version -> Main -> And here you will discover, Server.Key file. Change its consents to - Owner as postgresql administrator, and authorization to Read and Write,
Furthermore, for next step, go to and so forth -> SSL -> private -> change ssl-cert-snakeoil.key 's consent to again - proprietor as postgresql administrator and authorizations as Read and Write.
|
Tweek here is, other than proprietor account, Both Group and Other Account's authorizations must be set to NONE. At that point just postgresql will work.

In the wake of doing this, My postgresql is currently opening effectively once more.

THANK YOU

Wednesday, May 20, 2015

Computer Lab? || In a big room? || Or in a computer Itself?

 Introduction to Virtual Machines.


Hey, Its Budhaditya the Tech guy again, And I am here today to introduce you to something awesome here. Its every tech guy's dream to have multiple computers interconnected in a room, May be software testing, Different OS choices, Penetration testing etc. But what if you don't have funds like me?
|
Here I come to introduce you to Virtual Machines....
|
So What are they? They are emulated hardware platforms where you can install almost all existing operating systems without even paying a penny (Optional).
Two years ago, I wandered what Virtual Machines were? You know techie movies always have these names? For example, Untraceable, Hackers, Algorithm. etc. Now I am the one using 4 Virtual Machines at a time.
|
Some Names, - Oracle Virtual Box - Free, VMWare Workstation - Free Player and Payed Full version Workstation, Windows Virtual PC - Also free.
|
Requirements, -You Need 3 Main Things - Good Hard Drive Space, Great Processing Power, Intel - i5 - i7 Would be great, and a hell lot or RAM. Preferred 16 GB.
|
Another thing you must have is a Virtualization enabled CPU. You must enable it from Bios. It will be on bios as either VT-x (Intel) or AMD -V (AMD).
|
What I Personally use? - Oracle Virtual Box. Why? its Free.
|
How to set it up?
- Setting up any Virtual Host Platforms are pretty same. I will be showing today's example with Virtual Box.
Download link - Click Here
We need another addon called Virtual Box Extension for USB2/Intel PXE Rom/Guest Options etc - Talking about this later.
Extension Download Link - Click Here
|
Installation - Installation is pretty easy. Just run the Setup.exe and follow on screen instructions until successfully installed, And after The main package is done, Install the Extension pack, And now you are all set.
|
Creating and Installing a Virtual Machine. -
Download the OS Image file you wish to try/work/test. Or You can use bootable USB, Or just an old school CD/DVD. I Suggest using Image options for better speeds.
|
Follow The Images.

Open up Virtual Box, And Create NEW by clicking it.


In the Create New Virtual Machine Menu,
Name your VM,
and Select Kernel type and version
Select adequate amount of RAM,
based on OS requirements
Create a new Drive.
 There are other options for adding a drive manually later.
Choose VDI (default)
VDMK will also be compatible VMWare
Rest are rare and developing based.
I suggest to go with Dynamic Allocation,
Advantage on Dynamic over fixed is, After you setup a specific disk space, Dynamic Allocation will limit the drive to that space, but will fill up as per Data usage unlike Fixed. Fixed will just cut off a specific size from the HDD, which is not very economical.
Set the dynamically or fixed allocated disk space,
according to OS requirements.
After you click the last "create" button,
Your VM is now ready to be setup.
Click and go to the newly created VM's properties, and setup according to following images.
Until you want to leave your VMs completely unattached with host,
Enable these. Shared clipboard means, You can copy paste from host to guest or vice - versa
And Drag'n drop means, you can transfer files with simple Drag and Drop.
Leave rest options as default.
Boot Order is pretty important, As you need CD/DVD to boot your VM up
RAM adjustment can also be done here.
On to the next tab, is the Processor.
Leave execution cap as default. 
Now, If you have multi core CPU, and if you are going to do heavy CPU consuming jobs on VM, I suggest to increase Core count. 2 cores for Windows 7 is okay. 
Very Important - Enable PAE/NX. 
PAE lets to Above 4 GB usage of RAM on 32 Bit Operating Systems.
NX protects RAM From Random execution of Malicious Codes.
Some OSes need it, Some Don't. If OS Boots up without PAE/NX then no need to enable it.
If you are gonna use GUI VMs and t do basic Graphical jobs, I suggest to enable 3D Acceleration and Giving the full video memory. If you want to use multiple monitors, Just increment the monitor count.
This Part is important.
Networking - NAT means Network Address Translation which breaks down one IP Address to several internal IP Addresses to be used by multiple terminals. VirtualBox has NAT Built in.
Bridged will be another main option, Bridged will make your VM another machine on your Router.
So before you select Networking modes, Know what you want to do.
And You can also use multiple adapters, and can use both NAT and Bridged.
Others are Host Only, Internal NAT, etc. which are not for Web Connections.
In this Shared folders stage, You can define a specific folder/drive to be used as network drive from VM. You can check read only, So you can just read/ and copy files from Shared drive to VM, But in unchecked mode, You can read/write the drive. And Checking Auto-mount will automatically mount the drive for VM use.
After you are done with settings, Start your VM and it will wait for Disk. Select Real DVD/CD or virtual image drive. And after that. You are ready for as usual OS installation like as it would have been in a real host machine.


After Installation - After installation, Mount Guest Additions Disk from devices tab and install required drivers including Guest. Its easy on Windows systems, And if you want the same in linux,
This is the link to another of my blog posts about just "Installing Guest Additions on Linux"
Link - Click Here

Conclusion - Until your computer is Super fast, Do not expect to get smooth Virtual Experience. Virtual Machines will not be as fast as host, Host will be slowed down, Processor will be at peak, But you got your own lab right in your PC. 
|
This tutorial was a request from a fellow friend RKZ. 

THANK YOU


Wednesday, July 9, 2014

What an MiTM attack actually is? - Detailed


MiTM is an Synonym for Man in The Middle. This a Hacking technology for a long time network flaw which still now haven't been patched up. This is a technology, where the Hacker poisons the whole network for grabbing usernames and passwords for any Login Form sites, Injects malicious code, Does phishing.etc. So you can see that This is a very powerful attack where may be even passwords of a social networking site to bank account passwords or very hi-level intelligence information can be gained. 'Please Note', that in this Information of today, I will not be explaining any guide on doing an MiTM attack. This is just a knowledgeable post about what MiTM actually is.

Okay, We will first illustrate this in real world hacking. Let us assume that we have 3 persons. A, B and C. A is a very rich man, or your enemy :p , B is a Life insurance agent, or a Bank agent who carries a lot of A's money. And C, thats you, is trying to ROB important documents and money of A. Now lets assume you have already done trying with Robbing his house, But A's Security is very high, The guards kick you out as soon you went infront of the house. Now what? Think what you dressed up and disguise yourself exactly like A, go in, take the documents, Bank A/C and stuff, come in, make a Xerox of everything, Then Disguise as A and go to B and say that I am A came today to give you a documents. So You acted here as Man In the middle. You poisoned both of them with an illusion that all things are right, and you managed to steal his documents.

The exact same thing happens to computers in a Network. Let me first demonstrate what is an ARP or Address Resolution Protocol, what is an IP address and What is a MAC address. An Internet Protocol Address. IP is a logical address of your Digital Device which is connected to the internet. Any thing digitally connected to the internet has an unique IP address. This Protocol is the main purpose of packet delivery through internet to another computer connected to the internet any where in the world. MAC address is the synonym for Media Access Control. It is the physical existence or address of a connected terminal. This address is unique to every device which is hard coded into the hardware device. In this case, its a Network Interface Card - NIC, which lies in the motherboard, or can externally be placed. Ex - A netgear Ethernet card. Now What is ARP? ARP converts a logical IP to a Physical MAC address to transmit data in a TCP/IP system. For Example When I send a DOC to be printed in a network, This happens. My terminal sends a broadcast message like this " Who is IP xxx.xxx.xxx.201? Then Every terminal ignores but the Printer replies with Hey Server? I am the IP address with xxx.xxx.xxx.201. Then again the Server sends a Reverse ARP request asking is Who have the MAC Address with XX:XX:XX:XX:A2? Then Again the printer says, This is my MAC address. After all these confirmations, The signal is finally send to the printer to print the document. This is how ARP works. There is a diagram of the above said words.

Typical Topography of an ARP
Now I will show How this ARP is poisoned to grab Login informations of off a network.

For example, When you login into www.facebook.com, or mail.google.com or www.mylocalbank.com, You login into a GET login form which is sent from the Domain Server, then by many means, it comes to your router, and then your switch/gateway, and finally to you. When you give your username and password, and hit 'ENTER' , Then the POST form goes to the route, then to the Domain Server by many means again. Now As that Top example like Mr A, B, and C, Lets say A is the User, B is Facebook, and C is the attacker. What C does, is it poisons the ARP so that A that is user's terminal thinks that C the hacker is router B. And Router B thinks that C hacker is user A. So when A logs into Facebook, or any login forms, First, the packets are all transferred to C hacker, and the hacker interprets, and analyzes every data in clear text form, and resends the packets to the router again so that the original connection doesn't fail. Thus An attacker can gain all the informations and passwords of off a network. This is what a Man in The Middle attack is all about. Diagram bellow v
A Successful MiTM attack
  I am still researching about this Attack and the protocol. So I don't know much myself. Just felt to Share what I know.

Dedicated to a Bro of mine - Arya Sengupta.

THANK YOU.