mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-04-25 23:25:54 +03:00
[GH-ISSUE #167] boot.netboot.xyz initial loader #1613
Labels
No labels
Hacktoberfest
Hacktoberfest
bootloader
bsd
bug
confirmed
documentation
duplicate
enhancement
enhancement
enhancement
eol
experimental-merged
freebsd
help wanted
invalid
investigate
ipxe
linux
live-os
memdisk
menu
no-issue-activity
no-issue-activity
pull-request
released
todo
upstream
windows
windows
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/netboot.xyz#1613
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ehuggett on GitHub (Aug 1, 2017).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/167
Hi,
I have some feedback i would like to share but first i would like to say, Great work! Thanks for sharing a very interesting/useful project.
[This is all untested speculation. I believe i have a good grasp all the relevant concepts, but i am not overly familiar with iPXE or netboot.xyz. Please accept my sincere apologies in advance if any claims/statements i make here are incorrect.]
It looks like
8a8ba58c00made https(s)://boot.netboot.xyz(/index.html) compatible with iPXE clients that do not support https (or perhaps just cannot verify the certificate for it?).While i think its great that http connections are upgraded to https if possible, I think it would be better if there was no fallback to http if the client made the initial request over https due to the following
Assuming an attacker is in a position to intercept, inspect and modify network traffic between the iPXE client and the http server:
If iPXE makes a new connection to boot.netboot.xyz to retrieve menu.ipxe (or if this file was stored on a different domain from the initial loader in the future) then allowing the first secure connection (index.html) but blocking the second (menu.ipxe) will cause the client to fallback to http, which could then be hijacked (redirected to the attackers own http server) allowing them to provide a config which will (automatically without user interaction?) execute a malicious payload.
If iPXE is able to reuse the existing secure connection to boot.netboot.xyz it might still be possible to achieve point 1 if the attacker interrupts (by dropping packets or injecting TCP resets) the secure connection AFTER index.html has been retrieved but BEFORE menu.ipxe has been. Despite it being a secure connection, the attacker can still observe the amount of data being transferred and index.html is of a known size so i think this could be plausible.
Suggestions (not in any particular order) that would address this concern
N.B. Just to put it in perspective for anyone overly concerned about the above, if the attacker is on your local network and DHCP filtering (etc) is not enabled on your switches they could simply respond to your computer's DHCP request before the legitimate DHCP server does and execute any payload they wish without netboot.xyz being involved in any way whatsoever. As useful as it can be, Think about this before blindly enabling PXE as a default boot option (certainly before making it THE default boot option).
@antonym commented on GitHub (Aug 18, 2017):
Thanks, glad you like it, sorry for the delayed response, I've been really tied up.
Originally I wanted to switch it all to HTTPS only but the problem lies in that the default compile of iPXE does not enable HTTPS support by default. You have to enable HTTPS support as an option and then compile it. This includes default installs of iPXE that a lot of distributions bundle. To someone new to iPXE, they might just assume that netboot.xyz just doesn't work and give up. Maybe that's something that's raised upstream as an option to enable by default (https://github.com/ipxe/ipxe/blob/master/src/config/general.h#L57).
The reason that I currently make an HTTPS connection and then fall back to the HTTP is that I'm currently leveraging the iPXE projects crosscert server which occasionally has some connection issues. I still would like to stand up my own crosscert server but it's just finding time to run through that setup.
I started work to identify which connection had been made on the initial connection and I still plan on adding a secure or insecure connection header at the top of the menu. That way users will know if their connection is secure or not. It's not perfect but it'll at least provide some insight.