⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smb.h

📁 snort2.8.4版本
💻 H
📖 第 1 页 / 共 5 页
字号:
 ********************************************************************/typedef struct _SmbLm20_LogoffAndXReq    /* smb_wct = 2 */{    uint8_t  smb_wct;    /* count of 16-bit words that follow */    uint8_t  smb_com2;   /* secondary (X) command, 0xFF = none */    uint8_t  smb_reh2;   /* reserved (must be zero) */    uint16_t smb_off2;   /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_bcc;    /* value = 0 */} SmbLm20_LogoffAndXReq;typedef struct _SmbLm20_LogoffAndXResp    /* smb_wct = 2 */{    uint8_t  smb_wct;    /* count of 16-bit words that follow */    uint8_t  smb_com2;   /* secondary (X) command, 0xFF = none */    uint8_t  smb_res2;   /* reserved (pad to word) */    uint16_t smb_off2;   /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_bcc;    /* value = 0 */} SmbLm20_LogoffAndXResp;/********************************************************************* * Tree Connect :: smb_com = SMB_COM_TREE_CON * *********************************************************************/typedef struct _SmbCore_TreeConnectReq  /* smb_wct = 0 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_bcc;     /* min = 4 */#if 0    uint8_t  smb_fmt;     /* ASCII -- 04 */    uint8_t  smb_buf[];   /* path/username */    uint8_t  smb_fmt2;    /* ASCII -- 04 */    uint8_t  smb_buf2[];  /* password */    uint8_t  smb_fmt3;    /* ASCII -- 04 */    uint8_t  smb_buf3[];  /* dev name (<device> or LPT1) */#endif} SmbCore_TreeConnectReq;typedef struct _SmbCore_TreeConnectResp  /* smb_wct = 2 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_xmit;    /* max xmit size */    uint16_t smb_tid;     /* tree id */    uint16_t smb_bcc;} SmbCore_TreeConnectResp;/********************************************************************* * Tree Connect AndX :: smb_com = SMB_COM_TREE_CON_ANDX * *********************************************************************/typedef struct _SmbLm10_TreeConnectAndXReq   /* smb_wct = 4 */{    uint8_t  smb_wct;        /* count of 16-bit words that follow */    uint8_t  smb_com2;       /* secondary (X) command, 0xFF = none */    uint8_t  smb_reh2;       /* reserved (must be zero) */    uint16_t smb_off2;       /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_flags;      /* additional information:                                bit 0 - if set, disconnect TID in current smb_tid */    uint16_t smb_spasslen;   /* length of smb_spasswd */    uint16_t smb_bcc;        /* minimum value = 3 */#if 0    uint8_t  smb_spasswd[*]; /* net-name password (* = smb_spasslen value) */    uint8_t  smb_path[];     /* server name and net-name */    uint8_t  smb_dev[];      /* service name string */#endif} SmbLm10_TreeConnectAndXReq;typedef struct _SmbLm10_TreeConnectAndXResp    /* smb_wct = 2 */{    uint8_t  smb_wct;       /* count of 16-bit words that follow */    uint8_t  smb_com2;      /* secondary (X) command, 0xFF = none */    uint8_t  smb_res2;      /* reserved (pad to word) */    uint16_t smb_off2;      /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_bcc;       /* min value = 3 */#if 0    uint8_t  smb_service[]; /* service type connected to (string) */#endif} SmbLm10_TreeConnectAndXResp;typedef struct _SmbLm21_TreeConnectAndXResp    /* smb_wct = 3 */{    uint8_t  smb_wct;        /* count of 16-bit words that follow */    uint8_t  smb_com2;       /* secondary (X) command, 0xFF = none */    uint8_t  smb_res2;       /* reserved (pad to word) */    uint16_t smb_off2;       /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_optsupp;    /* bit mask indicating advanced OS features available                                bit0 = 1, exclusive search bits supported */    uint16_t smb_bcc;        /* min value = 3 */#if 0    uint8_t  smb_nativefs[]; /* native file system for this connection */ #endif} SmbLm21_TreeConnectAndXResp;/******************************************************************** * Tree Disconnect :: smb_com = SMB_COM_TREE_DIS  * ********************************************************************/typedef struct _SmbCore_TreeDisconnectReq   /* smb_wct = 0 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_bcc;     /* must be 0 */} SmbCore_TreeDisconnectReq;typedef struct _SmbCore_TreeDisconnectResp   /* smb_wct = 0 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_bcc;     /* must be 0 */} SmbCore_TreeDisconnectResp;/******************************************************************** * Open File :: smb_com = SMB_COM_OPEN * ********************************************************************/typedef struct _SmbCore_OpenReq   /* smb_wct = 2 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_mode;    /* r/w/share */    uint16_t smb_attr;    /* attribute */    uint16_t smb_bcc;     /* min = 2 */#if 0    uint8_t  smb_fmt;     /* ASCII -- 04 */    uint8_t  smb_buf[];   /* file pathname */#endif} SmbCore_OpenReq;typedef struct _SmbCore_OpenResp   /* smb_wct = 7 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_fid;     /* file handle */    uint16_t smb_attr;    /* attribute */    uint16_t smb_tlow;    /* time1 low */    uint16_t smb_thigh;   /* time1 high */    uint16_t smb_fslow;   /* file size low */    uint16_t smb_fshigh;  /* file size high */    uint16_t smb_access;  /* access allowed */    uint16_t smb_bcc;     /* must be 0 */} SmbCore_OpenResp;/******************************************************************** * Open AndX :: smb_com = SMB_COM_OPEN_ANDX * ********************************************************************/typedef struct _SmbLm10_OpenAndXReq   /* smb_wct = 15 */{    uint8_t  smb_wct;        /* count of 16-bit words that follow */    uint8_t  smb_com2;       /* secondary (X) command, 0xFF = none */    uint8_t  smb_reh2;       /* reserved (must be zero) */    uint16_t smb_off2;       /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_flags;      /* additional information:                                bit 0 - if set, return additional information                                bit 1 - if set, set single user total file lock (if only access)                                bit 2 - if set, the server should notify the consumer on any                                        action which can modify the file (delete, setattrib,                                        rename, etc.). if not set, the server need only notify                                        the consumer on another open request. This bit only has                                        meaning if bit 1 is set. */    uint16_t smb_mode;       /* file open mode */    uint16_t smb_sattr;      /* search attributes */    uint16_t smb_attr;       /* file attributes (for create) */    uint32_t smb_time;       /* create time */    uint16_t smb_ofun;       /* open function */    uint32_t smb_size;       /* bytes to reserve on "create" or "truncate" */    uint32_t smb_timeout;    /* max milliseconds to wait for resource to open */    uint32_t smb_rsvd;       /* reserved (must be zero) */    uint16_t smb_bcc;        /* minimum value = 1 */#if 0    uint8_t  smb_pathname[]; /* file pathname */#endif} SmbLm10_OpenAndXReq;typedef struct _SmbLm10_OpenAndXResp   /* smb_wct = 15 */{    uint8_t  smb_wct;        /* count of 16-bit words that follow */    uint8_t  smb_com2;       /* secondary (X) command, 0xFF = none */    uint8_t  smb_res2;       /* reserved (pad to word) */    uint16_t smb_off2;       /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint16_t smb_fid;        /* file handle */    uint16_t smb_attribute;  /* attributes of file or device */    uint32_t smb_time;       /* last modification time */    uint32_t smb_size;       /* current file size */    uint16_t smb_access;     /* access permissions actually allowed */    uint16_t smb_type;       /* file type */    uint16_t smb_state;      /* state of IPC device (e.g. pipe) */    uint16_t smb_action;     /* action taken */    uint32_t smb_fileid;     /* server unique file id */    uint16_t smb_rsvd;       /* reserved */    uint16_t smb_bcc;        /* value = 0 */} SmbLm10_OpenAndXResp;/******************************************************************** * NT Create AndX :: smb_com = SMB_COM_NT_CREATE_ANDX * ********************************************************************/typedef struct _SmbNt10_NtCreateAndXReq   /* smb_wct = 24 */{    uint8_t  smb_wct;           /* count of 16-bit words that follow */    uint8_t  smb_com2;          /* secondary (X) command, 0xFF = none */    uint8_t  smb_res2;          /* reserved (pad to word) */    uint16_t smb_off2;          /* offset (from SMB hdr start) to next cmd (@smb_wct) */    uint8_t  smb_res;           /* reserved */    uint16_t smb_name_len;      /* length of name of file */    uint32_t smb_flags;         /* flags */    uint32_t smb_root_fid;      /* fid for previously opened directory */    uint32_t smb_access;        /* specifies the type of file access */    UINT64   smb_alloc_size;    /* initial allocation size of the file */    uint32_t smb_file_attrs;    /* specifies the file attributes for the file */    uint32_t smb_share_access;  /* the type of share access */    uint32_t smb_create_disp;   /* actions to take if file does or does not exist */    uint32_t smb_create_opts;   /* options used when creating or opening file */    uint32_t smb_impersonation_level;  /* security impersonation level */    uint8_t  smb_security_flags;  /* security flags */    uint16_t smb_bcc;           /* byte count */#if 0    uint8_t * name[];    /* name of file to open */#endif} SmbNt10_NtCreateAndXReq;/* Specification says word count is 34, but servers (Windows and * Samba) respond with word count of 42.  Wireshark decodes as word * count 34, but there is extra data at end of packet. */typedef struct _SmbNt10_NtCreateAndXResp    /* smb_wct = 34 */{    uint8_t  smb_wct;    uint8_t  smb_com2;    uint8_t  smb_res2;    uint16_t smb_off2;    uint8_t  smb_oplock_level;    uint16_t smb_fid;    uint32_t smb_create_action;    UINT64   smb_creation_time;    UINT64   smb_last_access_time;    UINT64   smb_last_write_time;    UINT64   smb_change_time;    uint32_t smb_file_attrs;    UINT64   smb_alloc_size;    UINT64   smb_eof;    uint16_t smb_file_type;    uint16_t smb_device_state;    uint8_t  smb_directory;    uint16_t smb_bcc;} SmbNt10_NtCreateAndXResp;/* XXX Trans2 Open? *//* XXX NT Transact Create? *//******************************************************************** * Close File :: smb_com = SMB_COM_CLOSE * ********************************************************************/typedef struct _SmbCore_CloseReq   /* smb_wct = 3 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_fid;     /* file handle */    uint16_t smb_tlow;    /* time low */    uint16_t smb_thigh;   /* time high */    uint16_t smb_bcc;     /* must be 0 */} SmbCore_CloseReq;typedef struct _SmbCore_CloseResp   /* smb_wct = 0 */{    uint8_t  smb_wct;     /* count of 16-bit words that follow */    uint16_t smb_bcc;     /* must be 0 */} SmbCore_CloseResp;/******************************************************************** * Write :: smb_com = SMB_COM_WRITE * ********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -