Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. MS C# weirdness: GZip code is talking to China ?

MS C# weirdness: GZip code is talking to China ?

Scheduled Pinned Locked Moved The Lounge
csharpasp-netvisual-studiosysadminhosting
13 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B BillWoodruff

    I have my own serialize/deserialize code that i've been using for years that, optionally, uses the GZip facility MS provides in System.IO.Compression, and, System.Runtime.Serialization. A new C# WinForm project i started in VS22 to try and see what using Blazor webassembly was like, and that used Gzip to save state compiled, but, would not run ... no error message; it just exited the app with no output. Figuring there was some weirdness goin' down with Blazor/VS 22, I went and tested a previous VS2019 project that used the old library; saving using GZip showed the same puzzling behavior., The code that invokes GZip is bog-standard:

    using System.IO.Compression;
    using System.Runtime.Serialization;
    // in some method where 'dcs is a DataContractSerializer instance, 'flename is valid file name
    using (FileStream compressedFileStream = File.Create(filename))
    {
    using (var compressionStream =
    new GZipStream(compressedFileStream, CompressionLevel.Optimal, true))
    {
    dcs.WriteObject(compressionStream, typeof(T));
    compressionStream.Close();
    }
    }

    Oh .. my firewall/virus thing (EmsiSoft) was blocking the .exe ... the details surprised me:<\

    Quote:

    12/9/2021 11:44:19 AM quarantined Malware "Behavior.CryptoMalware" in "test blazor dec 4 2021.exe". Cloud Host Rule modified "Block silently" for host "42.180.243.234"

    That IP appears to be in China:

    Quote:

    P Address: 42.180.243.234 IP Location: China, Liaoning, Liaoyang IP Owner: Unicom Liaoning Province Network

    Of course i'll submit a report to EmsiSoft, but, wonder if anything in this scenario you see i might be overlooking. thanks !

    «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

    S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #3

    Please keep us updated! That's.. concerning! :O

    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

    1 Reply Last reply
    0
    • B BillWoodruff

      I have my own serialize/deserialize code that i've been using for years that, optionally, uses the GZip facility MS provides in System.IO.Compression, and, System.Runtime.Serialization. A new C# WinForm project i started in VS22 to try and see what using Blazor webassembly was like, and that used Gzip to save state compiled, but, would not run ... no error message; it just exited the app with no output. Figuring there was some weirdness goin' down with Blazor/VS 22, I went and tested a previous VS2019 project that used the old library; saving using GZip showed the same puzzling behavior., The code that invokes GZip is bog-standard:

      using System.IO.Compression;
      using System.Runtime.Serialization;
      // in some method where 'dcs is a DataContractSerializer instance, 'flename is valid file name
      using (FileStream compressedFileStream = File.Create(filename))
      {
      using (var compressionStream =
      new GZipStream(compressedFileStream, CompressionLevel.Optimal, true))
      {
      dcs.WriteObject(compressionStream, typeof(T));
      compressionStream.Close();
      }
      }

      Oh .. my firewall/virus thing (EmsiSoft) was blocking the .exe ... the details surprised me:<\

      Quote:

      12/9/2021 11:44:19 AM quarantined Malware "Behavior.CryptoMalware" in "test blazor dec 4 2021.exe". Cloud Host Rule modified "Block silently" for host "42.180.243.234"

      That IP appears to be in China:

      Quote:

      P Address: 42.180.243.234 IP Location: China, Liaoning, Liaoyang IP Owner: Unicom Liaoning Province Network

      Of course i'll submit a report to EmsiSoft, but, wonder if anything in this scenario you see i might be overlooking. thanks !

      «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #4

      I would check your PC - it seems to be infected...

      "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      1 Reply Last reply
      0
      • B BillWoodruff

        I have my own serialize/deserialize code that i've been using for years that, optionally, uses the GZip facility MS provides in System.IO.Compression, and, System.Runtime.Serialization. A new C# WinForm project i started in VS22 to try and see what using Blazor webassembly was like, and that used Gzip to save state compiled, but, would not run ... no error message; it just exited the app with no output. Figuring there was some weirdness goin' down with Blazor/VS 22, I went and tested a previous VS2019 project that used the old library; saving using GZip showed the same puzzling behavior., The code that invokes GZip is bog-standard:

        using System.IO.Compression;
        using System.Runtime.Serialization;
        // in some method where 'dcs is a DataContractSerializer instance, 'flename is valid file name
        using (FileStream compressedFileStream = File.Create(filename))
        {
        using (var compressionStream =
        new GZipStream(compressedFileStream, CompressionLevel.Optimal, true))
        {
        dcs.WriteObject(compressionStream, typeof(T));
        compressionStream.Close();
        }
        }

        Oh .. my firewall/virus thing (EmsiSoft) was blocking the .exe ... the details surprised me:<\

        Quote:

        12/9/2021 11:44:19 AM quarantined Malware "Behavior.CryptoMalware" in "test blazor dec 4 2021.exe". Cloud Host Rule modified "Block silently" for host "42.180.243.234"

        That IP appears to be in China:

        Quote:

        P Address: 42.180.243.234 IP Location: China, Liaoning, Liaoyang IP Owner: Unicom Liaoning Province Network

        Of course i'll submit a report to EmsiSoft, but, wonder if anything in this scenario you see i might be overlooking. thanks !

        «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

        B Offline
        B Offline
        BillWoodruff
        wrote on last edited by
        #5

        Update: i should have added to my original message: 1) on first detecting the odd behavior, i ran a complete scan ... all clean. 2) since i a/b tested in both VS 2019 and VSA 2022 the same apps using standard xml serialize techniques, and no unexpected behavior appeared, and the av software was not triggered ... i assumed the hypothesis that use of GZip was the trigger here was relatively strong.

        «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

        Kornfeld Eliyahu PeterK 2 Replies Last reply
        0
        • B BillWoodruff

          Update: i should have added to my original message: 1) on first detecting the odd behavior, i ran a complete scan ... all clean. 2) since i a/b tested in both VS 2019 and VSA 2022 the same apps using standard xml serialize techniques, and no unexpected behavior appeared, and the av software was not triggered ... i assumed the hypothesis that use of GZip was the trigger here was relatively strong.

          «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu Peter
          wrote on last edited by
          #6

          You may follow the code here - Source Browser[^]

          "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

          "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

          1 Reply Last reply
          0
          • B BillWoodruff

            Update: i should have added to my original message: 1) on first detecting the odd behavior, i ran a complete scan ... all clean. 2) since i a/b tested in both VS 2019 and VSA 2022 the same apps using standard xml serialize techniques, and no unexpected behavior appeared, and the av software was not triggered ... i assumed the hypothesis that use of GZip was the trigger here was relatively strong.

            «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

            Kornfeld Eliyahu PeterK Offline
            Kornfeld Eliyahu PeterK Offline
            Kornfeld Eliyahu Peter
            wrote on last edited by
            #7

            Using your code created an exe - it runs without any alert. Asked for a direct scan from my ESET Endpoint Security and nothing came up...

            "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

            "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

            B 1 Reply Last reply
            0
            • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

              Using your code created an exe - it runs without any alert. Asked for a direct scan from my ESET Endpoint Security and nothing came up...

              "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

              B Offline
              B Offline
              BillWoodruff
              wrote on last edited by
              #8

              Thanks, Kornfeld, May i ask what version IDE and app (WinForm ?, WPF ?) and FrameWork version you are using ? i suspect that's not a factor here ... just curious. fyi: Emsisoft is not blocking the .exe files of other projects in VS-19 or -22 when they are run.

              «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

              Kornfeld Eliyahu PeterK 1 Reply Last reply
              0
              • B BillWoodruff

                Thanks, Kornfeld, May i ask what version IDE and app (WinForm ?, WPF ?) and FrameWork version you are using ? i suspect that's not a factor here ... just curious. fyi: Emsisoft is not blocking the .exe files of other projects in VS-19 or -22 when they are run.

                «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                Kornfeld Eliyahu PeterK Offline
                Kornfeld Eliyahu PeterK Offline
                Kornfeld Eliyahu Peter
                wrote on last edited by
                #9

                VS 2022 NET 6.0 Console Application

                "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                1 Reply Last reply
                0
                • B BillWoodruff

                  I have my own serialize/deserialize code that i've been using for years that, optionally, uses the GZip facility MS provides in System.IO.Compression, and, System.Runtime.Serialization. A new C# WinForm project i started in VS22 to try and see what using Blazor webassembly was like, and that used Gzip to save state compiled, but, would not run ... no error message; it just exited the app with no output. Figuring there was some weirdness goin' down with Blazor/VS 22, I went and tested a previous VS2019 project that used the old library; saving using GZip showed the same puzzling behavior., The code that invokes GZip is bog-standard:

                  using System.IO.Compression;
                  using System.Runtime.Serialization;
                  // in some method where 'dcs is a DataContractSerializer instance, 'flename is valid file name
                  using (FileStream compressedFileStream = File.Create(filename))
                  {
                  using (var compressionStream =
                  new GZipStream(compressedFileStream, CompressionLevel.Optimal, true))
                  {
                  dcs.WriteObject(compressionStream, typeof(T));
                  compressionStream.Close();
                  }
                  }

                  Oh .. my firewall/virus thing (EmsiSoft) was blocking the .exe ... the details surprised me:<\

                  Quote:

                  12/9/2021 11:44:19 AM quarantined Malware "Behavior.CryptoMalware" in "test blazor dec 4 2021.exe". Cloud Host Rule modified "Block silently" for host "42.180.243.234"

                  That IP appears to be in China:

                  Quote:

                  P Address: 42.180.243.234 IP Location: China, Liaoning, Liaoyang IP Owner: Unicom Liaoning Province Network

                  Of course i'll submit a report to EmsiSoft, but, wonder if anything in this scenario you see i might be overlooking. thanks !

                  «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                  O Offline
                  O Offline
                  obermd
                  wrote on last edited by
                  #10

                  Verify your dotNet dlls haven't been infected. In fact, I'd double check the entire machine for malware, including rootkits.

                  B 1 Reply Last reply
                  0
                  • O obermd

                    Verify your dotNet dlls haven't been infected. In fact, I'd double check the entire machine for malware, including rootkits.

                    B Offline
                    B Offline
                    BillWoodruff
                    wrote on last edited by
                    #11

                    thanks, as i said in my update message above, that was the first thing i did after seeing the odd behavior. the fact that only the code calls GZip produces the error is a sign the dll is not infected, since that same dll provides the code for standard XML serialization which works without error.

                    «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                    O 1 Reply Last reply
                    0
                    • B BillWoodruff

                      thanks, as i said in my update message above, that was the first thing i did after seeing the odd behavior. the fact that only the code calls GZip produces the error is a sign the dll is not infected, since that same dll provides the code for standard XML serialization which works without error.

                      «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                      O Offline
                      O Offline
                      obermd
                      wrote on last edited by
                      #12

                      It could still be infected. Malware tends to be some of the best written software on the planet.

                      B 1 Reply Last reply
                      0
                      • O obermd

                        It could still be infected. Malware tends to be some of the best written software on the planet.

                        B Offline
                        B Offline
                        BillWoodruff
                        wrote on last edited by
                        #13

                        Have you had a direct experience with a MS dll infected with any form of malware that is triggered only when a specific facility in the dll is invoked ?

                        «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups