What is a UDF Library?

heredotcan

Katılımcı Üye
28 Ağu 2008
675
148
UDF means User Defined Functions in MySQL. It’s like coding your own functions inside a DLL and calling them inside MySQL. We are going to use the “lib_mysqludf_sys_64.dll” DLL library which can be found inside the Metasploit framework. You can use the UDF libraries based on the OS and architecture that is inside your Metasploit installation directory “/usr/share/metasploit-framework/data/exploits/mysql/”. Click here for the github link to the files. First, we must check the architecture of MySQL running. The global variable ‘@@version_compile_os’ shows us the architecture of the MySQL instance and the ‘@@version_compile_machine’ shows us the architecture of the operating system. In this case we are running a 64-bit version of MySQL inside a 64-bit Windows OS.

First, we must check the architecture of MySQL running. The global variable ‘@@version_compile_os’ shows us the architecture of the MySQL instance and the ‘@@version_compile_machine’ shows us the architecture of the operating system. In this case we are running a 64-bit version of MySQL inside a 64-bit Windows OS.




0QyzZyb.png



Starting from MySQL 5.0.67 the UDF library must be contained inside the plugin folder which can be found out by using the ‘@@plugin_dir’ global variable. This variable can be seen and edited inside the mysql.ini file.



rHg7IlV.png


You can change the plugin directory variable by passing the new value to the mysqld.

mysqld.exe –plugin-dir=C:\\temp\\plugins\\

Another way would be to write a new mysql configuration file with the plugin directory and pass it to mysqld.

mysqld.exe --defaults-file=C:\\temp\\my.ini

The content of the ‘my.ini’

[mysqld] plugin_dir = C:\\temp\\plugins\\


In MySQL versions prior to 5.0.67 it’s said the file must be in a directory that is searched by your system’s dynamic linker. The same applies to MySQL versions prior to 4.1.25. Here’s the text as mentioned in the documentation.


“As of MySQL 5.0.67, the file must be located in the plugin directory. This directory is given by the value of the plugin_dir system variable. If the value of plugin_dir is empty, the behavior that is used before 5.0.67 applies: The file must be located in a directory that is searched by your system’s dynamic linker.”


“As of MySQL 4.1.25, the file must be located in the plugin directory. This directory is given by the value of the plugin_dir system variable. If the value of plugin_dir is empty, the behavior that is used before 4.1.25 applies: The file must be located in a directory that is searched by your system’s dynamic linker.”
In older versions you can upload the DLL file to the following locations and create new UDF functions.
• @@datadir
• @@basedir\bin
• C:\windows
• C:\windows\system
• C:\windows\system32
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.