Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gscript 0.1.0 Feature List #45

Closed
23 of 32 tasks
gen0cide opened this issue Feb 20, 2018 · 2 comments
Closed
23 of 32 tasks

gscript 0.1.0 Feature List #45

gen0cide opened this issue Feb 20, 2018 · 2 comments
Assignees

Comments

@gen0cide
Copy link
Owner

gen0cide commented Feb 20, 2018

I wanted to document some of my thoughts on what features I'd like to see in gscript for us to take it to v0.1.0, the first "stable" release I'd like to ship.

New Functions

  • FilePerms(path, 0755, recursive) - allows a script to change the permissions of files and directories, including recursively.
  • FileStat(path) - retrieve the modified/access/create times for a given file or directory.
  • SetModTime(path, timestamp) - Set the modified time of a file.
  • SetAccessTime(path, timestamp) - Set the access time of a file.
  • SetCreateTime(path, timestamp) - Set the create time of a file.
  • FindProcess(searchterm) - Find processes that match a specific regular expression.
  • DetectSandbox() - Detect if the value is running in a sandbox.
  • DetectAV() - Detect AntiVirus that might be running on the machine.
  • SelfPath() - Get current path to the running gscript executable.
  • InstallSystemService(svc_config) - Allows a system service to be installed (cross platform). svc_config is a new data structure that will need to be defined.
  • RenderTemplate(template_bytes, vars) - Allows the user to embed a golang template and render it at runtime.

Compiler Enhancements

  • Move compiler and runtime into their own sub packages. This will reduce final binary size.
  • Minify gscript's before embedding script into final binary.
  • Implement better embedded compression to reduce binary size.
  • Strip symbols from final binary.
  • Create new subcommand new that writes a gscript template to a location of your choice.
  • Add --upx flag to compile command to UPX the final binary to the smallest possible size.
  • Implement simple encryption for payloads.
  • Port GOTTI binary obfuscation to the gscript compiler.

New Macros

  • //require:/path/to/lib.gs - This will allow a gscript to reference custom functions from a javascript file. The gscript library should NOT implement the hook functions and the compiler will return an error if it does.
  • //priority:$VAL - Allows the user to specify lexical ordering of scripts. Scripts without priority will default to priority of 100. All gscripts of a similar priority will be executed concurrently.
  • //os:windows - Allows the user to specify what OS this gscript is intended for, preventing bundling of incompatible gscripts into the final binary.
  • //arch:386 - Same as //os but for architecture.
  • //timeout:30 - Allows the user to set a timeout for this gscript to prevent it from hanging during execution. Default will be set to 10 seconds.

Bug Fixes

  • Fix shell incompatibility with windows terminals.
  • Change compiler output prefix from GENESIS to GSE.
  • Fix Halt() command to stop the entire gscript binary including all goroutines and VMs.
  • Implement a file not found timeout on the //import_url macro.
  • Migrate process injection to an interface that gets satisfied for all platform types.

Tech Debt

  • TBD, but definitely will be some.
  • More documentation needed.
  • README.md redesign to improve user learning.
@vyrus001
Copy link
Collaborator

vyrus001 commented Feb 25, 2018 via email

@gen0cide
Copy link
Owner Author

We got most of it done! v0.1.0 is out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants