Get records from system tables

There is a system table named "CM_UDF". I want to get records from this table. The corresponding data file for this table lies in folder named "MAS_SYSTEM" which is outside the folder structure belonging to any company. Moreover, there are no business or service objects to query this table. Can someone please provide a code sample in VB or C# demonstrating how can this be achieved.

Thanks in advance!