forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more x11 progress, now working on screenshots, WIP
- Loading branch information
Showing
14 changed files
with
541 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,4 @@ def versions? | |
wanted_major.nonzero? || wanted_minor.nonzero? | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# -*- coding: binary -*- | ||
|
||
# | ||
# This mixin is a simplistic implementation of X11 extensions protocol | ||
# | ||
# Wireshark dissector: https://wiki.wireshark.org/X11 | ||
# | ||
|
||
module Msf::Exploit::Remote::X11::Window | ||
class GETREQUEST < BinData::Record | ||
endian :little | ||
uint8 :opcode # 3 = GetWindowAttributes, 14 = GetGeometry | ||
uint8 :unused # XXX seems to be increasing counter... | ||
uint16 :request_length, value: -> { num_bytes / 4 } | ||
uint32 :window | ||
end | ||
|
||
class GETWINDOWATTRIBUTESRESPONSE < BinData::Record | ||
endian :little | ||
|
||
uint8 :depth | ||
uint16 :visual_id | ||
uint8 :class_name | ||
uint8 :bit_gravity | ||
uint8 :win_gravity | ||
uint32 :backing_planes | ||
uint32 :backing_pixel | ||
uint8 :save_under | ||
uint8 :map_is_installed | ||
uint8 :map_state | ||
uint8 :override_redirect | ||
uint32 :colormap | ||
uint32 :all_event_masks | ||
uint32 :your_event_mask | ||
uint16 :do_not_propagate_mask | ||
end | ||
|
||
class GetGeometryResponse < BinData::Record | ||
endian :little | ||
|
||
uint8 :depth | ||
uint32 :root | ||
uint16 :x | ||
uint16 :y | ||
uint16 :width | ||
uint16 :height | ||
uint16 :border_width | ||
end | ||
|
||
class TRANSLATECOORDINATESREQUEST < BinData::Record | ||
endian :little | ||
uint8 :opcode, value: 40 # TranslateCoordinates | ||
uint8 :unused # XXX seems to be increasing counter... | ||
uint16 :request_length, value: -> { num_bytes / 4 } | ||
uint32 :src_window | ||
uint32 :dst_window | ||
uint16 :src_x | ||
uint16 :src_y | ||
end | ||
|
||
class QUERYTREEREQUEST < BinData::Record | ||
endian :little | ||
uint8 :opcode, value: 15 # QueryTree | ||
uint8 :unused, value: 1 # XXX counter? | ||
uint16 :request_length, value: -> { num_bytes / 4 } | ||
uint32 :drawable | ||
end | ||
|
||
class QUERYTREERESPONSE < BinData::Record | ||
endian :little | ||
uint8 :root | ||
uint8 :parent_id | ||
uint16 :n_children | ||
array :children, type: :uint32le, initial_length: :n_children | ||
array :tree, type: :uint8, read_until: :eof | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.