Im SFOS werden die Daten für die einzelnen Dienste und Funktionen wie zu erwarten in Datenbanken gespeichert. Hier findet ihr eine Auflistung der mir bekannten Sophos Firewall Datenbanken und Hinweise wie die Daten aus den Tabellen ausgelesen werden können.
Stand: 10.01.2025
Einleitung
Ich habe in meinen vergangenen Projekten immer wieder Themen gehabt bei denen man auf die Datenbank zugreifen muss - sei es zu Informationszwecken, zum Schreiben von Skripten, oder um Fehler zu korrigieren die in der GUI nicht mehr zu korrigieren sind. Es gibt mehrere Beispiele. Bei meinen Recherchen im Internet bin ich nie richtig fündig geworden eine gesamte Übersicht zu bekommen. Man ist ja neugierig. 😉
Über durch den Support gelieferte Befehlszeilen und ein wenig Durchwühlen durch Dateien im Filesystem der Firewall konnte ich einiges zu Datenbanken und Tabellen sammeln. Mit Hilfe der Tabellen habe ich auch ein Skript geschrieben welches eine Referenzsuche für die angelegten Benutzer und Gruppen macht - bis SFOS 21.0.0 ist es ja leider nicht möglich in GUI.
Dank unseres Lesers Markus (aus den Beitrags-Kommentaren) konnte ich die Liste weiter vervollständigen und auch weitere Datenbanken ergänzen.
An der Stelle noch mal ein großes DANKE! 😀
Da die Sammlung jetzt deutlich größer geworden ist, habe ich mich entschieden den Artikel auf einen aktuellen Stand zu bringen und die Informationen anders zu präsentieren.
Die folgenden Informationen beziehen sich auf den Stand SFOS 21.0.0. Einige Tabellen sind in älteren Versionen evtl. nicht existent.
Wozu nutzt ihr die Tabellen? Schreibt uns eure Zwecke oder weitere Erkenntnisse gerne in die Kommentare!
Welche Datenbanken gibt es?
Insgesamt sind mir bisher drei Datenbanken bekannt. Was letztendlich in welcher Tabelle steht werde ich allein aufgrund der Menge der Tabellen nicht auflisten. Hier müsst ihr selber ein wenig schauen was für euch die gesuchten Informationen enthält. Viele der Tabellen sind auch für die möglichen Einsatzzwecke der Endanwender und Admins einfach nur irrelevant. Meistens sind die Namen der Tabellen sprechend genug um den Zweck herauszufinden. Aber schaut einfach selber.
PostgreSQL "corporate"
Diese Datenbank enthält hauptsächlich Informationen zu der Konfiguration der Firewall. Also Regeln, Benutzer, Objekte, usw...
Tabellen
tblaccesspoint
tblaccesspolicy
tblacldefinition
tblactive_threat_response
tblactivity
tblactivityrule
tblactivityrule_file
tblactivityrule_url
tblactivityrule_webcat
tbladmin_dsthost_rel
tbladmin_host_rel
tbladmin_offload_disable
tbladmin_service_access
tbladmin_service_rel
tbladsauthserver
tbladsdomainsearchqueryrel
tbladsserverdomainrel
tblalertconfigdetail
tblallow_domain
tblapiconfig
tblappbwrel
tblappclassification
tblappclassificationrel
tblappfilterpolicy
tblappfilterpolicydetail
tblapplianceproperties
tblapplication_pr_rel
tblapplicationobject
tblappstoeps
tblatpconfiguration
tblatphostexceptionrel
tblauthenticatedrelay
tblauthserverconfig
tblauthsettings
tblautopurge
tblavasconf
tblbackupmaildetail
tblbandwidthpolicy
tblbandwidthpolicydetail
tblbookmark
tblbookmarkdomains
tblbookmarkgroup
tblbookmarkgrouprelation
tblbridge_ethertype_rel
tblbridgedetail
tblbridgevlanfilter
tblbrstaticentry
tblbypassfirewall
tblcacheconfiguration
tblccl
tblccldescrel
tblcclnamerel
tblcclrawregexesrel
tblcclregexrel
tblcentralsynchronization
tblcertificatesan
tblchromebookssoconfig
tblclientlogintemplate
tblclientservices
tblconfiginfo
tblconfiguration
tblconnectwiseconfiguration
tblcrlinfo
tblcrtrafficnat
tblctacollector
tblcustomappcategory
tblcustomization_assets
tblcustomizeddeniedmsg
tblcvreportgroup
tblcvreportgrouprel
tbldashboarduser
tbldata_config
tbldataconfig
tbldatatransferpolicy
tbldatetimeconf
tbldb9users
tblddnsaccountdetail
tbldeanonymizationinfo
tbldecryptionprofilecipherrel
tbldecryptionprofiletlsoptions
tbldefaultdeniedmsg
tbldefaultinternetscheme
tbldefaultwebfilternotificationsettings
tbldelegatedconf
tbldevmapinfo
tbldgdconf
tbldhcpconf
tbldhcpconf_dynamiclease_rel
tbldhcpconf_staticlease_rel
tbldhcpoptions
tbldhcpoptionval
tbldhcprelay
tbldhcprelayiprel
tbldhcpv6clientconf
tbldkimsigning
tbldkimverification
tbldlp
tbldlpsignature
tbldnsconf
tbldnsrbl_zones
tbldnsrequestroute
tbldnsrequestrouteprop
tbldospolicy
tbldosrules
tbldpp
tbldppsignature
tbldstnet_pr_rel
tbleacappcache
tbleacapplications
tbleacendpoints
tbleacsearchcategories
tbledirauthserver
tblemailarchiver
tblemailuserlist
tblemailusersallowed
tblemailusersblocked
tblentitymonitor
tblepcattocatmapping
tblethtoolconf
tbleventnotification
tbleventnotificationgroup
tblexception_policy
tblexception_rcpt_addresses
tblexthreatfeedconfig
tblexthreatfeedpriority
tblfeedbackchannel
tblfiletype_extension
tblfiletype_mimeheader
tblfiletypecat
tblfirewallgroup
tblfirewallrule
tblfirewallscanrel
tblfirewalltelemetry
tblformtemplate_assets
tblfullbr_domains
tblfwdest
tblfwdest_exception
tblfwdestzone
tblfwdestzone_exception
tblfwexception
tblfwgroupdstrel
tblfwgrouprel
tblfwgroupsrcrel
tblfwservice
tblfwservice_exception
tblfwsource
tblfwsource_exception
tblfwsourcezone
tblfwsourcezone_exception
tblfwuser
tblgateway
tblgatewaymlm
tblgeneralrule
tblgeneralrulebypass
tblgeoip_codes
tblgreroute
tblgretunnel
tblgroupdetail
tblgwfoc
tblhaconfig
tblhaconfig_admin_ip_port_rel
tblhaencryption
tblhalbsconfig
tblhasetupdetail
tblhbcloudcredential
tblheartbeatzonerel
tblhost
tblhostgrouprel
tblhotspot
tblhotspotfirewallrel
tblhotspotsadvancedvoucher
tblhotspotslogincertrel
tblhotspotsvoucher
tblhotspotswalledrel
tblhotspotvoucherrel
tblhttpconfiguration
tblhttpproxysafeport
tblhttpsdecryptionprofile
tblicapprofile
tblicapserver
tblidpcustomsignature
tblidppolicy
tblidppolicydetail
tblidpssorolemapping
tblidpssoserver
tblimcontact
tblimcontactgrouprel
tblimloggingrule
tblimrule
tblinboundallowedhost
tblinboundblockedhost
tblinitstring
tblinterfacerel
tblinternetscheme
tblipaddresses
tbliptunnel
tbliviewbookmark
tbliviewbookmarkgroup
tblkernelmodules
tbll2tpconf
tbll2tpusers
tbllagdetail
tblletsencryptsettings
tbllist
tbllistdetail
tbllivesslvpnusers
tblloadbalancemethod_rel
tbllocalservicedetails
tbllocalzoneacl
tbllogtypeplugincall
tbllogtypes
tblmacs
tblmailproxyconf
tblmailschedule
tblmailsignature
tblmcastrouting
tblmcastroutingdetail
tblmesh_ap_rel
tblmessagecat
tblmessages
tblmigrated_policyroutes
tblmlmloadbalancemethods
tblmonitor
tblmonitordetail
tblmtalist
tblmtalistdetail
tblmtaspxconfigrel
tblmtaspxconfiguration
tblmtaspxtemplates
tblmultiuserhost
tblnatinboundinterfacerel
tblnatinterfacewiserel
tblnatoriginaldestrel
tblnatoriginalservicerel
tblnatoriginalsourcerel
tblnatoutboundinterfacerel
tblnatrule
tblnetflowserver
tblnetworkzone
tblnonstdportservice
tblotp
tblotpsettings
tbloutboundallowedhost
tbloutboundblockedhost
tbloverridepolicy
tblpimconfig
tblpimgroupinfo
tblpiminterface
tblpolicy
tblpolicyroute
tblpolicytestermethod
tblpolicytesterrel
tblpopimap_srcip
tblpopimaprule
tblpppoeconf
tblpptpconf
tblpptpusers
tblprivilegedusers
tblprohibitedcategories
tblprohibiteddomains
tblproxyneighbour
tblpuawhitelist
tblpubkeyauthconf
tblraclientconf
tblradiusauthserver
tblradiusclients
tblradiusserverattributes
tblradiusserverattrtypes
tblradvdconfig
tblradvdconfigprefixdetails
tblrealwebserver
tblred
tblred_interface_relation
tblreddevice
tblrequiredtlsdomain
tblrequiredtlshost
tblrole
tblrootcadetail
tblrootcainfo
tblroutingauth
tblroutinginfo
tblschedule
tblscheduledetail
tblscusertoken
tblsdwan_gw_rel
tblsdwanprofile
tblsecpolicyrulecclrel
tblsecpolicyruleuserrel
tblsecpolicywebcategoryitemrel
tblsecpolicywebcategoryitemrel_activity
tblsecpolicywebcategoryitemrel_file
tblsecpolicywebcategoryitemrel_url
tblsecpolicywebcategoryitemrel_webcat
tblsecpolicywebcategoryrel
tblsecuritypolicy
tblservice
tblservice_pr_rel
tblservicedetail
tblservicegrouprel
tblservicescanrel
tblskipquarantinereports
tblskiptlshost
tblsmarthostsetting
tblsmarthostsettingrel
tblsmsgwprofile
tblsmsgwreqrespparam
tblsmtpprofile
tblsmtpprofile_blockfiletype
tblsmtpprofile_domain_rel
tblsmtpprofile_rbl_rel
tblsmtpprofile_routing_rel
tblsmtpprofile_whitelisttype
tblsnmpagentconf
tblsnmpmanagerconf
tblsnmpv3trapiplist
tblspamadvancedrule
tblspamcheckexceptions_allowdomain
tblspamcheckexceptions_allowipfqdn
tblspamcheckexceptions_blockdomain
tblspampolicy
tblspamrule
tblspamruledestip
tblspamrulesrcip
tblsplitnetworks_relation
tblspoofing
tblspx_templates
tblspxconfigrel
tblspxconfiguration
tblsrcnet_pr_rel
tblsshpubkey
tblsslvpnclientconn
tblsslvpnconn_local_net_rel
tblsslvpnconn_remote_net_rel
tblsslvpnglobalconf
tblsslvpnparameters
tblsslvpnpolicy
tblsslvpnpolicyresourcerel_fullaccess
tblsslvpnpolicyresourcerel_webaccess
tblsslvpnsrvconn
tblstaticdnsentry
tblstaticdnsentryprop
tblstaticneighbourentry
tblsupportaccess
tblsyshostname
tblsyslogconfigure
tblsyslogrelation
tblsystemservice
tbltacacsauthserver
tblthreatexception
tbltlsrule
tbltlsrule_dest_network_rel
tbltlsrule_dest_zone_rel
tbltlsrule_services_rel
tbltlsrule_src_network_rel
tbltlsrule_src_user_rel
tbltlsrule_src_zone_rel
tbltlsrule_syncapp_rel
tbltlsrule_syncfilter_rel
tbltlsrule_websites_rel
tbltlssettings
tbltrustedentry
tbluicertificaterel
tblunicastrouting
tblup2dateclientconfig
tblurlgroup
tblurlgroupmembers
tblurlregexs
tblurlscheme
tblusbmodemconf
tbluser
tbluser_pr_rel
tbluseraccounting
tbluserapploginiprel
tblusergrouprel
tbluseriprel
tblusermacrel
tbluserrel
tbluserrolerelation
tblvdslconf
tblvirtualwebserver
tblviruspolicy
tblviruspolicyblockfiletype
tblviruspolicynotifyaction
tblviruspolicywhitelisttype
tblvoucher
tblvpnawsbgprel
tblvpnbackuplink
tblvpncertificate
tblvpncertificatesubaltname
tblvpnciscoconnection
tblvpnconndomaindetails
tblvpnconnection
tblvpnconnectiondetail
tblvpnconngroup
tblvpnconngroupdetails
tblvpnconnhostrel
tblvpnconnstatus
tblvpncsrdetail
tblvpnletsencryptcsrdetail
tblvpnpolicy
tblvpnproperties
tblvpnreservedip
tblvpnroutes
tblvpnsscertdetail
tblwaf_real_location_rel
tblwaf_virtual_location_rel
tblwafadvanceconfig
tblwafauth_profile
tblwafauth_profile_user_rel
tblwafblockcountries
tblwafexception
tblwafexception_path
tblwafexception_skip_custom_threat_cat_rel
tblwafexception_skip_threat_cat_rel
tblwafexception_source
tblwafexceptionrel
tblwaffilter
tblwafformtemplate
tblwaflocation
tblwaflocation_allowednet
tblwaflocation_deniednet
tblwafsecprofile_custom_threat_cat_rel
tblwafsecprofile_skiprules
tblwafsecprofile_threat_cat_rel
tblwafsecprofile_urls
tblwafsecurityprofile
tblwafslowhttpsettings
tblwafslowhttpskipnetworks
tblwaftlssetting
tblwebaccess_token
tblwebaccess_token_detail
tblwebcategory
tblwebcategorykeyworddetail
tblwebcategoryurldetails
tblwebclientportalsetting
tblwebexceptiondomainitems
tblwebexceptiondomainitems_dstip
tblwebexceptiondomainitems_srcip
tblwebexceptiondomainitems_urlregex
tblwebexceptiondomainitems_webcat
tblwebexceptions
tblwebfilterruledetails
tblwebserverdomain
tblwebtempaccess
tblwlanglobal
tblwlanroguescan
tblwlap
tblwlap_schedule_rel
tblwlap_wlnet_rel
tblwlglobalsettings
tblwlgroup
tblwlgroup_ap_rel
tblwlgroup_wlnet_rel
tblwlnet_schedule_rel
tblxauthusers
available_login_eventv6_1718817634
available_login_eventv6_1719915092
last_login_event
tbl_available_login_event
tbl_sar_dynamic_query
tbl_used_login_event
tblalertconfig
tblalertmsg
tblalertmsgdefaultparam
tblappcached_config
tblappliancespecificparam
tblapplicationcomponent
tblapplicationname
tblattributes
tblaudit
tblawscfg
tblcentralgroups
tblcentralmgmt
tblcfrstats
tblcipheralgorithms
tblcolumndetail
tblcompany
tblcontrolcenterpdf
tblcountrylonglatinfo
tblcrevent
tblctavpnnetwork
tbldashboardmenu
tbldatagrid
tbldatagridcolumn
tbldatalink
tbldatalink_version
tblddnsserviceprovider
tbldefaultconfigini18n
tblenckeydata
tblentity
tblentitygrouprelation
tblexecutivesummaryreport
tblexthreatfeedglobaldata
tblexthreatfeedstate
tblfwcmfrpcd
tblfwnewpolicy
tblgraph
tblgraphformat
tblhapairparams
tblhaparam
tblhastatus
tblhavmac
tblicmpcode
tblicmptype
tblimlogginglevel
tblimprotocol
tblinterface
tblipaddress
tblipprotocol
tbliviewconfig
tbliviewmenu
tbliviewmenuv1
tbllanguage
tbllocalservice
tbllocalservicetype
tbllogoutput
tbllogseverity
tbllogviewerfields
tbllogviewerfiltercondition
tbllogviewerfilterconfig
tbllogviewerfiltertype
tblmanage_fqdn_ip
tblmanagecolumn
tblmodemautodetail
tbloperation
tblprotocolgroup
tblprotocolidentifier
tblregistration
tblreport
tblreportcolumn
tblreportgroup
tblreportgroupquery
tblreportgroupqueryrel
tblreportgrouprel
tblreportquery
tblreportqueryconfig
tblreportqueryrel
tblreverse_proxy_data
tblsitetositeremoteroute
tblspamcheckexceptions_migrate
tblstatusmappings
tbltelemetry
tbltheme
tbltoptenapps
tbltrafficliveconnection
tblurlacl
tblvlantagrules
tblweekday
tblztnaconnector
localap_wlnet_rel
localap_wlnet_rel_1
Die Liste bekommt man auch über diesen Befehl in der advanced Shell:
psql -U pgroot -d corporate -c '\dt'
Den Inhalt einer einzelnen Tabelle erhaltet ihr wie folgt. Ersetzt "tbluser" aus dem Beispiel durch eine der oben aufgelisteten Tabellen.
# Tabellenansicht
# Table view
psql -U pgroot -d corporate -c "select * from tbluser;"
# Listenansicht
# List view
psql -U pgroot -d corporate -c "select * from tbluser;" x
PostgreSQL "iviewdb"
Diese Datenbanken enthält hauptsächlich Daten zu den Reports und Logs der Firewall. Hier sind aber auch zum Beispiel Tabellen mit Infos zu Mail-Quarantäne (tblquarantinemailmergev6), Mail-Spool (tblmailspool), Mail-Logs (tblmaillog), oder das Firewall Log.
Tabellen
Die Liste der Tabellen ist so groß (6434 Stück), dass ich sie an der Stelle nicht aufliste.
Die Liste bekommt man auch über diesen Befehl in der advanced Shell:
psql -U nobody -d iviewdb -p 5433 -c '\dt'
Den Inhalt einer einzelnen Tabelle erhaltet ihr wie folgt. Ersetzt "tblquarantinemailmergev6" aus dem Beispiel durch eine der oben aufgelisteten Tabellen.
# Tabellenansicht
# Table view
psql -U nobody -d iviewdb -p 5433 -c "select * from tblquarantinemailmergev6;"
# Listenansicht
# List view
psql -U nobody -d iviewdb -p 5433 -c "select * from tblquarantinemailmergev6;" x
SQLite
Die SQLite Datenbank ist die kleinste Datenbank und ist dateibasierend. Sie enthält zum Beispiel Informationen der aktuell aktiven Benutzer.
Tabellen
Auflisten könnt ihr den Inhalt wie folgend beschrieben. Da es nur wenig Tabellen sind, schreibe ich die Befehle für alle zusammen auf.
sqlite_client 127.0.0.1 6061 1 "select * from tblliveuser"
sqlite_client 127.0.0.1 6061 1 "select * from tblliveuser_otherattr"
sqlite_client 127.0.0.1 6061 1 "select * from tblliveuseraccounting"
sqlite_client 127.0.0.1 6061 1 "select * from tbladminaccess"
sqlite_client 127.0.0.1 6061 1 "select * from tblwifiliveconnections"
Ich habe bisher noch keinen Weg gefunden die Inhalte mit Spaltennamen anzuzeigen. Mit diesem Befehl kann man sich die Spaltennamen auflisten lassen und muss sie dann aber manuell gegen die Inhalte setzen.
sqlite_client 127.0.0.1 6061 1 "PRAGMA table_info(tblliveuser);"
Genial! So eine Übersicht habe ich schon länger sucht. Danke für die Auflistung.
Hallo Max,
sehr gerne!
Gruß,
Sebastian
Hallo Sebastian,
weisst du zufällig in welcher Datenbank bzw. Tabelle die STAS LiveUser gespeichert werden?
Leider kann man über die API immer nur 50 abrufen.
Ich habe dank deiner Tabellenübersicht leider nur die tbllivesslvpnusers gefunden.
Danke dir für die tolle Arbeit!
Markus
Hallo Markus,
nein, eine Tabelle ist mir dazu nicht bekannt. Sorry. Adhoc fällt mir auch kein anderer Weg ein.
Mit welchem Aufruf holst du die Infos über die API?
Gruß,
Sebastian
userpassword
Die 50 sind hartcodiert, dass hat Sophos leider inzwischen bestätigt und man kann auch keine Filter anwenden, dass ist ein known issue 🙁
Hallo Markus,
OK, das ist natürlich ärgerlich. Aber eie weitere Idee hab ich dann auch nicht mehr. Sorry.
Gruß,
Sebastian
sqlite_client 127.0.0.1 6061 1 "select * from tblliveuser"
Danke für die Info! Scheinbar gibt es noch eine zweite Datenbank mit SQLite. War mir garnicht bewusst bisher. Es gibt hier auch nicht viele Tabellen wie es aussieht. Diese hier habe ich gefunden:
tblliveuser
tblliveuser_otherattr
tblliveuseraccounting
tbladminaccess
tblwifiliveconnections
Mit diesem Befehl lässt sich herausfinden was die Spaltennamen sind:
sqlite_client 127.0.0.1 6061 1 "PRAGMA table_info(tblliveuser);"
Hallo Sebastian,
es gibt insgesamt sogar 3 Datenbanken.
Die Tabellen der 3. und größten DB kannst du abfragen mit:
psql -U nobody -d iviewdb -p 5433 -c '\dt'
Hilfreich ist hier zB die Tabelle tblquarantinemailmergev6 um Mails in der Quarantäne abfragen zu können.
GrußMarkus
Hallo Markus,
wow, danke für den Hinweis!
Die DB hats mal echt in sich. Ich passe gleich mal den Artikel an.
Viele Grüße,
Sebastian