SlideShare ist ein Scribd-Unternehmen logo
1 von 14
EXPLOITING MS15-034 IN
POWERSHELL
KIERAN JACOBSEN
TECHNICAL LEAD - READIFY
@KJACOBSEN – POSHSECURITY.COM
‘REMOTE CODE EXECUTION’ -
IN HTTP.SYS
IF THE BAD GUY CAN EXECUTE
CODE ON YOUR BOX, IT ISN’T
YOUR BOX ANYMORE.
HTTP.SYS IS EVERYWHERE
IIS KERNEL CACHING MODULE
ARE WE VULNERABLE?
REQUEST -> RESPONSE
GET / HTTP/1.1
HOST: GOOGLE.COM
RANGE: BYTES=0-18446744073709551615
CONNECTION: CLOSE
GET / HTTP/1.1`R`N
HOST: GOOGLE.COM`R`N
RANGE: BYTES=0-18446744073709551615`R`N
CONNECTION: CLOSE `R`N
`R`N
STREAMS
WORKING WITH TCP
MS15034.PSM1
MORE INFORMATION
• MY WEBSITE – HTTP://POSHSECURITY.COM
• TWITTER - @KJACOBSEN
• MS15-034 MODULE – HTTP://GITHUB.COM/POSHSECURITY/MS15034
• MICROSOFT SECURITY BULLETIN - HTTPS://TECHNET.MICROSOFT.COM/EN-
US/LIBRARY/SECURITY/MS15-034.ASPX

Weitere ähnliche Inhalte

Andere mochten auch

Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure EnvironmentMichael Collier
 
Enabling Enterprise Mobility
Enabling Enterprise MobilityEnabling Enterprise Mobility
Enabling Enterprise Mobilitykieranjacobsen
 
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data Centre
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data CentreGlobal Azure Bootcamp 2016 - Azure Automation Invades Your Data Centre
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data Centrekieranjacobsen
 
DirectAccess, do’s and don’ts
DirectAccess, do’s and don’tsDirectAccess, do’s and don’ts
DirectAccess, do’s and don’tskieranjacobsen
 
Infrastructure Saturday 2011 - Understanding PKI and Certificate Services
Infrastructure Saturday 2011 - Understanding PKI and Certificate ServicesInfrastructure Saturday 2011 - Understanding PKI and Certificate Services
Infrastructure Saturday 2011 - Understanding PKI and Certificate Serviceskieranjacobsen
 
Dev Breakfast: Level up to DevSecOps
Dev Breakfast: Level up to DevSecOpsDev Breakfast: Level up to DevSecOps
Dev Breakfast: Level up to DevSecOpskieranjacobsen
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automationkieranjacobsen
 
Evolving your automation with hybrid workers
Evolving your automation with hybrid workersEvolving your automation with hybrid workers
Evolving your automation with hybrid workerskieranjacobsen
 
DevSecOps - CrikeyCon 2017
DevSecOps - CrikeyCon 2017DevSecOps - CrikeyCon 2017
DevSecOps - CrikeyCon 2017kieranjacobsen
 
Infrastructure Saturday - Level Up to DevSecOps
Infrastructure Saturday - Level Up to DevSecOpsInfrastructure Saturday - Level Up to DevSecOps
Infrastructure Saturday - Level Up to DevSecOpskieranjacobsen
 
DevSecOps in 10 minutes
DevSecOps in 10 minutesDevSecOps in 10 minutes
DevSecOps in 10 minuteskieranjacobsen
 

Andere mochten auch (11)

Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure Environment
 
Enabling Enterprise Mobility
Enabling Enterprise MobilityEnabling Enterprise Mobility
Enabling Enterprise Mobility
 
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data Centre
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data CentreGlobal Azure Bootcamp 2016 - Azure Automation Invades Your Data Centre
Global Azure Bootcamp 2016 - Azure Automation Invades Your Data Centre
 
DirectAccess, do’s and don’ts
DirectAccess, do’s and don’tsDirectAccess, do’s and don’ts
DirectAccess, do’s and don’ts
 
Infrastructure Saturday 2011 - Understanding PKI and Certificate Services
Infrastructure Saturday 2011 - Understanding PKI and Certificate ServicesInfrastructure Saturday 2011 - Understanding PKI and Certificate Services
Infrastructure Saturday 2011 - Understanding PKI and Certificate Services
 
Dev Breakfast: Level up to DevSecOps
Dev Breakfast: Level up to DevSecOpsDev Breakfast: Level up to DevSecOps
Dev Breakfast: Level up to DevSecOps
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automation
 
Evolving your automation with hybrid workers
Evolving your automation with hybrid workersEvolving your automation with hybrid workers
Evolving your automation with hybrid workers
 
DevSecOps - CrikeyCon 2017
DevSecOps - CrikeyCon 2017DevSecOps - CrikeyCon 2017
DevSecOps - CrikeyCon 2017
 
