Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
C - C++ / Re: Interface Programming using C's gtk libraries
« Last post by Xires on February 25, 2016, 10:07:32 pm »
Structs and classes are very different things.  A structure is just a contiguous spot in memory allocated such that different sections can be accessed as different variables.  I can provide some examples if you need them.

As for GTK+..make sure that you have pkg-config installed(it should be, but it might not be).  Once you're certain it's installed(which can be tested via "pkg-config --version") then you'll want to make sure that it can provide you with the cflags(compilation flags) and libs needed for compiling & linking your project(using "pkg-config --cflags --libs gtk+-3.0"; note there are no backquotes).  Next you'll throw together a simple test program.  Note that the test program need not be an elaborate example(which the documentation-provided 'hello world' is, IMHO), but rather just need something that will compile & link properly with the selected package.

Code: (bash) [Select]
xires@Synthesium:~/proj/code/c$ pkg-config --version
0.26
xires@Synthesium:~/proj/code/c$ pkg-config --cflags --libs gtk+-3.0
-pthread -I/usr/local/include/libpng16 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cair
o -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/i
nclude/libpng12  -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 
xires@Synthesium:~/proj/code/c$ cat gtktst.c
Code: (c) [Select]
#include <gtk/gtk.h>

int main(int argc, char **argv) {
    gtk_init(&argc, &argv);

    return 0;
}
Code: (bash) [Select]
xires@Synthesium:~/proj/code/c$ gcc -Wall -Wextra -W -ansi -pedantic -o gtktst{,.c} `pkg-config --cflags --libs gtk+-3.0`
xires@Synthesium:~/proj/code/c$ ldd gtktst | grep gtk
        libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f8a1e107000)
xires@Synthesium:~/proj/code/c$

If you've made it to this point successfully, then you can start working on more elaborate examples and stepping through the documentation.

Personal notes:
Honestly, I've worked with GTK quite a bit in the past and I have to warn you, it's a bit of a horrific mess.  You can certainly get through it but be sure you understand the language properly.  If GTK starts bringing in questions about how C works due to a specific feature or something then it's time to step back and make sure you really know C.

I love C, but I personally feel that GUI development is a better task for C++.  C++ provides the necessary features to help facilitate not just OOP, but also proper event-driven design.  There are also more(and some might say 'better') frameworks available with C++.  GTK is still an option(with gtkmm) but you also get Qt(a FAR better framework to learn, especially if you're just starting out), wxWindows(which is also great, by comparison), and FLTK(which I like, but research it first).  Of the C++-available options, I'd suggest learning Qt first as it has a large following and you'll find it more useful professionally(as in, it's worth putting on your CV).

With GTK often comes Glib, which is its own mess.  It's useful in some ways and provides common data structures, but it lacks...grace.  The documentation for both GTK & Glib is also lacking, in my opinion.  Of course, GTK & Glib are both worth learning, eventually, but be aware that it takes some tenacity to get through.
62
General discussion / Re: Your favorite Coding/Hacking/Gaming Music?
« Last post by xenophilius on February 25, 2016, 10:00:29 pm »
Depends on the mood.

While coding, need to concentrate so something cool:

Armin Van Buuren - A state of trance

After coding testing and debugging something a bit more energetic:

Some House music - Hardwell, Dyro etc...

I don't like to listen to the same music for one week on consecutive days. I get bored.
63
Beginner's Corner / Re: Creating cheat sheets
« Last post by proxx on February 25, 2016, 07:05:40 pm »
Hello:

[Problem]
I'm learning a lot the last time but it's getting too much to remember all the commands. I made a how to for myself for the install of arch and configuring, but for the commands of for eg airmon or iw i would like to create a cheat sheet.

[Background]
I've learned many commands but have it heard to remember.

[Things I have tried]
Install cribr in Arch with wine. Was no success. Installed cribr in Windows, doesn't look good.

I've been looking for alternatives but I don't trust all the online options (some of them force you to publish your cheat sheet).

Latex is named as an option on several internet website, but it seems to have a steep learning curve. As I'm now finally learning other things, I would like to learn Latex as a last thing.

[Where I am stuck]

How do you guys remember all those different commands? I know man exists but knowing the commands is much faster.

What or how do you guys keep track off all your know commands?

I'm not talking about installing or configuring things, I have a how to for this, but about the commands like iw, airmon, knowing you should change /etc/resolv.conf for NS, etc..

I don't have a problem with sharing my finally created cheat sheet, but as I'm very beginning I don't know you could use it  :)


I don't see them as commands. every tasks requires a different tool and thats the way I like to think about it.
Even after years I find myself using help and man quite often.
Also most commands have a very sensible name and so do the options which is pretty consistent  the result is that you can use the same flags for many different tools, the  '-v'  makes a good example.
Autocompletion is something you have to hammer into your brain, use tab  for everything , if it doesnt do anything make sure you hit frequently and with increasing force, you shall complete! I am making it sound like a joke but I am serious , I see many newbies typing  , I get tired by even looking at it.
That said, ZSH is my main shell and it makes life a whole lot easier , eventhough I think beginners should learn BASH first ZSH adds some extra dimensions, for example scrolling with tab over items is a great feature.
If it works for you do make a cheatsheet but I would encourage you to learn by doing and seeing the logic behind seemingly random letters and commands.
Also those commands you posted show me that you wanna jump to the fancy shit before learning to walk , start with file operations / networking / service mgmt etc.
64
I try not to do the 'thanks posts' but this  is a great find, I often find myself lost in my junk folders, this would certainly help.
65
Operating System / Re: So I installed Arch
« Last post by proxx on February 25, 2016, 06:31:01 pm »
Meh I didn't want to do it like that, figured I could just booted it up from VBox like everything else I have lol but nope


