OpenVPN custom .ovpn Configs [Hacking Routers/Servers from miles away]

Prt

Member
Messages
19
Reputation
0
Reaction score
6
Points
3
Hello, this forum has some good information about fraud and techniques in general.


There is such an interesting question i have for a while:
Custom .ovpn config connections, how does someone crack connection then create this?

Im aware of how to crack/brute RDPs and also how to crack router via wireless wi-fi connection. (Locally)

But how does someone crack a router from miles of distance and then compile .ovpn?
That sounds like botnet hijacking connection from an install, but im pretty sure it is not like this.
People who sell such configs, can give a range of many IPs and also many available ZIPs



AFAIK they are PPTP Tunnels (Point-to-Point Tunneling Protocol)

This is how a custom .ovpn config looks like
Example:
Los Angeles,
CA, 90012

1624805133258.png

1624804319775.png

1624804355094.png




Few ideas: Maskan/Nmap/kport scanner/nlbrute/forcerX



If someone can give 2-3 keywords as an idea, post here or send pm
that would be helpful to research :cool:(y)
 

Attachments

  • 1624805083705.png
    1624805083705.png
    57.8 KB · Views: 56
Last edited:

Father

Professional
Messages
2,601
Reputation
4
Reaction score
635
Points
113
Content:
  • How to elevate privileges in Win7 (Exploit-DB), crack ssh and access RDP.
  • How to hack Active Directory and openVPN.
  • How to hack a WIFI router and install a VPN server on it.

How to elevate privileges in Win7 (Exploit-DB), crack ssh and access RDP
I think that each of you already has some ideas about this topic. But do you have useful practical skills that could be effectively used to achieve your clearly defined goals? Today I propose to practice together on the issue of elevation of privileges in Win 7 (Exploit-DB), which will serve us a useful lesson for the subsequent work with Active Directory.
Win7-Exploit-DB.jpg


Finally, a new version of Parrot 3.9 has been released. So I recommend it))). I record all the material in this OS.
We got access to CRM, which was on the network at 192.168.101.10:88. But let's go back a bit and understand where this address came from. A fairly well-known site provides the following network structure:
0a370fb6d58e17e77b934.png


From it, select two main addresses and scan them.
c941294619f86440de62a.png


Now it has become a little clearer and you can continue on. The point is that important information can be extracted from CRM and used for further attacks. Let's take a closer look.
0510696bd911a61304d36.png


Code:
Username: admin
Primary Email: [email protected]
First Name: darthvader

Our next step is parsing the address 192.168.101.10:8080. This is the mail.
b4a3f0107b24eed5da7e4.png


From the data issued by the CRM, we can assume that the username is [email protected] and the password is darthvader. In this case, just lucky. In life, everything is different and you have to spend much more time and effort to extract / brute the password ...)))
87500e8701b6e15f0e7d5.png


From the mail we get the tech login and the rsa key to connect to the gateway 2 of the office (Office 2 GW - 192.168.101.11). Create a file with a key (just copy the entire message and make the extension .key) and connect.
b09037acdd020d6efe585.png


Excellent! If you look at the structure of the network, you can see that there are 3 jobs:
Code:
192.168.13.1
192.168.13.2
192.168.13.3

They do not respond to pings, but nmap is present on the gateway, we will use it with the no ping -Pn option
6045a4c4452ba1a57b570.png


We see the terminal server. In fact, this is RDP on port 3389. Great! ) What you need. We must try to connect to it. But this is not easy to do. First, you need to forward the port through the ssh console. Press shift + ~ + c and enter:
427e726304bf602fdb26b.png


Direct ssh tunnel was raised ?
Code:
- L 3389 : 192.168 . 13.1 : 3389
Is port binding information. Means the following: client_port: server_name: server_port. In this example, we are forwarding the server port 3389 to port 3389 on our machine.

Now that moment, which made me not sickly "sweat" and actively work with my brains))) Parrot 3.9 does not have a pre-installed known freerdp. Okay, put my hands together with git and you know what? But nothing at all! The shaitan machine did not start. You should have seen my psychos. I had to sit for a very long time and rebuild this task. Despite the fact that half a year ago, it worked perfectly calmly. As a result, I also put together remmina. But okay ... forget about it. Let's go further.

Enter rdesktop 127.0.0.1 -u "" without specifying a user. So to speak, a little lifehack to see the registered users on a remote PC and see the following picture:
c05b7e378d3bb62015716.png


