navigation bar left navigation bar right

Secunia CSI7
navigation left tab Advisories navigation right tab
navigation left tab Research navigation right tab
navigation left tab Forums navigation right tab
navigation left tab Create Profile navigation right tab
navigation left tab Our Commitment navigation right tab
PSI
PSI API
CSI
OSI
xSI
Vulnerabilities
Programs
Open Discussions
My Threads
Create Thread
Statistics
About

Forum Thread: Adding to Secunia Package System (SPS) Jscript package

You are currently viewing a forum thread in the Secunia Community Forum. Please note that opinions expressed here are not of Secunia but solely reflect those of the user who wrote it.

This thread was submitted in the following forum:
CSI

This thread has been marked as resolved.
staples1234 Adding to Secunia Package System (SPS) Jscript package
Member 4th Nov, 2013 17:19
Ranking: 0
Posts: 2
User Since: 4th Nov, 2013
System Score: N/A
Location: US
I would like to add additional code to the Jscript (JavaScript) code of the Secunia out of the box CSI Jscript.

example is deleting (or renaming) of old file that is causing mis-detections...

String tempFile = "c:\windows\syswow64\macromed\shockwave 10\swinit.exe";
File fileTemp = new File(tempFile);
if (fileTemp.exists()){
fileTemp.delete();
}

I add the code but it does not seem to execute. Any suggestions?

Post "RE: Adding to Secunia Package System (SPS) Jscript package" has been selected as an answer.
This user no longer exists RE: Adding to Secunia Package System (SPS) Jscript package
Secunia Official 22nd Nov, 2013 16:01
Last edited on 22nd Nov, 2013 16:01 Hi,

Please consider the following information related to the desired changes you like to perform:

Adobe Shockwave 12.x package installs Shockwave 10.x files in addition for backward compatibility reasons and so you can consider both version 10.x and 12.x as part of the active installation.Removing the version 10.x directory and the files in it may lead to breaking your software functionality.

The best way to ensure that you are not removing files that are needed is to install Shockwave 12.x on a clean system and then note down the files and folders that came as part of the installation. These shall remain on a system after you perform installation via CSI packages. I cannot provide direct answer to where you shall place your part of the script, but I can provide some theoretical information which can turn out to be helpful to you as well.

a) Patch is delivered by WSUS to the Client
b) Client executes the 'sps.exe' file (which consist of 1.JScript and 2.Software Installer)
c) JScript is executed first - the main function of the SPS script initiates

- Installer is extracted at a local directory, additional checks are performed.
- CSI calls Shell on the local system and executes the extracted installer
- Installer _Uninstalls_ old version (potentially leaving old files behind)
- Installer installs new files on the system (including old Shockwave 10.x)
- CSI script verifies installation and completes.

Perhaps, you shall place your script at the end of the default script where it would possibly make sense to perform a cleaning procedure. Else, it may turn out that you are trying to delete files that hadn't yet been extracted and placed on the system. I hope my information helped.

Kind regards / Stay Secure
Rosen Danailov / Security+
Secunia Customer Support
staples1234 RE: Adding to Secunia Package System (SPS) Jscript package
Member 22nd Nov, 2013 21:38
Score: 0
Posts: 2
User Since: 4th Nov 2013
System Score: N/A
Location: US
I understand the limitations you discussed, but will this code work...

String tempFile = "c:\windows\syswow64\macromed\shockwave 10\swinit.exe";
File fileTemp = new File(tempFile);
if (fileTemp.exists()){
fileTemp.delete();
}
Was this reply relevant?
+0
-0
This user no longer exists RE: Adding to Secunia Package System (SPS) Jscript package
Secunia Official 25th Nov, 2013 10:12
Hi,

As long as the code is placed correctly within the script and the code is written correctly, it should always execute. The execution flow in CSI (JScript template) provided by default to each and every package is being executed identically to how a batch file would do.

So, if the code you exemplified did execute well during your tests, it should be working fine in a Secunia package as well (as long as other code in the template does not block it or invalidates it). Unfortunately, I cannot directly confirm if your code works out of the box.

Kind regards / Stay Secure
Rosen Danailov / Security+
Secunia Customer Support

This thread has been marked as locked.


 Products Solutions Customers Partner Resources Company
 
 Corporate
Vulnerability Intelligence Manager (VIM)
Corporate Software Inspector (CSI)
Consumer
Personal Software Inspector (PSI)
Online Software Inspector (OSI)
 Industry
Compliance
Technology
Integration
 Customers
Testimonials
 MSSP
Technology Partners
References
 Reports
Webinars
Events
 About us
Careers
Memberships
Newsroom


Secunia is a member of FIRST Secunia is a member of EDUcause Secunia is a member of The Open Group Secunia is a member of FS-ISAC
 
Secunia © 2002-2014 Secunia ApS - Rued Langgaards Vej 8, 4th floor, DK-2300 Copenhagen, Denmark - +45 7020 5144
Terms & Conditions and Copyright - Privacy - Report Vulnerability - Disclaimer
follow Secunia on Facebook follow Secunia on Twitter follow Secunia on LinkedIn follow Secunia on YouTube follow Secunia Xing follow Secunias RSS feed follow Secunia on Google+