|
OpenVAS Scanner 23.23.1
|
API for NASL built-in SMB access focussing effective file rights. More...
#include "nasl_smb.h"#include "../misc/plugutils.h"#include "base/hosts.h"#include "openvas_smb_interface.h"#include <arpa/inet.h>#include <errno.h>#include <gvm/base/logging.h>#include <gvm/base/networking.h>#include <netinet/in.h>#include <stdbool.h>#include <stdio.h>#include <string.h>#include <sys/socket.h>#include <unistd.h>Macros | |
| #define | IMPORT(var) |
| #define | G_LOG_DOMAIN "lib nasl" |
| GLib logging domain. | |
Functions | |
| tree_cell * | nasl_smb_versioninfo (lex_ctxt *lexic) |
| Get a version string of the SMB implementation. | |
| tree_cell * | nasl_smb_connect (lex_ctxt *lexic) |
| Connect to SMB service and return a handle for it. | |
| tree_cell * | nasl_smb_close (lex_ctxt *lexic) |
| Close SMB service handle. | |
| tree_cell * | nasl_smb_file_SDDL (lex_ctxt *lexic) |
| Obtain Security Descriptor in SDDL format. | |
| tree_cell * | nasl_smb_file_owner_sid (lex_ctxt *lexic) |
| Obtain File Owner SID. | |
| tree_cell * | nasl_smb_file_group_sid (lex_ctxt *lexic) |
| Obtain File Group SID. | |
| tree_cell * | nasl_smb_file_trustee_rights (lex_ctxt *lexic) |
| Obtain File Trustee SID with Access Mask. | |
| tree_cell * | nasl_win_cmd_exec (lex_ctxt *lexic) |
| Execute the command in windows. | |
API for NASL built-in SMB access focussing effective file rights.
Provides SMB API as built-in functions to NASL via calling corresponding functions of a appropriate library. The focus is on effective files rights which can't be retrieved via WMI.
| #define G_LOG_DOMAIN "lib nasl" |
GLib logging domain.
| #define IMPORT | ( | var | ) |
Close SMB service handle.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variable "smb_handle" from the lexical context and closes the respective handle.
Connect to SMB service and return a handle for it.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variables "host", "username", "password" and "share" from the lexical context, performs and connects to this given SMB service returning a handle for the service as integer.
Obtain File Group SID.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.
Obtain File Owner SID.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.
Obtain Security Descriptor in SDDL format.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.
Obtain File Trustee SID with Access Mask.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.
Get a version string of the SMB implementation.
| [in] | lexic | Lexical context of NASL interpreter. |
Execute the command in windows.
| [in] | lexic | Lexical context of NASL interpreter. |
Retrieves local variables "cmd" from the lexical context, performs the windows command execution operation returning the result.