Services & supportCareersSign in
AlgoSec
Back to home
Horizon
Horizon
Horizon Platform
Explore our
Platforms modules
Horizon ACE
Transform your cloud network security
Horizon FireFlow
Automated security policy management
Horizon ObjectFlow
Smart automation for policy changes
Horizon AppViz
Discover, visualize and secure applications
Horizon Security Analyzer
Visualize & manage hybrid networks
Algo Assistant
AI assistant for security policy tasks
Integrations
Microsoft Teams
Slack
AT&T
BMC
F5
Microsoft Azure
Google Cloud
HP
AWS
Cisco
Explore all integrations
Product utilities
AlgoSec security center

Money-back guarantee

AlgoSec alternatives

Solutions
Solutions

By use case

Change automation

Risk management

Cost reduction

Compliance

By industry

Security service providers

Finance

Insurance

Healthcare

Government

Telecommunications

Resources
Resources

Explore

Resource center

Central hub for all AlgoSec content

Algo-Library

In-depth research and technical insights

Case studies

Real customer stories & results

Blog

Articles, insights, and product updates

Watch & learn

Videos

Videos on network security

Product demos

See the platform in action

Webinars

Expert talks on security challenges

Partners
Partners

Our partner program

Become a partner

Join the AlgoSec Elevate Partner Program

Our partner ecosystem

Locate a partner

Find a partner in our global network

Technology partners

Integrations with leading technology vendors

Service partners

Work with certified experts for services and consulting

Company
Company

Company overview

About

Who we are and the value we bring

Leadership

The executives guiding AlgoSec

Careers

Open roles and life at AlgoSec

Contact us

Reach our global offices and teams

Events

Conferences and upcoming events

Media center

Company news and product updates

Company utilities

Our customers

AlgoSec professional services

AlgoSec resident engineer

Training services & certification

AlgoSec support programs

AlgoSec media kit

Sign inServices & supportCareers
Schedule a demo
Schedule a demo
Abstract network background
Home
Blog
Sunburst backdoor, part II: DGA & the list of victims

Sunburst backdoor, part II: DGA & the list of victims

Rony Moshkovich

Rony Moshkovich

December 17, 2020

|

4

minute read

Share
YouTubeLinkedIn

Previous Part of the analysis is available here. Next Part of the analysis is available here.

Update from 19 December 2020:

‍Prevasio would like to thank Zetalytics for providing us with an updated (larger) list of passive (historic) DNS queries for the domains generated by the malware.

As described in the first part of our analysis, the DGA (Domain Generation Algorithm) of the Sunburst backdoor produces a domain name that may look like:

fivu4vjamve5vfrtn2huov[.]appsync-api.us-west-2[.]avsvmcloud[.]com

The first part of the domain name (before the first dot) consists of a 16-character random string, appended with an encoded computer’s domain name. This is the domain in which the local computer is registered.

From the example string above, we can conclude that the encoded computer’s domain starts from the 17th character and up until the dot (highlighted in yellow):

fivu4vjamve5vfrtn2huov

In order to encode a local computer’s domain name, the malware uses one of 2 simple methods:

  • Method 1: a substitution table, if the domain name consists of small letters, digits, or special characters ‘-‘, ‘_’, ‘.’
  • Method 2: base64 with a custom alphabet, in case of capital letters present in the domain name

Method 1

In our example, the encoded domain name is “n2huov”. As it does not have any capital letters, the malware encodes it with a substitution table “rq3gsalt6u1iyfzop572d49bnx8cvmkewhj”.

For each character in the domain name, the encoder replaces it with a character located in the substitution table four characters right from the original character.

In order to decode the name back, all we have to do is to replace each encoded character with another character, located in the substitution table four characters left from the original character.

To illustrate this method, imagine that the original substitution table is printed on a paper strip and then covered with a card with 6 perforated windows. Above each window, there is a sticker note with a number on it, to reflect the order of characters in the word “n2huov”, where ‘n’ is #1, ‘2’ is #2, ‘h’ is #3 and so on:

Method 1

Once the paper strip is pulled by 4 characters right, the perforated windows will reveal a different word underneath the card: “domain”, where ‘d’ is #1, ‘o’ is #2, ‘m’ is #3, etc.:

Method 1

A special case is reserved for such characters as ‘0’, ‘-‘, ‘_’, ‘.’. These characters are encoded with ‘0’, followed with a character from the substitution table. An index of that character in the substitution table, divided by 4, provides an index within the string “0_-.”. The following snippet in C# illustrates how an encoded string can be decoded:

static string decode_domain(string s)
{
    string table = "rq3gsalt6u1iyfzop572d49bnx8cvmkewhj";
    string result = "";
    for (int i = 0; i < s.Length; i++)
    {
        if (s[i] != '0')
        {
            result += table[(table.IndexOf(s[i]) + table.Length - 4) % table.Length];
        }
        else
        {
            if (i < s.Length - 1)
            {
                if (table.Contains(s[i + 1]))
                {
                    result += "0_-."[table.IndexOf(s[i + 1]) % 4];
                }
                else
                {
                    break;
                }
            }
            i++;
        }
    }
    return result;
}

Method 2

This method is a standard base64 encoder with a custom alphabet “ph2eifo3n5utg1j8d94qrvbmk0sal76c”.

Here is a snippet in C# that provides a decoder:

public static string FromBase32String(string str)
{
    string table = "ph2eifo3n5utg1j8d94qrvbmk0sal76c";
    int numBytes = str.Length * 5 / 8;
    byte[] bytes = new Byte[numBytes];

    int bit_buffer;
    int currentCharIndex;
    int bits_in_buffer;
    if (str.Length < 3)
    {
        bytes[0] = (byte)(table.IndexOf(str[0]) | table.IndexOf(str[1]) << 5);
        return  System.Text.Encoding.UTF8.GetString(bytes);
    }

    bit_buffer = (table.IndexOf(str[0]) | table.IndexOf(str[1]) << 5);
    bits_in_buffer = 10;
    currentCharIndex = 2;
    for (int i = 0; i < bytes.Length; i++)
    {
        bytes[i] = (byte)bit_buffer;
        bit_buffer >>= 8;
        bits_in_buffer -= 8;
        while (bits_in_buffer < 8 && currentCharIndex < str.Length)
        {
            bit_buffer |= table.IndexOf(str[currentCharIndex++]) << bits_in_buffer;
            bits_in_buffer += 5;
        }
    }
    return System.Text.Encoding.UTF8.GetString(bytes);
}

When the malware encodes a domain using Method 2, it prepends the encrypted string with a double zero character: “00”.

Following that, extracting a domain part of an encoded domain name (long form) is as simple as:

static string get_domain_part(string s)
{
    int i = s.IndexOf(".appsync-api");
    if (i > 0)
    {
        s = s.Substring(0, i);
        if (s.Length > 16)
        {
            return s.Substring(16);
        }
    }
    return "";
}

Once the domain part is extracted, the decoded domain name can be obtained by using Method 1 or Method 2, as explained above:

if (domain.StartsWith("00"))
{
    decoded = FromBase32String(domain.Substring(2));
}
else
{
    decoded = decode_domain(domain);
}

Decrypting the victims’ domain names

To see the decoder in action, let’s select 2 lists:

List #1

Bambenek Consulting has provided a list of observed hostnames for the DGA domain.

List #2

The second list has surfaced in a Paste bin paste, allegedly sourced from Zetalytics / Zonecruncher.

NOTE: This list is fairly ‘noisy’, as it has non-decodable domain names.

By feeding both lists to our decoder, we can now obtain a list of decoded domains, that could have been generated by the victims of the Sunburst backdoor. DISCLAIMER: It is not clear if the provided lists contain valid domain names that indeed belong to the victims. It is quite possible that the encoded domain names were produced by third-party tools, sandboxes, or by researchers that investigated and analysed the backdoor. The decoded domain names are provided purely as a reverse engineering exercise. The resulting list was manually processed to eliminate noise, and to exclude duplicate entries. Following that, we have made an attempt to map the obtained domain names to the company names, using Google search. Reader’s discretion is advised as such mappings could be inaccurate.

Decoded DomainMapping (Could Be Inaccurate)
hgvc.comHilton Grand Vacations
AmerisafAMERISAFE, Inc.
kcpl.comKansas City Power and Light Company
SFBALLETSan Francisco Ballet
scif.comState Compensation Insurance Fund
LOGOSTECLogostec Ventilação Industrial
ARYZTA.CARYZTA Food Solutions
bmrn.comBioMarin Pharmaceutical Inc.
AHCCCS.SArizona Health Care Cost Containment System
nnge.orgNext Generation Global Education
cree.comCree, Inc (semiconductor products)
calsb.orgThe State Bar of California
rbe.sk.caRegina Public Schools
cisco.comCisco Systems
pcsco.comProfessional Computer Systems
barrie.caCity of Barrie
ripta.comRhode Island Public Transit Authority
uncity.dkUN City (Building in Denmark)
bisco.intBoambee Industrial Supplies (Bisco)
haifa.eduUniversity of Haifa
smsnet.plSMSNET, Poland
fcmat.orgFiscal Crisis and Management Assistance Team
wiley.comWiley (publishing)
ciena.comCiena (networking systems)
belkin.comBelkin
spsd.sk.caSaskatoon Public Schools
pqcorp.comPQ Corporation
ftfcu.corpFirst Tech Federal Credit Union
bop.com.pkThe Bank of Punjab
nvidia.comNVidia
insead.orgINSEAD (non-profit, private university)
usd373.orgNewton Public Schools
agloan.adsAmerican AgCredit
pageaz.govCity of Page
jarvis.labErich Jarvis Lab
ch2news.tvChannel 2 (Israeli TV channel)
bgeltd.comBradford / Hammacher Remote Support Software
dsh.ca.govCalifornia Department of State Hospitals
dotcomm.orgDouglas Omaha Technology Commission
sc.pima.govArizona Superior Court in Pima County
itps.uk.netIT Professional Services, UK
moncton.locCity of Moncton
acmedctr.adAlameda Health System
csci-va.comComputer Systems Center Incorporated
keyano.localKeyano College
uis.kent.eduKent State University
alm.brand.dkSydbank Group (Banking, Denmark)
ironform.comIronform (metal fabrication)
corp.ncr.comNCR Corporation
ap.serco.comSerco Asia Pacific
int.sap.corpSAP
mmhs-fla.orgCleveland Clinic Martin Health
nswhealth.netNSW Health
mixonhill.comMixon Hill (intelligent transportation systems)
bcofsa.com.arBanco de Formosa
ci.dublin.ca.Dublin, City in California
siskiyous.eduCollege of the Siskiyous
weioffice.comWalton Family Foundation
ecobank.groupEcobank Group (Africa)
corp.sana.comSana Biotechnology
med.ds.osd.miUS Gov Information System
wz.hasbro.comHasbro (Toy company)
its.iastate.edIowa State University
amr.corp.intelIntel
cds.capilanou.Capilano University
e-idsolutions.IDSolutions (video conferencing)
helixwater.orgHelix Water District
detmir-group.rDetsky Mir (Russian children’s retailer)
int.lukoil-intLUKOIL (Oil and gas company, Russia)
ad.azarthritisArizona Arthritis and Rheumatology Associates
net.vestfor.dkVestforbrænding
allegronet.co.Allegronet (Cloud based services, Israel)
us.deloitte.coDeloitte
central.pima.gPima County Government
city.kingston.City of Kingston
staff.technionTechnion – Israel Institute of Technology
airquality.orgSacramento Metropolitan Air Quality Management District
phabahamas.orgPublic Hospitals Authority, Caribbean
parametrix.comParametrix (Engineering)
ad.checkpoint.Check Point
corp.riotinto.Rio Tinto (Mining company, Australia)
intra.rakuten.Rakuten
us.rwbaird.comRobert W. Baird & Co. (Financial services)
ville.terrebonnVille de Terrebonne
woodruff-sawyerWoodruff-Sawyer & Co., Inc.
fisherbartonincFisher Barton Group
banccentral.comBancCentral Financial Services Corp.
taylorfarms.comTaylor Fresh Foods
neophotonics.coNeoPhotonics (optoelectronic devices)
gloucesterva.neGloucester County
magnoliaisd.locMagnolia Independent School District
zippertubing.coZippertubing (Manufacturing)
milledgeville.lMilledgeville (City in Georgia)
digitalreachincDigital Reach, Inc.
deniz.denizbankDenizBank
thoughtspot.intThoughtSpot (Business intelligence)
lufkintexas.netLufkin (City in Texas)
digitalsense.coDigital Sense (Cloud Services)
wrbaustralia.adW. R. Berkley Insurance Australia
christieclinic.Christie Clinic Telehealth
signaturebank.lSignature Bank
dufferincounty.Dufferin County
mountsinai.hospMount Sinai Hospital
securview.localSecurview Victory (Video Interface technology)
weber-kunststofWeber Kunststoftechniek
parentpay.localParentPay (Cashless Payments)
europapier.inteEuropapier International AG
molsoncoors.comMolson Coors Beverage Company
fujitsugeneral.Fujitsu General
cityofsacramentoCity of Sacramento
ninewellshospitaNinewells Hospital
fortsmithlibraryFort Smith Public Library
dokkenengineerinDokken Engineering
vantagedatacenteVantage Data Centers
friendshipstatebFriendship State Bank
clinicasierravisClinica Sierra Vista
ftsillapachecasiApache Casino Hotel
voceracommunicatVocera (clinical communications)

mutualofomahabanMutual of Omaha Bank

Rony Moshkovich

Rony Moshkovich

Rony Moshkovich, Director of Product for AlgoSec, has decades of practical research and engineering experience in the IT security industry. His background includes extensive management experience with an emphasis in software research and development, making him uniquely capable of guiding business requirements, and professional services for Enterprise, SMB, and consumer solutions.

Table of contents

Table of contents item

Ready to take control of your network security?

See how AlgoSec Horizon Platform can transform your security policy management – from chaos to control!

[Placeholder - Marketo will create the error message]
[Placeholder - Marketo will create the error message]
[Placeholder - Marketo will create the error message]
[Placeholder - Marketo will create the error message]
[Placeholder - Marketo will create the error message]
[Placeholder - Marketo will create the error message]
By submitting this form, I accept AlgoSec's privacy policy
[Placeholder - Marketo will create the error message]
Thank you!
AlgoSec
LinkedInYouTube
Trending topics
AlgoSec & CiscoMicro-segmentationCloud network securityCloud security complianceHIPAA network compliance
Essential tools
Integrations
Useful info
Contact usEnd user license agreementSaaS SLAEnvironmental strategyESG strategySecurity center

© 2004 – 2026 All rights reserved by AlgoSec

Privacy policyTerms of useCookie settings