Infrastructure Saturday - Level Up to DevSecOps
Infrastructure Saturday - Level Up to DevSecOpsInfrastructure Saturday - Level Up to DevSecOps
Infrastructure Saturday - Level Up to DevSecOps
 
DevSecOps in 10 minutes
DevSecOps in 10 minutesDevSecOps in 10 minutes
DevSecOps in 10 minutes
 

Mehr von kieranjacobsen

The Boring Security Talk - Azure Global Bootcamp Melbourne 2019
The Boring Security Talk - Azure Global Bootcamp Melbourne 2019The Boring Security Talk - Azure Global Bootcamp Melbourne 2019
The Boring Security Talk - Azure Global Bootcamp Melbourne 2019kieranjacobsen
 
CrikeyCon VI - The Boring Security Talk
CrikeyCon VI - The Boring Security TalkCrikeyCon VI - The Boring Security Talk
CrikeyCon VI - The Boring Security Talkkieranjacobsen
 
The Boring Security Talk
The Boring Security TalkThe Boring Security Talk
The Boring Security Talkkieranjacobsen
 
The Boring Security Talk
The Boring Security TalkThe Boring Security Talk
The Boring Security Talkkieranjacobsen
 
Secure Azure Deployment Patterns
Secure Azure Deployment PatternsSecure Azure Deployment Patterns
Secure Azure Deployment Patternskieranjacobsen
 
Ransomware 0, Admins 1
Ransomware 0, Admins 1Ransomware 0, Admins 1
Ransomware 0, Admins 1kieranjacobsen
 
DecSecOps in 10 minutes
DecSecOps in 10 minutesDecSecOps in 10 minutes
DecSecOps in 10 minuteskieranjacobsen
 

Mehr von kieranjacobsen (8)

The Boring Security Talk - Azure Global Bootcamp Melbourne 2019
The Boring Security Talk - Azure Global Bootcamp Melbourne 2019The Boring Security Talk - Azure Global Bootcamp Melbourne 2019
The Boring Security Talk - Azure Global Bootcamp Melbourne 2019
 
CrikeyCon VI - The Boring Security Talk
CrikeyCon VI - The Boring Security TalkCrikeyCon VI - The Boring Security Talk
CrikeyCon VI - The Boring Security Talk
 
The Boring Security Talk
The Boring Security TalkThe Boring Security Talk
The Boring Security Talk
 
The Boring Security Talk
The Boring Security TalkThe Boring Security Talk
The Boring Security Talk
 
Secure Azure Deployment Patterns
Secure Azure Deployment PatternsSecure Azure Deployment Patterns
Secure Azure Deployment Patterns
 
Ransomware 0, Admins 1
Ransomware 0, Admins 1Ransomware 0, Admins 1
Ransomware 0, Admins 1
 
Ransomware 0 admins 1
Ransomware 0 admins 1Ransomware 0 admins 1
Ransomware 0 admins 1
 
DecSecOps in 10 minutes
DecSecOps in 10 minutesDecSecOps in 10 minutes
DecSecOps in 10 minutes
 

Kürzlich hochgeladen

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 

