Skip to content

Instantly share code, notes, and snippets.

@n3l5
Last active November 11, 2016 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n3l5/a4d299313c8bdb55f69d3ce4a470a61b to your computer and use it in GitHub Desktop.
Save n3l5/a4d299313c8bdb55f69d3ce4a470a61b to your computer and use it in GitHub Desktop.
SymSubmit is used to submit a specific .zip file containing suspected malware to Symantec Security Response. Test on Linux only...,change hard coded fields. Utilize it to "programmatically" submit files. Requires selenium, pyvirtualdisplay, chrome webdriver. If you want to submit silently change it to "Display(visable=0, ....."
import time
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
display = Display(visible=1,size=(800, 600))
display.start()
driver = webdriver.Chrome()
driver.get("https://submit.symantec.com/websubmit/platinum.cgi")
fname = driver.find_element_by_name("fname")
fname.send_keys("FIRSTNAME")
lname = driver.find_element_by_name("lname")
lname.send_keys("LASTNAME")
cname = driver.find_element_by_name("cname")
cname.send_keys("COMPANYNAME")
email = driver.find_element_by_name("email")
email.send_keys("EMAILADDRESS")
email2 = driver.find_element_by_name("email2")
email2.send_keys("EMAILADDRESS")
supportID = driver.find_element_by_name("pin")
supportID.send_keys("SUPPORTIDNUMBER")
fileupload = driver.find_element_by_name("upfile")
fileupload.send_keys("/somedir/somefile.zip")
submit = driver.find_element_by_xpath("//*[@value='Submit']")
submit.click()
time.sleep(30.0)
driver.quit()
display.stop()
@n3l5
Copy link
Author

n3l5 commented Nov 10, 2016

Installing what you need to run symSubmit.py:

Install Selenium:
sudo apt-get install python-pip python-dev python-virtualenv libxss1 libappindicator1 libindicator7 xvfb unzip xserver-xephyr
sudo pip install -U selenium
sudo pip install pyvirtualdisplay

Install Chrome Driver:
wget -N http://chromedriver.storage.googleapis.com/2.25/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

@n3l5
Copy link
Author

n3l5 commented Nov 11, 2016

If you are not a Platinum customer replace the URL in the driver.get field like below:
driver.get("https://submit.symantec.com/websubmit/retail.cgi")

And remove:
supportID = driver.find_element_by_name("pin")
supportID.send_keys("SUPPORTIDNUMBER")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment