Foreword |
|
xii | |
|
Preface |
|
xvii | |
Why Should I Trust Mono? |
|
xviii | |
Who Is This Book For? |
|
xviii | |
Organization of This Book |
|
xix | |
Acknowledgments |
|
xxi | |
A Final Note |
|
xxi | |
|
|
1 | (14) |
|
|
1 | (1) |
|
|
2 | (2) |
|
Introducing Classes and Interfaces |
|
|
4 | (5) |
|
|
4 | (1) |
|
|
4 | (1) |
|
Subclassing from an Abstract Class and Implementing an Interface |
|
|
5 | (2) |
|
Tying Everything Together with the Main() Method |
|
|
7 | (1) |
|
Running the Main() Method |
|
|
8 | (1) |
|
|
9 | (3) |
|
Assigning a Delegate to a Method |
|
|
9 | (1) |
|
Updating the Firefighter Class |
|
|
9 | (1) |
|
Creating Optional Arguments |
|
|
10 | (1) |
|
Updating the Main() Method |
|
|
11 | (1) |
|
Running the Updated Main() Method |
|
|
12 | (1) |
|
Integrating with Native Libraries |
|
|
12 | (1) |
|
|
13 | (2) |
|
2 Fuzzing And Exploiting XSS And SQL Injection |
|
|
15 | (38) |
|
Setting Up the Virtual Machine |
|
|
16 | (3) |
|
Adding a Host-Only Virtual Network |
|
|
16 | (1) |
|
Creating the Virtual Machine |
|
|
17 | (1) |
|
Booting the Virtual Machine from the BadStore ISO |
|
|
17 | (2) |
|
|
19 | (1) |
|
|
20 | (2) |
|
Fuzzing GET Requests with a Mutational Fuzzer |
|
|
22 | (3) |
|
Tainting the Parameters and Testing for Vulnerabilities |
|
|
23 | (1) |
|
Building the HTTP Requests |
|
|
23 | (2) |
|
|
25 | (1) |
|
|
25 | (6) |
|
Writing a POST Request Fuzzer |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (7) |
|
Setting Up the Vulnerable Appliance |
|
|
31 | (1) |
|
Capturing a Vulnerable JSON Request |
|
|
31 | (2) |
|
|
33 | (4) |
|
|
37 | (1) |
|
Exploiting SQL Injections |
|
|
38 | (13) |
|
Performing a UNION-Based Exploit by Hand |
|
|
38 | (2) |
|
Performing a UNION-Based Exploit Programmatically |
|
|
40 | (3) |
|
Exploiting Boolean-Blind SQL Vulnerabilities |
|
|
43 | (8) |
|
|
51 | (2) |
|
|
53 | (28) |
|
Setting Up the Vulnerable Endpoint |
|
|
54 | (1) |
|
|
55 | (13) |
|
Creating a Class for the WSDL Document |
|
|
55 | (1) |
|
Writing the Initial Parsing Methods |
|
|
56 | (2) |
|
Writing a Class for the SOAP Type and Parameters |
|
|
58 | (2) |
|
Creating the SoapMessage Class to Define Sent Data |
|
|
60 | (1) |
|
Implementing a Class for Message Parts |
|
|
61 | (1) |
|
Defining Port Operations with the SoapPortType Class |
|
|
62 | (1) |
|
Implementing a Class for Port Operations |
|
|
63 | (1) |
|
Defining Protocols Used in SOAP Bindings |
|
|
64 | (1) |
|
Compiling a List of Operation Child Nodes |
|
|
65 | (1) |
|
Finding the SOAP Services on Ports |
|
|
66 | (2) |
|
Automatically Fuzzing the SOAP Endpoint for SQL Injection Vulnerabilities |
|
|
68 | (11) |
|
Fuzzing Individual SOAP Services |
|
|
69 | (3) |
|
Fuzzing the HTTP POST SOAP Port |
|
|
72 | (3) |
|
Fuzzing the SOAP XML Port |
|
|
75 | (3) |
|
|
78 | (1) |
|
|
79 | (2) |
|
4 Writing Connect-Back, Binding, And Metasploit Payloads |
|
|
81 | (22) |
|
Creating a Connect-Back Payload |
|
|
82 | (3) |
|
|
82 | (2) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
85 | (3) |
|
Accepting Data, Running Commands, and Returning Output |
|
|
86 | (1) |
|
Executing Commands from the Stream |
|
|
87 | (1) |
|
Using UDP to Attack a Network |
|
|
88 | (6) |
|
The Code for the Target's Machine |
|
|
89 | (3) |
|
|
92 | (2) |
|
Running x86 and x86-64 Metasploit Payloads from C# |
|
|
94 | (8) |
|
|
94 | (2) |
|
|
96 | (1) |
|
Executing Native Windows Payloads as Unmanaged Code |
|
|
96 | (2) |
|
Executing Native Linux Payloads |
|
|
98 | (4) |
|
|
102 | (1) |
|
|
103 | (12) |
|
|
104 | (1) |
|
|
105 | (4) |
|
|
106 | (1) |
|
Logging Out and Cleaning Up |
|
|
107 | (1) |
|
Testing the NessusSession Class |
|
|
108 | (1) |
|
|
109 | (1) |
|
|
110 | (3) |
|
|
113 | (2) |
|
|
115 | (18) |
|
|
116 | (2) |
|
|
117 | (1) |
|
|
118 | (1) |
|
|
118 | (6) |
|
The ExecuteCommand() Method |
|
|
120 | (3) |
|
Logging Out and Disposing of Our Session |
|
|
123 | (1) |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (2) |
|
Automating a Vulnerability Scan |
|
|
126 | (2) |
|
Creating a Site with Assets |
|
|
126 | (1) |
|
|
127 | (1) |
|
Creating a PDF Site Report and Deleting the Site |
|
|
128 | (1) |
|
|
128 | (3) |
|
|
129 | (1) |
|
Generating a Report and Deleting the Site |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
131 | (2) |
|
|
133 | (14) |
|
|
134 | (1) |
|
|
134 | (1) |
|
|
134 | (6) |
|
Authenticating with the OpenVAS Server |
|
|
135 | (1) |
|
Creating a Method to Execute OpenVAS Commands |
|
|
136 | (1) |
|
Reading the Server Message |
|
|
137 | (1) |
|
Setting Up the TCP Stream to Send and Receive Commands |
|
|
138 | (1) |
|
Certificate Validation and Garbage Collection |
|
|
138 | (1) |
|
Getting the OpenVAS Version |
|
|
139 | (1) |
|
|
140 | (6) |
|
Getting Scan Configurations and Creating Targets |
|
|
141 | (3) |
|
Wrapping Up the Automation |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
8 Automating Cuckoo Sandbox |
|
|
147 | (20) |
|
Setting Up Cuckoo Sandbox |
|
|
148 | (1) |
|
Manually Running the Cuckoo Sandbox API |
|
|
148 | (3) |
|
|
148 | (1) |
|
|
149 | (2) |
|
Creating the CuckooSession Class |
|
|
151 | (6) |
|
Writing the ExecuteCommand() Methods to Handle HTTP Requests |
|
|
151 | (2) |
|
Creating Multipart HTTP Data with the GetMultipartFormData() Method |
|
|
153 | (2) |
|
Processing File Data with the FileParameter Class |
|
|
155 | (1) |
|
Testing the CuckooSession and Supporting Classes |
|
|
156 | (1) |
|
Writing the CuckooManager Class |
|
|
157 | (6) |
|
Writing the CreateTask() Method |
|
|
157 | (2) |
|
The Task Details and Reporting Methods |
|
|
159 | (1) |
|
Creating the Task Abstract Class |
|
|
160 | (1) |
|
Sorting and Creating Different Class Types |
|
|
161 | (2) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
165 | (2) |
|
|
167 | (24) |
|
|
168 | (5) |
|
|
169 | (1) |
|
Testing the sqlmap API with curl |
|
|
170 | (3) |
|
Creating a Session for sqlmap |
|
|
173 | (4) |
|
Creating a Method to Execute a GET Request |
|
|
174 | (1) |
|
|
175 | (1) |
|
Testing the Session Class |
|
|
176 | (1) |
|
|
177 | (5) |
|
|
179 | (1) |
|
Making a Method to Perform Scans |
|
|
180 | (2) |
|
|
182 | (1) |
|
|
182 | (1) |
|
Automating a Full sqlmap Scan |
|
|
183 | (2) |
|
Integrating sqlmap with the SOAP Fuzzer |
|
|
185 | (5) |
|
Adding sqlmap GET Request Support to the SOAP Fuzzer |
|
|
185 | (2) |
|
Adding sqlmap POST Request Support |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (16) |
|
|
192 | (1) |
|
The ClamAV Native Library vs. the clamd Network Daemon |
|
|
193 | (1) |
|
Automating with ClamAV's Native Library |
|
|
193 | (8) |
|
Setting Up the Supporting Enumerations and Classes |
|
|
194 | (2) |
|
Accessing ClamAV's Native Library Functions |
|
|
196 | (1) |
|
Compiling the ClamAV Engine |
|
|
197 | (1) |
|
|
198 | (2) |
|
|
200 | (1) |
|
Testing the Program by Scanning the EICAR File |
|
|
200 | (1) |
|
|
201 | (5) |
|
Installing the clamd Daemon |
|
|
202 | (1) |
|
Starting the clamd Daemon |
|
|
202 | (1) |
|
Creating a Session Class for clamd |
|
|
203 | (1) |
|
Creating a clamd Manager Class |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
207 | (16) |
|
|
208 | (1) |
|
Installing Metasploitable |
|
|
209 | (1) |
|
Getting the MSGPACK Library |
|
|
209 | (3) |
|
Installing the NuGet Package Manager for MonoDevelop |
|
|
210 | (1) |
|
Installing the MSGPACK Library |
|
|
211 | (1) |
|
Referencing the MSGPACK Library |
|
|
211 | (1) |
|
Writing the MetasploitSession Class |
|
|
212 | (5) |
|
Creating the Executed Method for HTTP Requests and Interacting with MSGPACK |
|
|
213 | (2) |
|
Transforming Response Data from MSGPACK |
|
|
215 | (2) |
|
Testing the session Class |
|
|
217 | (1) |
|
Writing the MetasploitManager Class |
|
|
217 | (2) |
|
|
219 | (3) |
|
|
220 | (1) |
|
Interacting with the Shell |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
223 | (18) |
|
|
223 | (1) |
|
|
224 | (3) |
|
Creating the ArachniHTTPSession Class |
|
|
225 | (1) |
|
Creating the ArachniHTTPManager Class |
|
|
226 | (1) |
|
Putting the Session and Manager Classes Together |
|
|
227 | (1) |
|
|
228 | (9) |
|
|
229 | (1) |
|
The ArachniRPCSession Class |
|
|
230 | (2) |
|
The Supporting Methods for ExecuteCommand() |
|
|
232 | (2) |
|
The ExecuteCommand() Method |
|
|
234 | (2) |
|
The ArachniRPCManager Class |
|
|
236 | (1) |
|
|
237 | (2) |
|
|
239 | (2) |
|
13 Decompiling And Reversing Managed Assemblies |
|
|
241 | (8) |
|
Decompiling Managed Assemblies |
|
|
242 | (2) |
|
|
244 | (1) |
|
Using monodis to Analyze an Assembly |
|
|
245 | (2) |
|
|
247 | (2) |
|
14 Reading Offline Registry Hives |
|
|
249 | (16) |
|
The Registry Hive Structure |
|
|
250 | (1) |
|
Getting the Registry Hives |
|
|
250 | (2) |
|
Reading the Registry Hive |
|
|
252 | (7) |
|
Creating a Class to Parse a Registry Hive File |
|
|
252 | (1) |
|
Creating a Class for Node Keys |
|
|
253 | (5) |
|
Making a Class to Store Value Keys |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
259 | (5) |
|
|
259 | (2) |
|
|
261 | (1) |
|
|
261 | (1) |
|
The StringToByteArray() Method |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
264 | (1) |
Index |
|
265 | |