Skip to content

Instantly share code, notes, and snippets.

View asolino's full-sized avatar

Alberto Solino asolino

View GitHub Profile
#!/usr/bin/env python
import argparse
import string
import sys
from impacket import nmb
from impacket.smb3 import SMB2_COMPRESSION_TRANSFORM_HEADER, SMB3, SMB2_DIALECT_311, SMB2_NEGOTIATE_SIGNING_REQUIRED, \
SMB2_NEGOTIATE_SIGNING_ENABLED, STATUS_SUCCESS, SMB2_DIALECT_30, \
SMB2_GLOBAL_CAP_ENCRYPTION, SMB2_DIALECT_WILDCARD, SMB2Negotiate_Response, SMB2_NEGOTIATE, \
SMB2Negotiate, SMB311ContextData, SMB2NegotiateContext, SMB2_PREAUTH_INTEGRITY_CAPABILITIES, \
@asolino
asolino / even.py
Last active December 11, 2018 13:13
[MS-EVEN] Interface implementation
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Author: Alberto Solino (@agsolino)
#
# Description:
# [MS-EVEN] Interface implementation
@asolino
asolino / scratch1.py
Created October 11, 2015 02:43
Playing with RemoteFile class and pefile library while researching https://github.com/CoreSecurity/impacket/issues/94
import sys
from pefile import PE
from impacket.smbconnection import SMBConnection, FILE_READ_DATA, FILE_WRITE_DATA
class RemoteFile:
def __init__(self, smbConnection, fileName, share = 'ADMIN$'):
self.__smbConnection = smbConnection
self.__fileName = fileName
self.__share = share
self.__tid = self.__smbConnection.connectTree(share)