Jump to content











Photo
- - - - -

Visual Studio compiled binaries are phoning home by default


  • Please log in to reply
3 replies to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 11 June 2016 - 05:08 PM

Just for your info:
 

Recently Reddit user "sammiesdog" posted claims that Visual Studio's C++ compiler was automatically adding function calls to Microsoft's telemetry services.  The screenshot accompanying their post showed how a simple 5 line CPP file produced an assembly language file that included a function call titled  “telemetry_main_invoke_trigger”.

The ensuing discussion then revolved around how to disable this unannounced “feature” while also speculating its purpose.  “sammiesdog” noted that this appears in release builds, while user “ssylvan” also indicated that it appeared in debug builds too.  The telemetry function is intended to communicate with ETW.

 

 

https://www.infoq.co...l-cpp-telemetry

 

Interesting stuff. This was only caught because they named the function "telemetry". Can only wonder what would happened if they had used a boring name such as "pinvoke_stable". :)

 

:cheers:



#2 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 11 June 2016 - 05:59 PM

hehe.. not without reasons open MS the Visual Studio Code

and make it open source..

 

https://www.reactos....php?f=6&t=14572

 

for the german under us :

http://winfuture.de/news,92680.html

 

 


'Spyware': Visual Studio C++ Compiler baut unerwünscht Telemetrie-Code ein
Bildquelle: Microsoft
Microsoft hat angekündigt, eine bisher undokumentierte "Funktion" aus Visual Studio 2015 zu entfernen, die ohne Wissen und das Zutun der Nutzer des darin enthaltenen Compilers für C++ Telemetrie-Code in jedes damit kompiliertes Projekt einfügt. Manche Beobachter sprechen von "Spyware" von Microsoft beziehungsweise von "Malware-änlichem Verhalten". Wie Slashdot und InfoQ berichten, war einem Reddit-Nutzer vor kurzem aufgefallen, dass der Visual Studio 2015 C++ Compiler Calls zu einer Telemetrie-Funktion von Microsoft in die mit ihm erstellten Binaries einfügte. Er hatte zuvor ein simples Programm erstellt und dann bemerkt, dass die fertig kompilierte Binary zusätzlichen Code enthielt, der versuchte, die Funktionen "telemetry_main_invoke_trigger" und "telemetry_main_return_trigger" anzusprechen.

Eine offizielle Dokumentation dieser Calls gebe es bisher nicht, was inzwischen auch von Microsoft bestätigt wurde. So erklärte Steve Carroll, der die Entwicklung von Visual C++ leitet, dass das "Feature" definitiv existiert und man sie mit dem zu einem noch nicht bekannten Zeitpunkt erscheinenden Visual Studio 2015 Update 3 entfernen will.

Carroll zufolge löst der von Microsofts Compiler bisher ohne Wissen der Entwickler in ihre Projekte eingebundene Code einen ETW-Event (Event Tracing for Windows) aus, der gegebenenfalls Zeitstempel und Informationen über geladene Module aufzeichnet. Die Ereignisdaten können nur dann verarbeitet werden, wenn ein Nutzer Microsoft entsprechende Symbolinformationen liefert. Das Ganze soll also vor allem dann genutzt werden, wenn ein Nutzer des Compilers mit Microsofts Unterstützung auf Fehlersuche bei der Arbeit an einem Projekt gehen will.

Bisher sei dieser Prozess aber noch nie von Microsoft selbst und seinen Kunden wirklich durchgeführt worden, da man sich bis heute auf andere, länger erprobte Methoden zur Fehlersuche stützt. Carroll stellte deshalb in Aussicht, dass man die Funktion wieder entfernen will. Sie ist zwar auch in den aktuellen Vorabversionen von Visual Studio "15" enthalten, soll aber auch bei ihnen mit den nächsten Preview-Releases wieder verschwinden. Bei Visual Studio 2012 und 2013 gibt es dieses "Feature" ohnehin nicht. Wer derzeit mit Visual Studio 2015 Update 2 arbeitet, kann die Telemetriefunktion auf Wunsch umgehen, wie Steve Carroll auf Reddit erläuterte.

Für viele Mitglieder der Entwicklergemeinde ist der Umstand, dass Microsoft eine undokumentierte Telemetriefunktion in seinen Compiler integriert hat, der ungefragt in den Code ihrer Projekte eingreift und diesen ergänzt, ein Stoß vor den Kopf. So sehen sie unter anderem schwerwiegende Sicherheitsbedenken und sehen das Vertrauen in den US-Softwarekonzern beschädigt. Microsoft, Visual Studio, Entwicklungsumgebung, Visual Studio 2012 Microsoft


Quelle: 'Spyware': Visual Studio C++ Compiler baut unerwünscht Telemetrie



#3 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 12 June 2016 - 12:38 PM

I think it is important to point out that "phone home" here actually means to generate a trace event on the machine where the application is running. Nothing else.

 

To export a function by name from an exe file is not very useful under most circumstances. It does not say anything about whether the function is called by the exe itself since exe files themselves do not need names exported for internal calls in that way. The function can practically speaking only be called by the exe itself (which would not need the function exported by name to do so) or by dll files loaded into the same process as the exe and that look up the name of the function in the exe that created the process they are running in.

 

So, the concept of exporting by name from an exe is not very common. But it has been used together with some debugger dll files loaded into the process. The debugger dll can then call the exported function to get some information about the exe that the compiler or linker built into the exe file. Not all debuggers use this concept, but Borland C++ compilers did this a lot. To call the function requires that this debugger dll gets loaded into the process because only dll files loaded into a process can successfully use a function exported by the exe itself.

 

There have also been a few similar solutions for Accessibility features where helper programs to aid visibility or to give audible feedback for GUIs get loaded into processes as a helper dll which then can call a function by name in the exe to get some information it needs about the GUI.

 

One of the practical problems in my opinion with reactions like this is that when features like this have been built into applications automatically before in various cases, it has been all internal functions called automatically by the runtime code built into the exe itself. Nobody have noticed, because that does not require any functions to exported by name, it was all internal calls inside the exe files. Now that this code was not supposed to be called automatically by the exe code itself or the runtime code built into it, but by some debugger/trace dll used when investigating problems, things look worse because they needed a trigger function exported by name by the exe file.


  • Brito likes this

#4 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 14 June 2016 - 02:43 PM

And if you need to call a function, lesson learned not to include "telemetry" and "invoke" on the same line when having suffered so much bad reputation from the unwanted "telemetry".

 

:cheers:


  • Olof Lagerkvist likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users