Kürzlich hochgeladen (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 

Exploiting MS15-034 In PowerShell

Hinweis der Redaktion

  1. Hi everyone, my name is Kieran Jacobsen, I am a Technical Lead at Readify. Tonight I am hear to talk about working with TCP connections and how we can use this to exploit the vulnerability described in MS15034.
  2. So who here knows about MS15034, can I just see some hands? So the bulletin has this for its brief description: “A remote code execution vulnerability exists in the HTTP protocol stack (HTTP.sys) that is caused when HTTP.sys improperly parses specially crafted HTTP requests. An attacker who successfully exploited this vulnerability could execute arbitrary code in the context of the System account.” Wow, that doesn’t sound too good. Remote code executing as the system account, that doesn’t sound good, or is it?
  3. A remote code execution vulnerability, or RCE, allows a successful attacker to execute the code of their choosing on your system. Now as the old security adage says, if the bad guy can execute code on your box, it isn’t your box anymore. Now when we discuss RCEs, there is one important factor that we should consider. Authentication. 15034 is an unauthenticated RCE, and this means that an attacker does not require any previous valid credentials to be able to perform a successful attack. These sorts of vulnerabilities are quite prevalent, and are always a serious risk to our systems.
  4. One thing that came out about this vulnerability, is that a significant portion of the community, both infrastructure and security community, don’t quite understand what HTTP.SYS is, and what it does. HTTP.SYS is a server protocol stack, and was first introduced by Microsoft back in Windows Server 2003. It was Microsoft’s response to the scrutiny that had occurred over its security practices in light of events like the Code Red worm. It was also Microsoft’s aim for this protocol stack to allow for faster, lightweight and more securely deployed web server environments. The first place HTTP.SYS appeared was obviously, IIS, however it can now be found in a wide range of places. Direct Access, the SSTP VPN, the Web Application proxy and later versions of ADFS and SSRS. Mostly importantly however, Windows Remoting is based upon HTTP.SYS. At this point, you should be getting just a little bit worried. I am describing an unauthenticated remote code execution vulnerability across a wide range of systems deployed in your environment, some of which are public facing. Also, consider how many systems have WinRM publicly exposed, and you wouldn’t be blamed for thinking the whole situation is just a little bit terrifying.
  5. Thankfully, this vulnerability isn’t quite a simple as it first looks. This vulnerability requires the presence of the IIS Kernel Caching module and that is typically only found in IIS installations. Most importantly, WinRM doesn’t use this module. At this moment, you can start to relax a little. Now the security community has always be quick to reverse engineer patches like this, and in this case, they were exceptionally fast. It was quickly discovered that the issue was in the way HTTP.SYS parses the RANGE HTTP header in a HTTP request. If the range specified was suitably large, this could result in a buffer overflow. Just as a matter of knowledge, the range header allows a client to request only part of a file or entity. Say we just wanted the first 100 bytes of that jpg image, well, we could use the range header to specify that. Now it turns out, RCE from just this header alone, isn’t easy.
  6. This, thankfully is the worst thing that an attacker can do to a vulnerable system. Whilst there was some claims that there were ways of using this vulnerability to actually execute code, most of the time, the result is an instant bluescreen of death like this one. A denial of service vulnerability like this one is definitely nowhere near as bad as remote code execution, but no matter what, if someone is doing this to your servers, you are going to have a bad day. Any attack, which can be performed easily, anonymously and requires little to no technical knowledge or ability that results in a denial of service, is pretty serious.
  7. So whenever you read about a vulnerability, or your CISO, CIO or CTO read about one, the first thing you will be asked, or want to know, is are we vulnerable? Now there were websites that you could use to check if a server was vulnerable, but that isn’t something we would all be comfortable with. There were perl and python scripts as well, and for those who know metasploit, there was a module for that. But I wanted to use Powershell. Let’s take a quick look at using PowerShell to test for the vulnerability.
  8. There are two things that make working with TCP connections in PowerShell wonderfully simple. The first is the fact that HTTP is a text based protocol. Meaning that we will send some strings as a request, and the server responds back in kind. The other thing that makes the whole thing easy is the .Net framework. The .Net framework will take care of almost everything at the TCP layer, leaving us with just the HTTP protocol to worry about. All we need to do is make an appropriate HTTP request, and the server should respond with what we want. So what does that request look like?
  9. So this is an average HTTP request, however it has been modified to exploit the MS15034 vulnerability. The request starts with our METHOD, in this case, we want to get the document root as you can see. We are also specifying that we will be using the HTTP 1.1 protocol. Then we have the HOST header, this is mandatory in HTTP 1.1 and lets a server know which website we actually want to browse. Next up is the pesky RANGE header. Notice that massive value? That is a widely accepted value for testing if a server is actually vulnerable. Changing the start of the range to 18 triggers the bluescreen. Finally, I am specifying the optional header CONNECTION and specifying CLOSE. Normally a server will keep the TCP connection with the client open after serving a request, however in this case, I am happy for the connection to be closed, and have said so via this header value. Each header element needs to be separated by a carriage return and a new line, and we need to finish the request with empty line as well.
  10. So just to highlight, if we specify those carriage returns and new lines, we get something like this. I just wanted to point out that the escape character for PowerShell is the backtick, and not the forward slash. If you are working of example online, maybe those written in c#, they will probably use forward slash r forward slash n, if you don’t change this when moving to PowerShell, you might end up sending a garbage request to the server. Also note that there is an empty or blank line at the end. This is to indicate to the server that our request is complete.
  11. The next thing we need to understand is how to send and receive information over our TCP connection. When we connect using the TCP client, it provides us with something called the TCPStream. We send our requests, and recieve the responses over this stream. We can either write and read directly to the stream, however we will need to encode our strings to either ASCII or UTF byte arrays; or we could use the StreamWriter and StreamReader objects from .Net. The choice is yours with this one, I have used both methods and they are equally reliable. Today I will show you the use of StreamWriter and StreamReader, overall I found these to be a bit easier and the code produced seems to be easier to understand. There is one other stream that can be used, the SSLStream. The SSLStream makes the process of connecting to SSL services much, much easier. Implementing SSL requires a change to one line of code, and an additional line to verify the server’s certificates. Piece of cake! I really did expect this to be much harder, and was utterly astounded at how easy Microsoft has made it.
  12. So lets take a look <code demos>
  13. So as part of my work on the MS15034, I developed a PowerShell module that allows us to firstly test if a server is vulnerable, and secondly invoke the denial of service. I have made this code publicly available, and have been surprised at its popularity. Let’s take a look at the module in action.
  14. That is all for me tonight, if you want more information, my website is PoshSecurity.com. I write mostly about security, PowerShell and automation. I will put up the slides and demos from tonight’s presentation on there in the coming days. You can contact me on my site, or I can be found via Twitter, @kjacobsen. The module I developed for MS15-034 can be found on GitHub, and I have also put up a link to the original Microsoft KB. Thank you all for listening to me tonight. Does anyone have any questions?