text
stringlengths
1
100k
Citizens for Trump and Roger Stone will host the “America First Unity Rally” in Cleveland on July 18, coinciding with the first day of the Republican National Convention. The event will also feature Trump surrogates Darrell Scott and Diamond & Silk.
Conspiracy theorist radio host Alex Jones will also speak and his website Infowars.com is sponsoring the event. The Trump ally has told his radio audience to give the Stone rally — which was previously billed as a “Stop the Steal” rally prior to Trump becoming the presumptive nominee — “their time, their energy, and their money” and said “everybody’s got to book to be there now. This is history.”
The Eternal Sentry website is produced by Paul Chambers, according to his LinkedIn profile and Facebook account. Chambers is also the “Content Creation Team Director” for Citizens for Trump.
Chambers has posted white nationalist content on Facebook. (Citizens for Trump links to his Facebook account on its staff page, and Eternal Sentry links to the public Facebook group Ending Cultural Marxism, where Chambers frequently posts racist commentary.) He’s claimed that it’s “time for the white man to protect his interest and ONLY his interests,” and whites need “to take our country back for ourselves and send them [African-Americans] back to the mud-huts they so desperately and obviously desire”:
March 27 : “ This year white students will only be 40% starting in elementary schools, next year lower, and on and on…The white race is only the first to be sacrificed, they will decimate any race, religion, or creed that stands in their way!”
: “ year white students will only be 40% starting in elementary schools, next year lower, and on and on…The white race is only the first to be sacrificed, they will decimate any race, religion, or creed that stands in their way!” April 13 : “ Ladies and gentleman, the fall of western societies will usher in the return of tribalism and barbarism. It is time for the white man to protect his interest and ONLY his interests. Whites cannot afford to continue to fund their own genocide!”
: “ and gentleman, the fall of western societies will usher in the return of tribalism and barbarism. It is time for the white man to protect his interest and ONLY his interests. Whites cannot afford to continue to fund their own genocide!” June 28, responding to actor Jesse Williams’ BET Awards speech: “Last I checked nothing is stopping them from going to their black utopias in Africa? Even after 8.4 TRILLION dollars in extortion (welfare) payments there are still hundreds of thousands of white refugees that have had to ESCAPE the violence perpetrated on them by black violence in US cities, it’s time to fight back white people, our generosity has reached its limit and NO amount of political correctness is going to protect us from their threats of black violence and terrorism in the streets! It’s time to take our country back for ourselves and send them back to the mud-huts they so desperately and obviously desire!”
Eternal Sentry states that it was created “to refute” “atheism, multiculturalism, feminism, homosexuality, transgenderism, and abortion, post-colonialism that encompasses globalism, collectivism, elitism, and environmentalism, neo-progressivism that encompasses political correctness, and identity politics. … Eternal Sentry mans the ramparts to fend off the hordes not for a single race, creed, or religion but to throw off the barbarism that was hard won during the American Revolution and now seeks to return in this fiendish new form.”
Eternal Sentry states on its Twitter account that it is an “#Altright #ANTIglobalist #Tradtionalist [sic] #Native website.” The Southern Poverty Law Center notes that “Alt-Right is a loose set of far-right ideologies at the core of which is a belief that ‘white identity’ is under attack through policies prioritizing multiculturalism, political correctness and social justice and must be preserved, usually through white-identified online communities and physical ethno-states.” The Anti-Defamation League similarly states that alt-right “encompasses a range of people on the extreme right who reject mainstream conservatism in favor of forms of conservatism that embrace implicit or explicit racism or white supremacy.”
Eternal Sentry has repeatedly posted racist white nationalist content on its website and social media accounts.
The group’s Facebook page posted an image on May 26 warning that white people are being turned “into the minority” and “‘diversity’ is just their code word for White Genocide.”
It also posted a Facebook image claiming “Multiculturalism, atheism, environmentalism, feminism, globalism, homosexual ‘marriage’, transgenderism, and abortion all have the same goal…White Genocide.”
Eternal Sentry’s YouTube account, which is linked to from its homepage, includes a playlist called “Jews.” The playlist contains a virulently anti-Semitic video headlined, “What World-famous Men have said About the Jews.” A description for the video, created by a user named “chim ham,” states that it explains “Jews have not changed since the days when Jesus Christ took up a whip and drove ‘the money changers out of the Temple,’” and “They will always ban together to drive Gentile competitors out of business.” It then accused Jewish people of being “the only racial group totally organized to work for political domination over America.” From the video description:
The Jews claim that they are “only” a religion. The truth is that the Jews are a RACE. Less than 30% are members of any Synagogue. Whether they are Orthodox religious, atheists, capitalists or communists — they still claim to be Jews — members of the Jewish race! Every race has inherited traits. In the case of the Jews they include trading, money-changing, usury, and a loathing for “productive labor” which is scorned as beneath the dignity of the Jews in their “bible” called “THE TALMUD.”
The Jews have not changed since the days when Jesus Christ took up a whip and drove “the money changers out of the Temple.” Jews have always united to form monopolies. Today they control all the department store chains and specialty shops along with the lucrative jewelry and animal fur trade. Jews dominate the fields of all precious metals such as gold, silver, platinum, tin, lead, etc. They will always ban together to drive Gentile competitors out of business.
Today America is being flooded with Jewish immigrants from Russia and even 20,000 per year leave Israel for the U. S. — all with dollar signs in their eyes. Jews have used their vaunted money-power to seize control of the Democratic Party and constitute over 50% of all its financial contributions. Today they are buying up more and more major U. S. companies. While only 3% of the population, the Jews control over 25% of the nation’s wealth and this percentage rises every year. They are the only racial group totally organized to work for political domination over America.
Opposition to the Jews did not begin in Germany but dates back before the birth of Christ over 2,000 years ago! Study the statements made by “The world’s greatest men.” They reveal why the “wandering Jews” have made enemies out of every host country that ever accepted them.
Eternal Sentry also reposted a piece by an author for the site “Angry White Dude” which attacked “RINOs oriented to Jewish group agendas. Where the gentile RINO is just a used car salesman saying and doing whatever nets him the most profit — at the expense of normal white Westerners — the neoconservative uses right-wing rhetoric while advocating whatever ‘good for the Jews’ — at the expense of normal white Westerners.”
White nationalist groups and leaders have celebrated Trump’s presidential campaign and used his candidacy to recruit followers, fundraise, and spread their message. The Trump campaign has had a series of troubling interactions with the white nationalist movement, including giving a white nationalist radio host press credentials, failing to condemn their actions, and tweeting or retweeting white nationalists and images created by racists.
The previous posts of this blog series have been about stack based buffer overflows. With this post, I want to move on to bugs that involve dynamic memory management.
Since there are not that many publicly documented arbitrary free vulnerabilities in prominent software products, I thought it would be worth sharing this one.
Introduction
The Transport Neutral Encapsulation Format (TNEF) is an e-mail attachment format developed by Microsoft. It can be used to represent complicated messages and attachments, consisting of many different files and file types, as a flattened stream. Microsoft does not provide an open-source reference implementation. Instead, they provide an official documentation , so most anti-virus vendors write their own TNEF parser.
The bug presented in this post occurs when parsing the properties of an attachment.
Getting Into the Details
Section 2.1.3.4 of the TNEF documentation describes the so-called MsgPropertyList. The following definitions are relevant for this discussion (slightly simplified).
MsgPropertyList = MsgPropertyCount *MsgPropertyValue MsgPropertyCount = UINT32 MsgPropertyValue = MsgPropertyTag MsgPropertyData MsgPropertyTag = MsgPropertyType MsgPropertyId [NamedPropSpec] //NamedPropSpec is optional, it must be present if MsgPropertyId >= 0x8000 //Definition of MsgPropertyData omitted, because irrelevant MsgPropertyType = UINT16 (simplified) MsgPropertyId = UINT16 NamedPropSpec = PropNameSpace PropIDType PropMap PropNameSpace = 16 byte GUID PropIDType = IDTypeNumber / IDTypeString IDTypeNumber = %x00.00.00.00 (little-endian 32-bit 0x0) IDTypeString = %x01.00.00.00 (little-endian 32-bit 0x1) PropMap = PropMapID / PropMapString PropMapID = UINT32 PropMapString = UINT32 *UINT16 %x00.00 [PropMapPad]
Let us look at how MsgPropertyList is parsed.
char TNEF::ReadMsgPropertyList() { MsgPropertyValue msgpropvalue; //constructor call here //some init stuff omitted if ( this ->currentoffset + 4 > this ->endoffset) { return 0; } else { uint32_t MsgPropertyCount = *(uint32_t*)(& this ->inputdata[ this ->currentoffset]); this ->currentoffset += 4; this ->MsgPropertyCount = MsgPropertyCount; for (int32_t processedMsgProperties = 0; this ->currentoffset < this ->endoffset && processedMsgProperties < this ->MsgPropertyCount; processedMsgProperties++) { int32_t readbytes = msgpropvalue.Read(& this ->inputdata[ this ->currentoffset], this ->endoffset - this ->currentoffset); if (readbytes == -1) { return 0; } irrelevant_processing(& this ->dword14, &msgpropvalue); msgpropvalue.Cleanup(); this ->currentoffset += readbytes; } return 1; } //destructor call on msgpropvalue here }
This is pretty much as expected. First, MsgPropertyCount is read from the input. Then, a loop traverses the list of MsgPropertyValue s.
Note that the same object msgpropvalue is reused for every new MsgPropertyValue that is read from the list.
Let us dig a little deeper and try to understand how a single MsgPropertyValue is parsed. In fact, it suffices to see how MsgPropertyTag is parsed, so we will focus only on this part.
int32_t MsgPropertyValue::Read( char *inputdata, int32_t remainingbytes) { //omitted some init stuff if (remainingbytes < 4) { return -1; } this ->msgpropertytype = *(int16_t *)(inputdata); this ->msgpropertyid = *(int16_t *)(inputdata+2); int32_t readbytes = 4; if ( this ->namedpropspec_present() == 1) { if (remainingbytes < 20) { return -1; } memcpy(& this ->guid[0], inputdata+4, 16); this ->currentguid = & this ->guid[0]; if (remainingbytes < 24) { return -1; } uint32_t propidtype = *(uint32_t *)(inputdata + 20); this ->propidtype = propidtype; if (propidtype != IDTypeNumber) { // IDTypeNumber==0 if (propidtype != IDTypeString || remainingbytes < 28) { return -1; } // IDTypeString==1 size_t propmapstring_size = *(size_t*)(inputdata + 24); this ->propmapstring_size = propmapstring_size; if ((int32_t)(propmapstring_size + 28) > remainingbytes) { return -1; } char *propmapstringbuffer = ( char *) malloc(propmapstring_size); this ->PropMap = propmapstringbuffer; //PropMap holds the pointer to the string buffer if (!propmapstringbuffer) { return -1; } memmove(propmapstringbuffer, inputdata + 28, propmapstring_size); readbytes = this ->propmapstring_size + 28; if ( this ->propmapstring_size % 4) { readbytes += 4 - this ->propmapstring_size % 4; } } else { if (remainingbytes < 28) { return -1; } this ->PropMap = *(uint32_t*)(inputdata + 24); //PropMap holds the uint32_t PropMapID readbytes = 28; } } //rest omitted return readbytes; }
For the most part, this seems to be pretty straightforward, too. Note, however, that the field PropMap does not seem to enjoy real type safety. In particular, the field is used to store a pointer to a dynamically allocated buffer in the first branch ( PropMap is an IDTypeString) and a 4-byte integer in the second branch ( PropMap is an IDTypeNumber).
Recall that the object msgpropvalue from TNEF::ReadMsgPropertyList (see above) is reused for every new MsgPropertyValue that occurs in the list. As there are dynamic memory allocations in MsgPropertyValue::Read , it is necessary to free the allocated memory after every iteration in order to avoid memory leaks. Therefore, MsgPropertyValue::Cleanup is called at the end of every loop iteration. Additionally, and this turns out to be crucial, the function is called in the destructor of MsgPropertyValue .
void MsgPropertyValue::Cleanup() { //other object cleanup omitted if ( this ->currentguid && this ->propidtype == IDTypeString && this ->PropMap) { free( this ->PropMap); this ->PropMap = 0; } }
So far, so good. Now, we exploit the missing type safety of the field PropMap to call free(x) for an attacker chosen x . The control flow is as follows.
An MsgPropertyList is read via TNEF::ReadMsgPropertyListField . The first call to msgpropvalue.Read() sets propidtype to IDTypeNumber, and PropMap to an arbitrary value x via a NamedPropSpec with PropMap of type IDTypeNumber. The next call to msgpropvalue.Read() sets propidtype to IDTypeString and returns -1 because remainingbytes is too small. Now TNEF::ReadMsgPropertyList reads the error and returns, too. This calls the destructor on msgpropvalue , which in turn calls msgpropvalue.Cleanup() . The fields currentguid and PropMap both hold a non-zero value. Moreover, propidtype is still IDTypeString. free(x)
Triggering the Bug
The outlined control flow describes a class of MsgPropertyList s that will trigger the bug. We embed such an MsgPropertyList into a TNEF stream and feed the engine with it, setting a breakpoint just before the call to free in the function MsgPropertyValue::Cleanup .
0:000> bu fm4av+0x2F157 0:000> g Breakpoint 0 hit eax=deadbeef ebx=0057dbe8 ecx=002ae6e0 edx=00000000 esi=0057dbe8 edi=002ae6e0 eip=6ef9f157 esp=002ae694 ebp=002ae6c4 iopl=0 nv up ei ng nz na po nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000282 0:000> u fm4av!fmOpenFileW+0x161f7: 6ef9f157 50 push eax 6ef9f158 e8ec520000 call free (6efa4449) 6ef9f15d 83c404 add esp,4 6ef9f160 c7470c00000000 mov dword ptr [edi+0Ch],0 6ef9f167 5f pop edi 6ef9f168 5e pop esi 6ef9f169 5b pop ebx 6ef9f16a c3 ret
Note that the value of eax is completely controllable by the attacker, since it is read directly form the input file.
Attacker Control and Exploitation
The attacker can free a completely arbitrary pointer without any restriction. Moreover, the engine runs unsandboxed and as NT Authority\SYSTEM .
Hence, this bug is most likely exploitable for remote code execution as NT Authority\SYSTEM , the only obstacle being ASLR.
Conclusion
We have seen an arbitrary free vulnerability that was the result from missing type safety on PropMap . Relying on a variable t to always reflect the correct type of another variable v is obviously dangerous, especially if the type of v changes frequently. In particular, there is the danger of v and t getting out of sync, which is exactly what happened here.
Do you have any comments, feedback, doubts, or complaints? I would love to hear them. You can find my e-mail address on the about page.
Timeline of Disclosure
2016-11-11 - Discovery
2016-11-11 - Report
2016-11-14 - “raised up to our development team” and “we will get back to you with a progress update”
2016-11-28 - “as for the use-after-free vulnerability, our development team managed to identify the source of the issue and is currently working on a fix to be implemented”
2016-12-09 - “fixes for the issues with [TNEF] you reported have been tested and ready to be deployed. […] However, the development has requested that the database be released when the fixes for the [other] issue has been included as well.”
2016-12-15 - “the development team has decided to release the fixes for [the TNEF] issues you reported to us while still working on a fix for the issues with […]. […] The new database has been released yesterday”
2017-02-28 - Bug bounty paid
Thanks & Acknowledgements
I want to thank the F-Secure team for fixing the bug. In addition, I want to thank Calvin Gan for providing me with regular status updates.
Bonus
The TNEF parser calls the function uint32_t read_input(uint8_t *inputdata) several times to read from the input data buffer. The function looks as follows.
read_input proc near //inputdata= dword ptr 8 push ebp mov ebp, esp mov ecx, [ebp+inputdata] push ebx mov al, [ecx] mov dl, [ecx+1] mov byte ptr [ebp+inputdata+3], al mov al, [ecx+2] mov cl, [ecx+3] movzx ebx, al push esi push edi movzx esi, cl mov edi, ebx shl edi, 8 or edi, esi and edi, 0FF00h mov eax, esi mov ecx, ebx shr ecx, 8 shl eax, 10h or edi, eax movzx eax, byte ptr [ebp+inputdata+3] movzx edx, dl or edi, edx and ecx, 0FF00h and esi, 0FF0000h or ecx, esi and edx, 0FF00h shl edi, 8 or ecx, edx shr ecx, 8 or edi, ecx and ebx, 0FF00h or edi, ebx or eax, edi pop edi pop esi pop ebx pop ebp retn
I leave it as an exercise for the interested reader to figure out what this function does. I am also happy to discuss any comments or ideas on the function (my e-mail address can be found here).
Tribal warriors who faced an opposing Roman army in battle almost 2,000 years ago were stricken down by a hail of bullets as powerful as those in a modern handgun.
That is the finding of research which analysed slingshot ammunition found at an archaeological site last summer.
The stones, which h urtled along at up to 100mph (160km/h), could take the top of your head off with nearly as much force as a .44 Magnum.
Scroll down for video
German researcher and slingshot enthusiast Jörg Sprave has analysed the kinetic energy of ancient slingshot bullets found in Scotland (pictured) to make the startling discovery about their stopping power
ANCIENT BULLETS In the second century AD, the Romans used slings to launch the bullets, which were drilled to produce a buzzing sound compared to an agitated wasp. Archaeologists believe they were an early form of psychological warfare employed by the Romans. And they would have proved a deadly weapon against the Scottish clansmen who faced them with swords and other simple armaments. A collection of over 400 of the bullets were discovered by the Trimontium Trust, a Scottish archaeological society, at Burnswark Hill located just west of Dumfries, last June. And German researcher and slingshot enthusiast Jörg Sprave has since analysed their kinetic energy to make the startling discovery that they would have had the same stopping power as a modern .44 Magnum handgun.
In the second century AD, the Romans used slings to launch the bullets, which were drilled to produce a buzzing sound compared to an agitated wasp.
Archaeologists originally thought the holes were to hold poison, but discovered they were an early form of psychological warfare employed by the Romans, creating a sound designed to intimidate their enemies.
And they would have proved a deadly weapon against the Scottish clansmen who faced them with swords and other simple armaments.
A collection of over 400 of the bullets was discovered by the Trimontium Trust, a Scottish archaeological society, at Burnswark Hill located just west of Dumfries, last June.
And German researcher and slingshot enthusiast Jörg Sprave has since analysed their kinetic energy to make the startling discovery.
He believes they would have had the same stopping power as a modern .44 Magnum handgun, which fires bullets at speeds of around 1,475 feet per second (450 metres per second) and imparts 1,160 foot-pound force (1,570 joules) of energy.
Speaking to National Geographic John Reid, chairman of the Trust, said: 'We’re fairly sure that the natives on top of the hill weren’t allowed to survive.
'This is beginning to look like Rome’s Afghanistan.'
The hill where the whistling bullets were discovered was the site of an assault by Roman legions against native tribes people.
Weighing about one ounce (30 grams), each of the bullets had been drilled with a 0.2-inch (five millimetre) hole.
A collection of over 400 of the bullets (pictured) were discovered by the Trimontium Trust, a Scottish archaeological society, at Burnswark Hill located just west of Dumfries, last June
A German researcher believes the bullets would have had the same stopping power as a Magnum 44 handgun (pictured), which fires bullets at speeds of 1,475 feet per second (450 metres per second) and imparts 1,160 foot-pound force (1,570 joules) of energy (stock image)
Dr Reid believes the holes converted the bullets into a 'terror weapon.'
Speaking at the time of the discovery, he told LiveScience: 'You don't just have these silent but deadly bullets flying over; you've got a sound effect coming off them that would keep the defenders' heads down.
'Every army likes an edge over its opponents, so this was an ingenious edge on the permutation of sling bullets.'
The noise was a kind of buzzing which sounds like an 'agitated wasp' according to Dr Reid.
The idea of terrorising enemies using weapons that make a horrific noise was more recently adopted by the Nazis in World War II.
Weighing about 1 ounce (30 grams), each of the bullets had been drilled with a 0.2-inch (5 millimeters) hole, which created a noise as the bullets travelled through the air
This left image shows a replica Roman Scorpio crossbow, one type of small artillery weapon used by Roman forces. Among the finds was ammunition from Roman artillery weapons, such as this stone ball (right) which may have been fired from a ballista
The bullets were found on Burnswark Hill is located west of Dumfries in Scotland, shown on map. It was possibly the site of a siege during the early conquest of Scotland
HOW DID THE SLING BULLETS WHISTLE? Together with arrows and catapults, sling-shots formed a key part of the long-range fire of the Roman army. Lead bullets were cast in the shape of lemons or 'acorns', which would weigh around 1.7 ounces (50g). Weighing around 0.7 ounces (20g), the holes were around a fifth of an inch (5mm) wide and the same deep. While the size of these bullets would have made them not terribly dangerous, experiments using replicas of these small bullets showed that they produced a whistling noise while in flight. It is thought the sound is produced by the air moving over the small opening, much like when blowing over the top of a milk bottle. This has led some theories that these smaller bullets were used to invoke terror in the enemy. It is a tactic that has been used by military forces around the world. Mongolian archers were said to have used whistling arrows before they were later adopted by the Chinese and later the Japanese Samurai. The Nazis used whistling weapons to great effect during the Second World War, fitting Stuka bombers with sirens to strike fear into the enemy as they dive bombed. The V1 Flying bomb also produced a distinct buzzing noise that could be heard from miles away. When the noise stopped, it signalled the weapon was dropping to the ground.
The Junkers Ju 87 or Stuka was a German dive bomber and ground-attack aircraft which first flew in 1935 and had unmistakable wailing sirens.
According to Dr Reid, the bullets could be fired in groups of three or four, creating a slingshot effect.
About 20 per cent of the lead sling bullets found at Burnswark Hill had been drilled with holes.
This was a significant amount of effort to prepare enough ammunition for an assault, Dr Reid said. 'It's a tremendous amount of work to do, to just chuck them away.'
'Even more intriguingly, the mysterious holes proved to confer an aerophonic quality,' Dr Reid said in Current Archaeology.
'In flight, these lead shot whistled, or more accurately gave off a mechanical buzzing sound eerily reminiscent of an agitated wasp.'
Rising nearly 1,000 feet from the rolling countryside around it, Burnswark Hill in Dumfriesshire were an imposing defensive position. The fort and the camps date from around the time when the Roman emperor Antonius Pius ordered the reconquest of Scotland during the 140s AD
Burnswark Hill (pictured) in the Dumfreisshire region of south-western Scotland is thought to have been the site of an assault by Roman legions in the second Century AD against native tribespeople defending the hilltop fort
The Trimontium Trust is directing a year-long archaeological investigation of Burnswark Hill. At the time of the Roman attack on Burnswark Hill, slings were used mainly by specialized units of auxiliary troops who had been recruited to fight alongside the Roman legions
At the time of the Roman attack on Burnswark Hill, slings were used mainly by specialised units of auxiliary troops who had been recruited to fight alongside the Roman legions, according to Dr Reid.
The most feared slingers came from the Balearic Islands.