Users are password protected, so you have to brute force.
To be honest, patator, hydra and crowbar did not help in my case, although it installed freerdp-x11, freerdp2-x11 and all dependencies. In general, I came to the conclusion that it's time to remember the good old ncrack =)) Yes, yes! No wonder) And to be honest, I use it quite often.
6075225dc2408f2be7dc1.png


I have erased the password. But I know him) It's time to see what's on the PC) the brute of the user user did not lead to anything. The password will be clear in the video below ?
b2c6262463aedbb76d4b6.png


It is clear that we are logged in as a regular user. And user is the administrator. In principle, it's okay. Now we will raise the privileges =) with the help of this.
Create a file with the .ps1 extension and copy the exploit code into it.

Next, open cmd and enter:
Code:
powershell -ExecutionPolicy Bypass
Import-Module "path to our entire file"
Invoke-MS16-032

And we get:
2a64d2e48fd771e3bdfb0.png


It remains to create a new user with administrator rights =)
d7f359d06b9c30d60570d.png


And here's our final result:
f5ebdc17b60e16c85ac96.png


Now you can go under the admin and do whatever you want.
In the video below, as usual, everything will be clearer. So have fun =)

Remmina and FreeRDP Cheat Sheet:

And in the next part in this series, we will break Active Directory.

How to hack Active Directory and openVPN
We all know that AD (active directory) is a hierarchical storage of data about all objects of a particular network. Roughly speaking, this is the network admin panel, through which the administrator can effectively manage all network resources. Almost all key administrative tasks and processes are associated with active directory. That is why there is a logical interest, but how can you hack active directory and get the necessary information about a specific network? We will talk about this today in this article.
Active-Directory.png


In the last part, we got access to the PC via port 3389 (RDP) and created a new administrator. Remember?
9d870dbfec6c4ef6a7752.png


Now we can go to it and examine the PC and all the files of another administrator user, to which we did not have access before. After killing a little time in search, we find an interesting way. Copy everything from there for further analysis.
aa141edd4788161a32bf9.png


These text files are found in almost every folder. Similar to password hashes.
fa8ed94f96815068166a0.png


We also analyze the network settings and find the address of the domain server 172.16.0.10 Presumably this is the AD we need. By the way, for reference, I suggest you familiarize yourself with the key concepts of AD here.

It remains only to get into the network 172.16.0.0 to connect.
bfb43f6a54d6e622ff36a.png


To do this, let's go back to the gateway and study it in more detail. We enter the ps aux command, we get the following list of processes:
7b680d1a36874a9d1f585.png


The openvpn process is running, this is more interesting. The study of crontab did not lead to anything interesting, but it does not matter. Consider the openvpn config
Code:
cat / etc / openvpn / server . conf
43993708228665a58d7c3.png


Perfectly! Found the Office-2 login and the certificate for connection. Now we need to compose the correct config and choose the password, which we will do next.
As a result, we get 3 files:
400ffc4e35de973bba500.png


I'll show you in more detail in the video, but now let's move on to brute-force passwords:
d6ec0afd0162e2c44a619.png


After finding the password, we can connect. We will get into the network we need for further actions. We create the necessary files for the connection. (In the video, this will be in more detail).
5e451f5f4272cab891a0e.png


And we connect ? Now the network 172.16.0.10 is available to us Hurray)))
ec47960fbfc5db7b7eb6e.png


We scan the host and make sure that it is AD, and also see the test.lab domain:
6c190fadaa5873e7bebbb.png


Metasploit has a kerberos module, let's use it and check if the user arm554 is in the domain:
90eb8ad191ca1997bb6e4.png


Super! ? After that, we pass-the-hash via SMBv3:
Code:
pth - smbclient - user = arm554 - pw - nt - hash - m smb3 - L 172.16 . 0.10 \\\\ 172.16 . 0.10 \\ 6361dea164ee8fe91fe7b117fbc9ca5e
4886b2b283e659d876bfb.png


We got a list of shared resources ? Let's see what's inside files:
60a1b84b5653f20eb8cf9.png


This is how we got access to the files on the server. That's it for today! Thanks to all)
Below, as usual, I am attaching a video.

How to hack a WIFI router and install a VPN server on it.
Let's get back to the topic of hacking home routers again. According to rough estimates, there are about 500 million of them. And you have 500 leams of opportunities to raise your private VPN tunnel through these routers. But first you need to get access to the vulnerable router.

The attack on routers will be carried out not from my local machine, but from a specially rented remote server under Windows.
The role of the attack tool will be played by the Router Scan program.

5e470a1c78b5717a1b625-1-1-1-1.jpg


The program can be installed by unpacking the files from the archive into the specified folder. The program performs an attack on ports
  • 80
  • 8080
  • 1080

We consider it to be on the list quite justified requiring any additional changes.
8bff03fc2b4f018e9cbca-1-1-1-1.jpg


In addition, the program has the ability to connect additional modules. But such a load of the program will significantly slow down its work. Therefore, we will not touch anything in this window. After all, the purpose of the attack is to access the web interface of one random router.

It remains to select only the IP range for the attack and you can run the program.
028cb02b675e22c50a330-1-1-1-1.jpg


We go to a site that provides a range of IPs by country and randomly choose Poland as a victim.
After the desired ranges are inserted into the corresponding program windows, you can start the program into operation. The time spent on the process of hacking routers depends on the number of IPs, the selected range and can take quite a long time.

But to show you this in one article, one hacked router is enough for me, on which it is possible to raise a VPN server. These models can be SS, MikroTik routers or any other model with DD-WRT firmware.
fe7e13cc7523e2d5ca7b8-1-1-1-1.jpg


After a quick glance at the list of routers that appeared in the "Good Results" tab, we see that the models of the specified routers are in the list.

Bringing up a VPN server
For the role of the victim, within the framework of this article, I have chosen under the control of DD-WRT. My choice is explained by the fact that the mentioned firmware provides the ability to use the router as a VPN server, using the pptp protocol.

We copy the URL of the desired router into the address bar of the browser and after loading the page, we find ourselves in its web interface.
22ec9c9f0531a15260fdd-1-1-1-1.jpg


We enter the selected password and we get complete control over it.
8cba997c8adbb785a8f91-1-1-1-1.jpg


In order for the router to play the role of a vpn server, go to the Services tab
61628c8001a1d977d2011-1-1-1-1.jpg


Next pptp
fe4b4c6b42663b3f96307-1-1-1-1.jpg


You must click on the first form "Wlaczone"
8c1abe1979657037dd1c1-1-1-1-1.jpg


We write an ip and enter the desired username and desired password separated by a space with asterisks *
1f6b3abf1c962e9be1f8a-1-1-1-1.jpg


The internal IP address must be chosen for reasons that do not coincide with any of the existing clients on the router.
Clients in the router, you can see in the DHСP tab.
fe598aa67a6800e8008ee-1-1-1-1.jpg


Then we press the save and apply buttons.
In order to connect to the router from the outside, we fill in all the forms in exactly the same form as shown in the picture
e67d1313ceea50470c3cb-1-1-1-1.jpg


After all the manipulations, you can connect to the server.
To connect to the server via pptp protocol, I use a standard Windows utility.
Start-Control Panel-Sharing Control Center.
Next, click on setting up a new connection or network.
Choose a connection to the workplace and click next.
In the "Internet address" field, enter the address of the hacked router.
You can write anything in the location name field.
We do everything as in the picture and click on.
In the field "user" we write the username we have specified.
In the field "password" your password and click create.
Here we press "close".
Next, go to the menu with networks and press the right mouse button.
Selecting properties.
Go to the security tab and configure it in the same way as shown in the picture. Click ok
Then we connect to the created network.
If you did everything correctly, after pressing the "connect" button, you will connect to the VPN server.
We check the external ip and this is what we wanted to get.
With such simple manipulations, you can get as many of your own VPN servers as you want and change them whenever you want.

Download Router Scan.
IP range by country.
 
  • Like
Reactions: Prt

CarderPlanet

Professional
Messages
2,556
Reputation
7
Reaction score
589
Points
83
Creating your own OpenVPN

In this article, we will create our own VPN server that will bypass blocking and slowing down sites, as well as block really harmful content
(trackers, ads, and other garbage) on websites.

Although online advertising is the main source of revenue that allows your favorite websites, including this one, to make money, sometimes people want to block it for various reasons, such as performance or privacy reasons. There are many blocking methods, and everyone chooses them independently. These are mostly browser extensions like uBlock, AdBlock, and so on. But there is a problem: if you have a lot of devices (including mobile ones), you need to install the cutters on each device and then make sure that they work correctly. This tutorial will help you install and configure OpenVPN and Pi-hole as a network filter for blocking DNS-based ads for all devices connected to your network. VPN (Virtual Private Network) is a proven solution that allows you to ensure anonymity on the Internet, while simultaneously encrypting and compressing all transmitted traffic. The essence of the technology is that a special client program is installed on your computer, which encrypts all transmitted data "on the fly" and transparently for the user and transmits it to an intermediate computer (VPN server). The VPN server has special software installed that decrypts traffic and sends it in the desired direction.

