Coldfire
ColdFire provides various methods useful for malware development in Golang. Most functions are compatible with both Linux and Windows operating systems.
Install
go get github.com/redcode-labs/ColdFire
Types of functions included
- Logging
- Auxiliary
- Reconnaissance
- Evasion
- Administration
- Sandbox detection
- Disruptive
Use
Logging functions
func F(s string, arg …interface{}) string
Alias for fmt.Sprintffunc PrintGood(msg string)
Print good status messagefunc PrintInfo(msg string)
Print info status messagefunc PrintError(msg string)
Print error status messagefunc PrintWarning(msg string)
Print warning status message
Auxiliary functions
func FileToSlice(file string) []string
Read from file and return slice with lines delimited with newline.func Contains(s interface{}, elem interface{}) bool
Check if interface type contains another interface type.func StrToInt(string_integer string) int
Convert string to int.func IntToStr(i int) string
Converts int to string.func IntervalToSeconds(interval string) int
Converts given time interval to seconds.func RandomInt(min int, max int) int
Returns a random int from range.func RandomSelectStr(list []string) string
Returns a random selection from slice of strings.func RandomSelectInt(list []int) int
Returns a random selection from slice of ints.func RandomSelectStrNested(list [][]string) []string
Returns a random selection from nested string slice.func RemoveNewlines(s string) string
Removes “\n” and “\r” characters from string.func FullRemove(str string, to_remove string) string
Removes all occurences of substring.func RemoveDuplicatesStr(slice []string) []string
Removes duplicates from string slice.func RemoveDuplicatesInt(slice []int) []int
Removes duplicates from int slice.func ContainsAny(str string, elements []string) bool
Returns true if slice contains a string.func RandomString(n int) string
Generates random string of length [n]func ExitOnError(e error)
Handle errorsfunc Md5Hash(str string) string
Returns MD5 checksum of a stringfunc MakeZip(zip_file string, files []string) error
Creates a zip archive from a list of filesfunc ReadFile(filename string) (string, error)
Read contents of a file.func WriteFile(filename string) error
Write contents to a file.func B64d(str string) string
Returns a base64 decoded stringfunc B64e(str string) string
Returns a base64 encoded stringfunc FileExists(file string) bool
Check if file exists.func ParseCidr(cidr string) ([]string, error)
Returns a slice containing all possible IP addresses in the given range.
More…
Disclaimer
Developers are not responsible for any misuse regarding this tool. Use it only against systems that you are permitted to attack.
Copyright (c) 2020 redcodelabs.io