What do you run if I may ask

Are those programs you want to run heavy on CPU/MEM/GPU ?
If not I suggest you run windows on KVM and do your stuff in there or do as I do and have a box you can RDP into to do certain tasks, fixes all my problems for sure, plus you can still run heavy programs on the machine if required.
Everything else runs linux pretty much.


As for the thread hijack , I think this is a nice place to discuss such topics so if other staff members agree I will let this continue in such fashion.

iTpHo3NiX checking in, I agree ProxX. This was kind of a Linux experience thread
66
Hacking and Security / Re: User PW Validity
« Last post by proxx on February 25, 2016, 06:20:51 pm »
thats cool bro, but i promise that all 10,000 of your employees will NOT be using a password manager and enforcing a rule where they have to would be stupid and add unnecessary complexity. (and 9,950 of them will only use your companies password in it anyway.

change once a year, maybe once every 6 months if user security is that high on the totem pole, use two factor if feasible, and dont allow reuse or simple passwords.

realistically most hacking situations involving user passwords being compromised happened because they reused it on something you DONT control (some bs website that got their db dumped, their cellphone, w/e) and in that case what really matters is UAC and ensuring the rest of your network is up to par.
Thanks, I didnt know where to start with the punk  below, well said.
67
Found it on the Webs / Git Command Cheat Sheet
« Last post by 123vipulj on February 25, 2016, 05:09:42 pm »
68
Projects and Discussion / Re: Windows bully project
« Last post by Untitled00 on February 25, 2016, 01:50:04 pm »
So, I'm going to create a scenario so that I understand what you are trying to say.

Walk up to a machine that is already on and running Windows. Plug in a USB with this tool and execute it. This tool would brute force the users password on the spot, without elevated privileges or if necessary run an exploit to acquire the necessary privileges. Is this right?

The important part of that scenario is that you do not want to turn off the machine or reboot into a linux environment. If we can reboot, then we can extract the SAM file, pillage the network, etc.

It's a cool idea, but I'm thinking about all the time it would take to create a tool like that. How does it brute force the password without elevated privileges? I still don't understand why this would be better than walking up to the running machine and executing a trojan. If I have an exploit that allows privilege escalation, I'm going to install a rootkit instead.

I would really like to see a POC. I'm curious how it would work.

Yes is precisely for that specific spot, no reboots, sneaky moment, for example when i was in a security deparment and configured hundred of machines we was sure that no one could boot from CD or anything without our permission, and also, there are more scenarios that come to my mind, anyway gona record a simple POC ASAP setting the machine up.

EDIT: Horrible busy day, sorry, only got a screencap ask for more if you need, it planed to upload at least a gif, but got shit to do. ("Invitado"=Guest User, Administradores = Administrators, 0,49s 1k tests from guest to admin. Can show how i set the password in case someone needs it to believe, anyway i was checking it, and in fact i can almost 2X that speed. Just realized i wrote POF instead of POC, as i said.. busy day, well anyway there you have it ;))
69
Projects and Discussion / Re: Windows bully project
« Last post by spike on February 25, 2016, 01:32:56 pm »
So, I'm going to create a scenario so that I understand what you are trying to say.

Walk up to a machine that is already on and running Windows. Plug in a USB with this tool and execute it. This tool would brute force the users password on the spot, without elevated privileges or if necessary run an exploit to acquire the necessary privileges. Is this right?

The important part of that scenario is that you do not want to turn off the machine or reboot into a linux environment. If we can reboot, then we can extract the SAM file, pillage the network, etc.

It's a cool idea, but I'm thinking about all the time it would take to create a tool like that. How does it brute force the password without elevated privileges? I still don't understand why this would be better than walking up to the running machine and executing a trojan. If I have an exploit that allows privilege escalation, I'm going to install a rootkit instead.

I would really like to see a POC. I'm curious how it would work.
70
Projects and Discussion / Re: Simplest possible "pacific" malware.
« Last post by JustSomeBrHUE on February 25, 2016, 12:42:28 pm »
First of all, thank you Denque and Synfer. Synfer's answer gave me the idea I need to do what I want and Denque's one made me a little ashamed for asking such a silly and confusing question without first searching more about what I am doing. Next time I'll study a little more about the subject before bother the forum, hehe. ;D

And Denque, your answer helped a lot with my project, the Morris example and the file infection strategies will surely be used in my lecture, thanks for giving to me some of your time and knowledge.

I'll come back if having new questions, you guys helped a lot!  ;D
Pages: 1 ... 5 6 [7] 8 9 10