Pi-Hole Setup Judging by the project name, Pi-Hole is reserved not only for Raspberry Pi. You can also run it on a traditional server, and that's what we're going to do. Update and install new packages:
Code:
sudo apt update -y && sudo apt upgrade -y

Install curl:
Code:
sudo apt install curl

Next, all you need to do is run this simple command:
Code:
curl -sSL [URL]https://install.pi-hole.net[/URL] | bash

When you are asked if you want to install Pi-hole on your server and put a static IP address, select "yes". In the next window – Choose An Interface-the wizard prompts you to select the interface that will listen to Pi-hole. To use Pi-hole to monitor the VPN network interface, use the arrow keys on your keyboard to select tun0 and press the space bar. Then press TAB to go to the options at the bottom of the screen. Once selected, press Enter to save the settings and continue.

In the next window – Choose An Interface-the wizard prompts you to select the interface that will listen to Pi-hole. To use Pi-hole to monitor the VPN network interface, use the arrow keys on your keyboard to select tun0 and press the space bar. Then press TAB to go to the options at the bottom of the screen. Once selected, press Enter to save the settings and continue.

Then select your preferred DNS. Then you can change it or put several of them.

You can choose to block ads (you can add your own lists later):
The installer will also ask you if you want to install a web dashboard, I strongly recommend that you install it so that you can connect to the server with a password from anywhere on the local network and manage your DNS / blacklist and have traffic statistics. Open port 53 and 80 for our OpenVPN subnet If you have UFW FireWall installed and running, then enter the following commands:
Code:
ufw allow proto tcp from 10.8.0.0/24 to 10.8.0.1 port 80 ufw allow proto tcp from 10.8.0.0/24 to 10.8.0.1 port 53 ufw allow proto udp from 10.8.0.0/24 to 10.8.0.1 port 53

If your FireWall is disabled, then you do not need to enter anything additional. To make your web browser work properly, open the ports for HTTP and HTTPS traffic in the firewall.
Code:
 sudo ufw allow http sudo ufw allow https

You also need to allow web traffic in the range 10.8.0.0 / 24 to pass through the VPN server at address 10.8.0.1 and port 80.
Code:
sudo ufw allow proto tcp from 10.8.0.0 / 24 to 10.8.0.1 port 80

Restart UFW. sudo ufw reload If the firewall was restarted successfully, you will see: Firewall reloaded For the normal operation of the web interface, we will perform a number of other operations. First of all, we will set the owner and a new set of rights for configuration files and databases. If you don't do this, the web interface will work only for reading, and when you try to create any new object, you will get an error:
Code:
Error, something went wrong! While executing: attempt to write a readonly database. chown -R pihole:pihole /etc/pihole chmod -R g+rw,u+rw /etc/pihole

Then we will include the web server user in the pihole group:
Code:
usermod -aG www-data pihole

At this point, the installation can be considered complete. To update the Pi-hole itself, run the console command: pihole-up You can do this even from under a normal account, in this case the sudo password will be requested and the elevation will occur automatically.

Setting up your home router Without a VPN, only using DNS, I can't close all the variety of routers with this text, of course. But for most home routers, the following points are true:
1) The router can set a custom DNS server in the WAN interface settings, even if the IP address is obtained dynamically from the provider
2) The router issues its own DNS address to internal clients and forwards their requests to the server specified in the WAN settings, respectively. In this case, we need and only need to register the address of our Pi-Hole as the DNS server in the WAN interface settings of the home router. It is important that it is the only DNS server in the settings, if some other one is specified - the router will balance requests between them according to a principle known only to it, and this situation is extremely inconvenient for debugging problems in the network. If something suddenly went wrong and the service stopped working, just change the above setting to the DNS server address of your provider or, for example, 8.8.8.8, and then start to figure it out.

With OpenVPN and DNS, the whole idea of a VPN is that it's a tunnel from the outside of your network to the inside. This means that you need to configure your router to allow certain connections to pass through
 
Last edited:
Top